Ad Widget

Collapse

java gateway fail

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • greedysoul
    Junior Member
    • Jul 2014
    • 10

    #1

    java gateway fail

    Hello, I am seeing some weird connection issue with java-gateway, I suspect that it's network or firewall-related, but am not sure how to troubleshoot further.

    I have a few Tomcat 7 servers with JMX enabled on port 10052 and have verified connectivity to that port from the Zabbix server. In fact jconsole works fine with the connection string:
    service:jmx:rmi:///jndi/rmi://143.169.228.xxx:10052/jmxrmi

    In the java-gateway log I get one of two errors, depending on the zabbix server (this is what leads me to believe it's network related):

    On Zabbix server 1:

    Code:
    2015-05-15 14:01:06.026 [pool-1-thread-2] DEBUG c.z.gateway.BinaryProtocolSpeaker - received the following data in request: {
            "request":"java gateway jmx",
            "conn":"143.169.228.xxx",
            "port":10052,
            "username":"monitorRole",
            "password":"Sc401M0n",
            "keys":["jmx[\"Catalina:type=ThreadPool,name=\\\"http-nio-8080\\\"\",\"currentThreadCount\"]"]}
    2015-05-15 14:01:06.026 [pool-1-thread-2] DEBUG com.zabbix.gateway.SocketProcessor - dispatched request to class com.zabbix.gateway.JMXItemChecker
    2015-05-15 14:01:06.026 [pool-1-thread-2] DEBUG com.zabbix.gateway.JMXItemChecker - connecting to JMX agent at service:jmx:rmi:///jndi/rmi://143.169.228.xxx:10052/jmxrmi
    2015-05-15 14:01:06.032 [pool-1-thread-2] WARN  com.zabbix.gateway.SocketProcessor - error processing request
    com.zabbix.gateway.ZabbixException: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
            java.net.SocketException: Connection reset]
    On Zabbix server 2:

    Code:
    2015-05-15 12:02:50.598 [pool-1-thread-1] DEBUG com.zabbix.gateway.SocketProcessor - starting to process incoming connection
    2015-05-15 12:02:50.602 [pool-1-thread-1] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading Zabbix protocol header
    2015-05-15 12:02:53.480 [pool-1-thread-1] WARN  com.zabbix.gateway.SocketProcessor - error processing request
    com.zabbix.gateway.ZabbixException: bad protocol header: FF F4 FF FD 06
            at com.zabbix.gateway.BinaryProtocolSpeaker.getRequest(BinaryProtocolSpeaker.java:59) ~[zabbix-java-gateway-2.4.5.jar:na]
            at com.zabbix.gateway.SocketProcessor.run(SocketProcessor.java:51) ~[zabbix-java-gateway-2.4.5.jar:na]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_79]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_79]
            at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
    2015-05-15 12:02:53.483 [pool-1-thread-1] DEBUG c.z.gateway.BinaryProtocolSpeaker - sending the following data in response: {"response":"failed","error":"bad protocol header: FF F4 FF FD 06"}
    2015-05-15 12:02:53.484 [pool-1-thread-1] DEBUG com.zabbix.gateway.SocketProcessor - finished processing incoming connection
    Any help or ideas would be appreciated.
  • greedysoul
    Junior Member
    • Jul 2014
    • 10

    #2
    I found out the problem... it was selinux blocking apache even though I had set the permission for httpd_can_connect... I had to disable it completely.

    Comment

    • vishnu.dinoct
      Junior Member
      • May 2017
      • 9

      #3
      Originally posted by greedysoul
      I found out the problem... it was selinux blocking apache even though I had set the permission for httpd_can_connect... I had to disable it completely.
      Hi ...We have a similar issue here. Can you help please???


      ==========

      com.zabbix.gateway.SocketProcessor - error processing request
      com.zabbix.gateway.ZabbixException: bad protocol header: 6A 6D 78 5B 62
      at com.zabbix.gateway.BinaryProtocolSpeaker.getReques t(BinaryProtocolSpeaker.java:59) ~[zabbix-java-gateway-2.2.0.jar:na]
      at com.zabbix.gateway.SocketProcessor.run(SocketProce ssor.java:51) ~[zabbix-java-gateway-2.2.0.jar:na]
      at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1142) [na:1.8.0_45]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617) [na:1.8.0_45]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
      2017-05-07 14:45:07.808 [pool-1-thread-3] WARN com.zabbix.gateway.SocketProcessor - error processing request
      com.zabbix.gateway.ZabbixException: bad protocol header: 6A 6D 78 5B 62
      at com.zabbix.gateway.BinaryProtocolSpeaker.getReques t(BinaryProtocolSpeaker.java:59) ~[zabbix-java-gateway-2.2.0.jar:na]
      at com.zabbix.gateway.SocketProcessor.run(SocketProce ssor.java:51) ~[zabbix-java-gateway-2.2.0.jar:na]

      Thank you somuch in advance

      Comment

      Working...