Ad Widget

Collapse

JMX monitoring issue on Zabbix-Java-gateway 3.0.14

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rvempati
    Junior Member
    • Jan 2018
    • 2

    #1

    JMX monitoring issue on Zabbix-Java-gateway 3.0.14

    Hi,

    I am working to enable the JMX monitoring setup on an existing Zabbix Server which is on 3.0.14 version (CentOS 6).

    I have installed the Zabbix Java Gateway Version 3.0.14 on the same Zabbix Server and updated the configuration in zabbix_server.conf and zabbix_java_gateway.conf as mentioned in the documentation.

    I have configured the remote JMX interface on the Zabbix Web Interface and below is the error log that I could see in the zabbix_java_gateway.log

    2018-01-29 13:56:43.959 [pool-1-thread-3] DEBUG com.zabbix.gateway.SocketProcessor - starting to process incoming connection
    2018-01-29 13:56:43.959 [pool-1-thread-3] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading Zabbix protocol header
    2018-01-29 13:56:43.960 [pool-1-thread-3] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading 8 bytes of data length
    2018-01-29 13:56:43.960 [pool-1-thread-3] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading 175 bytes of request data
    2018-01-29 13:56:43.960 [pool-1-thread-3] DEBUG c.z.gateway.BinaryProtocolSpeaker - received the following data in request: {"request":"java gateway jmx","conn":"172.25.108.157","port":8916,"username ":"monitorRole","password":"abcdef","keys":["jmx[\"java.lang:type=Memory\",HeapMemoryUsage.used]"]}
    2018-01-29 13:56:43.960 [pool-1-thread-3] DEBUG com.zabbix.gateway.SocketProcessor - dispatched request to class com.zabbix.gateway.JMXItemChecker
    2018-01-29 13:56:43.960 [pool-1-thread-3] DEBUG c.z.g.ZabbixJMXConnectorFactory - connecting to JMX agent at 'service:jmx:rmi:///jndi/rmi://[172.25.108.157]:8916/jmxrmi'
    2018-01-29 13:56:46.962 [pool-1-thread-3] WARN com.zabbix.gateway.SocketProcessor - error processing request
    com.zabbix.gateway.ZabbixException: java.net.SocketTimeoutException: connection timed out: service:jmx:rmi:///jndi/rmi://[172.25.108.157]:8916/jmxrmi
    at com.zabbix.gateway.JMXItemChecker.getValues(JMXIte mChecker.java:97) ~[zabbix-java-gateway-3.0.14.jar:na]
    at com.zabbix.gateway.SocketProcessor.run(SocketProce ssor.java:62) ~[zabbix-java-gateway-3.0.14.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1149) [na:1.8.0_161]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624) [na:1.8.0_161]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_161]
    Caused by: java.net.SocketTimeoutException: connection timed out: service:jmx:rmi:///jndi/rmi://[172.25.108.157]:8916/jmxrmi
    at com.zabbix.gateway.ZabbixJMXConnectorFactory.conne ct(ZabbixJMXConnectorFactory.java:123) ~[zabbix-java-gateway-3.0.14.jar:na]
    at com.zabbix.gateway.JMXItemChecker.getValues(JMXIte mChecker.java:89) ~[zabbix-java-gateway-3.0.14.jar:na]
    ... 4 common frames omitted
    2018-01-29 13:56:46.962 [pool-1-thread-3] DEBUG c.z.gateway.BinaryProtocolSpeaker - sending the following data in response: {"response":"failed","error":"java.net.SocketTimeo utException: connection timed out: service:jmx:rmi:\/\/\/jndi\/rmi:\/\/[172.25.108.157]:8916\/jmxrmi"}
    2018-01-29 13:56:46.962 [pool-1-thread-3] DEBUG com.zabbix.gateway.SocketProcessor - finished processing incoming connection



    I am able to connect to the JMX interface that is configured in Zabbix via JConsole but it is with the Zabbix Java Gateway I am unable to connect.

    I suspect that the outgoing request mentioned in the log looks incorrect as the remote server IP is appended with closed brackets

    service:jmx:rmi:///jndi/rmi://[172.25.108.157]:8916/jmxrmi


    Can any one help me here if the above request framing by Java Gateway is resulting in the error? I have checked all the configuration and I couldn't find any reference to the remote server IP which is appended with closed brackets.

    Regards,
  • rvempati
    Junior Member
    • Jan 2018
    • 2

    #2
    Issue can be marked as resolved. I implemented below solution and it worked.


    Join the friendly and open Zabbix community on our forums and social media platforms.

    Comment

    Working...