我试图连接远程jvm,使用了jvisualvm。
我使用以下参数启动服务器:

-Dcom.sunmanagement.jmxremote=true
-Dcom.sun.management.jmxremote.port=15001
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false


我有这个错误:

Error: Exception thrown by the agent : java.lang.NullPointerException


当我删除此参数时:

-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false


我有另一个错误,像这样:

Error: Password file not found: /var/lib/openshift/5406e3aa500446a793000178/
wildfly/usr/lib/jvm/jdk1.8.0_05/jre/lib/management/jmxremote.password


题。如何为jmx远程连接配置服务器?
我为初始java参数使用了动作挂钩。

可能存在另一个监视jvm的工具吗?

最佳答案

我的猜测是,默认情况下尝试使用jmx远程绑定为0.0.0.0(即所有网络接口)。但是,在Openshift上,您只能绑定到$ OPENSHIFT_INTERNAL_IP。该错误似乎是神秘的,但这可能是由https://bugs.openjdk.java.net/browse/JDK-8048050引起的。

10-08 16:10