对JMX启用SSL会在远程端点错误时引发非JRMP服务器

时间:2019-12-01 11:01:34

标签: tomcat8 jmx jconsole

我正在尝试建立安全的jmx连接。 jmx参数是在tomcat中配置的,我正在使用来自同一台VM和另一台VM的jconsole测试连接。下面是tomcat8中的Java配置。

-Dcom.sun.management.jmxremote=true
-Djava.rmi.server.hostname=IP_address
-Dcom.sun.management.jmxremote.port=port_number
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.registry.ssl=true
-Djavax.net.ssl.keyStore="D:\temp2\certs\keystore.jks"
-Djavax.net.ssl.keyStorePassword=passwrd
-Djavax.net.ssl.trustStore="D:\temp2\certs\truststore.jks"
-Djavax.net.ssl.trustStorePassword=passwrd

在相同或另一个VM上,我正在使用以下jconsole命令。

jconsole -J-Djavax.net.ssl.trustStore=D:\NPS\core_connect\jmx\clienttruststore.jks  -J-Djavax.net.ssl.trustStorePassword=passwrd

但是当我尝试使用jconsole进行连接时,我会得到

java.rmi.ConnectIOException: non-JRMP server at remote endpoint
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:248)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:342)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at sun.tools.jconsole.ProxyClient.checkSslConfig(ProxyClient.java:234)
at sun.tools.jconsole.ProxyClient.<init>(ProxyClient.java:127)
at sun.tools.jconsole.ProxyClient.getProxyClient(ProxyClient.java:475)
at sun.tools.jconsole.JConsole$3.run(JConsole.java:524)

有人可以帮忙吗?

0 个答案:

没有答案
相关问题