JMX密码读取访问问题 [英] JMX password read access issue

查看:320
本文介绍了JMX密码读取访问问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用JMX监视这样的应用程序时:

When I try to use JMX to monitor an application like this:

java -Dcom.sun.management.jmxremote.port=9999 \
     -Dcom.sun.management.jmxremote.authenticate=false \
     -Dcom.sun.management.jmxremote.ssl=false \
     JMX_tester

它告诉我:

Error: Password file read access must be restricted:
       /usr/lib/jvm/java-7-oracle/jre/lib/management/jmxremote.password

但是,当我使用chmod限制读取访问时,它会告诉我:

Yet, when I use chmod to restrict the read access, it tells me:

Error: can't read password file

我疯了吗?我该如何解决?

Am I going insane or something? How can I fix this?

这是Ubuntu btw,带有最新的oracle jdk

This is Ubuntu btw, with the latest oracle jdk

推荐答案

确保您用来运行Java进程的用户可以访问该文件(所有者/读取权限).

Make sure the user you are using to run the java process have access to the file (owner/read permissions).

尝试:

chmod 600 jmxremote.password

另外,我建议您创建自己的密码文件并使用

Plus I suggest you'll make your own password file and run it with

-Dcom.sun.management.jmxremote.password.file=pwFilePath

此处解释的全部.

这篇关于JMX密码读取访问问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆