Hi there!
I'm trying to monitor Java apps via JMX but got red square with mentioned error in web interface. For the sake of simplicity I've started to troubleshoot only Zabbix Java gateway itself, so uncommented:
JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12345
-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.registry.ssl=false"
at the bottom of config file and added JMX interface and Template App Generic Java JMX to Zabbix Server. The errors in /var/log/zabbix/zabbix_java_gateway.log look like:
2021-06-25 21:14:16.528 [pool-2-thread-1] WARN com.zabbix.gateway.SocketProcessor - error processing request, item "jmx["java.lang:type=GarbageCollector,name=Copy",Co llec tionTime]" failed: SSL peer shut down incorrectly: service:jmx:rmi:///jndi/rmi://127.0.0.1:12345/jmxrmi
There's two way PSK encryption between Zabbix Server and Zabbix Agent, I've tried to disable it just to ensure it doesn't affect JMX, and the error persists.
It looks like JVM expects SSL by default, but it shouldn't because of startup parameters and management.properties contents. I've tried to connect to Java Gateway via JConsole and it warns about SSL too, but it's possible to ignore this warning and then the console shows everything just fine.
I run out of ideas. Google is not of much help too. So any thoughts are greatly appreciated.
My setup is:
CentOS Linux release 7.9.2009 (SELinux and firewall are disabled)
OpenJDK 1.8.0_292
Zabbix server and Java gateway: 4.0.31
I'm trying to monitor Java apps via JMX but got red square with mentioned error in web interface. For the sake of simplicity I've started to troubleshoot only Zabbix Java gateway itself, so uncommented:
JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12345
-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.registry.ssl=false"
at the bottom of config file and added JMX interface and Template App Generic Java JMX to Zabbix Server. The errors in /var/log/zabbix/zabbix_java_gateway.log look like:
2021-06-25 21:14:16.528 [pool-2-thread-1] WARN com.zabbix.gateway.SocketProcessor - error processing request, item "jmx["java.lang:type=GarbageCollector,name=Copy",Co llec tionTime]" failed: SSL peer shut down incorrectly: service:jmx:rmi:///jndi/rmi://127.0.0.1:12345/jmxrmi
There's two way PSK encryption between Zabbix Server and Zabbix Agent, I've tried to disable it just to ensure it doesn't affect JMX, and the error persists.
It looks like JVM expects SSL by default, but it shouldn't because of startup parameters and management.properties contents. I've tried to connect to Java Gateway via JConsole and it warns about SSL too, but it's possible to ignore this warning and then the console shows everything just fine.
I run out of ideas. Google is not of much help too. So any thoughts are greatly appreciated.
My setup is:
CentOS Linux release 7.9.2009 (SELinux and firewall are disabled)
OpenJDK 1.8.0_292
Zabbix server and Java gateway: 4.0.31

Comment