Ad Widget

Collapse

Problem with jmx collection on Zabbix 5.4. SSL peer shut down incorrectly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • peter68
    Junior Member
    • Mar 2014
    • 4

    #1

    Problem with jmx collection on Zabbix 5.4. SSL peer shut down incorrectly

    Hello,

    My zabbix 5.4.5 on Ubuntu 20.04 has problem with JMX collection. I'm trying collect JMX from Cassandra. Zabbix java gateway is configured on the same server as zabbix server. I have errors with SSL and after reading google i have tried to turn off SSL completely in java comunication as it's internal communication only. Unfortunately i have still the same error related with broken SSL communication. Communication between Zabbix server and Casandra is without firewall - the same subnet. I'm not sure hot to completely turn off SSL communication between Zabbix and Casandra. Thanks in advance for any support here.


    some output:

    Code:
    root 2351 0.1 0.9 6793316 119384 ? Sl 18:15 0:20 java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=7199 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.registry.ssl=false -server -Dlogback.configurationFile=/etc/zabbix/zabbix_java_gateway_logback.xml -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.registry.ssl=false -Djava.rmi.server.hostname=10.X.Y.Z -Dcom.sun.management.jmxremote.port=7199 -Dcom.sun.management.jmxremote.rmi.port=7199 -classpath lib:lib/android-json-4.3_r3.1.jar:lib/logback-classic-1.2.3.jar:lib/logback-core-1.2.3.jar:lib/slf4j-api-1.7.30.jar:bin/zabbix-java-gateway-5.4.7.jar -Dzabbix.pidFile=/var/run/zabbix/zabbix_java_gateway.pid -Dsun.rmi.transport.tcp.responseTimeout=3000 com.zabbix.gateway.JavaGateway
    Code:
    JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=/etc/zabbix/zabbix_java_gateway_logback.xml -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.registry.ssl=false -Djava.rmi.server.hostname=10.X.Y.Z -Dcom.sun.management.jmxremote.port=7199 -Dcom.sun.management.jmxremote.rmi.port=7199"
    Code:
    2021-11-05 21:02:49.711 [pool-2-thread-4] DEBUG com.zabbix.gateway.SocketProcessor - starting to process incoming connection
    2021-11-05 21:02:49.711 [pool-2-thread-4] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading Zabbix protocol header
    2021-11-05 21:02:49.711 [pool-2-thread-4] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading 8 bytes of data length
    2021-11-05 21:02:49.711 [pool-2-thread-4] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading 279 bytes of request data
    2021-11-05 21:02:49.711 [pool-2-thread-4] DEBUG c.z.gateway.BinaryProtocolSpeaker - received the following data in request: {"request":"java gateway jmx","username":"xxx","password":"xxxx" ,"jmx_endpoint":"service:jmx:rmi:///jndi/rmi://10.X.Y.Z:7199/jmxrmi","keys":["jmx[\"org.apache.cassandra.metrics:type=ThreadPools,pa th=request,scope=ViewMutationStage,name=PendingTas ks\",\"Value\"]"]}
    2021-11-05 21:02:49.711 [pool-2-thread-4] DEBUG com.zabbix.gateway.SocketProcessor - RMI SSL hint cache cleanup is scheduled on 1636218903286, now is: 1636142569711
    2021-11-05 21:02:49.711 [pool-2-thread-4] DEBUG com.zabbix.gateway.SocketProcessor - dispatched request to class com.zabbix.gateway.JMXItemChecker
    2021-11-05 21:02:49.711 [pool-2-thread-4] DEBUG c.z.g.ZabbixJMXConnectorFactory - connecting to JMX agent at 'service:jmx:rmi:///jndi/rmi://10.X.Y.Z:7199/jmxrmi'
    2021-11-05 21:02:49.718 [pool-2-thread-4] DEBUG c.z.g.ZabbixJMXConnectorFactory - connecting to JMX agent at 'service:jmx:rmi:///jndi/rmi://10.X.Y.Z:7199/jmxrmi'
    2021-11-05 21:02:49.727 [pool-2-thread-4] WARN com.zabbix.gateway.SocketProcessor - error processing request, item "jmx["org.apache.cassandra.metrics:type=ThreadPools,pat h=request,scope=ViewMutationStage,name=PendingTask s","Value"]" failed: SSL peer shut down incorrectly: service:jmx:rmi:///jndi/rmi://10.X.Y.Z:7199/jmxrmi
    2021-11-05 21:02:49.727 [pool-2-thread-4] DEBUG com.zabbix.gateway.SocketProcessor - error caused by
    com.zabbix.gateway.ZabbixException: SSL peer shut down incorrectly: service:jmx:rmi:///jndi/rmi://10.X.Y.Z:7199/jmxrmi
    at com.zabbix.gateway.JMXItemChecker.getValues(JMXIte mChecker.java:168)
    at com.zabbix.gateway.SocketProcessor.run(SocketProce ssor.java:81)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
    2021-11-05 21:02:49.728 [pool-2-thread-4] DEBUG c.z.gateway.BinaryProtocolSpeaker - sending the following data in response: {"response":"failed","error":"SSL peer shut down incorrectly: service:jmx:rmi:\/\/\/jndi\/rmi:\/\/10.X.Y.Z:7199\/jmxrmi"}
    2021-11-05 21:02:49.728 [pool-2-thread-4] DEBUG com.zabbix.gateway.SocketProcessor - finished processing incoming connection
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Hi Peter.

    You're using the same Java '-D' flag that we are at my site to disable SSL for the JMX ( -Dcom.sun.management.jmxremote.ssl=false ), but we're only using JMX with Apache Tomcat, not Cassandra. Still, JMX is more of a Java thing than specific to the application, so I would expect what you're using should work.

    There's a cool tool at the end of the very good blog post on Zabbix & JMX:

    https://blog.zabbix.com/new-monitori...bbix-3-4/5972/

    Perhaps that zabbix_java_get.sh might shed some light on the issue? Otherwise, the list of references at the end of that blog might have something useful?

    Comment

    • naxxon
      Junior Member
      • Feb 2022
      • 3

      #3
      Hi!
      Any news on this issue?
      I'm stuck here, tried every posible parameter found online fo fix it without any progress.

      -Dcom.sun.management.jmxremote.port=9000
      -Dcom.sun.management.jmxremote.rmi.port=9000
      -Dcom.sun.management.jmxremote.ssl=false
      -Dcom.sun.management.jmxremote.authenticate=false
      -Dcom.sun.management.jmxremote.local.only=false
      -Dcom.sun.management.jmxremote.registry.ssl=false
      -Djava.rmi.server.hostname=172.17.0.32 '

      Im using Tomcat 9 and Ubuntu 20.04
      JMX does not use ssl.
      Any clue?

      Thanks! Nacho.

      Comment

      • lptarik
        Member
        • Oct 2021
        • 33

        #4
        who did solve this issue? I am trying to monitor activemq

        Comment

        Working...