我正在使用 JConsole 访问我的应用程序 MBean。目前还没有适当的身份验证。当用户通过 Jconsole 访问它时,我想进行基于用户名/密码的身份验证。
我在 google 上进行了搜索并尝试了几种方法,但 Jconsole 仍然显示消息“连接失败:连接被拒绝:连接”我在启动程序时设置了以下属性
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8222
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.password.file=C:\secure\jmxremote.password
-Dcom.sun.management.jmxremote.access.file=C:\secure\jmxremote.access
-Dcom.sun.management.jmxremote.ssl=false
请帮忙。
谢谢
最佳答案
密码文件必须只能由所有者读取,否则将被忽略。请参阅此链接了解详细信息: https://db.apache.org/derby/docs/10.9/adminguide/radminjmxenablepwd.html
关于java - Jconsole 基于密码的身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33916255/