Ad Widget

Collapse

Zabbix java_gateway java.rmi.ConnectException

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Matess
    Junior Member
    • Jul 2012
    • 2

    #1

    Zabbix java_gateway java.rmi.ConnectException

    Hi,
    having problem to setup the java gateway.
    Installed server and java gateway on same machine and getting this exception.

    2012-07-12 15:24:51.637 [pool-1-thread-4] DEBUG com.zabbix.gateway.SocketProcessor - dispatched request to class com.zabbix.gateway.JMXItemChecker
    2012-07-12 15:24:51.637 [pool-1-thread-4] DEBUG com.zabbix.gateway.JMXItemChecker - connecting to JMX agent at service:jmx:rmi:///jndi/rmi://plns00011:12345/jmxrmi
    2012-07-12 15:24:51.686 [pool-1-thread-4] WARN com.zabbix.gateway.SocketProcessor - error processing request
    com.zabbix.gateway.ZabbixException: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
    java.net.ConnectException: Connection refused
    at com.zabbix.gateway.JMXItemChecker.getValues(JMXIte mChecker.java:100) ~[zabbix-java-gateway-2.0.1.jar:na]
    at com.zabbix.gateway.SocketProcessor.run(SocketProce ssor.java:63) ~[zabbix-java-gateway-2.0.1.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1110) [na:1.6.0_24]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:603) [na:1.6.0_24]
    at java.lang.Thread.run(Thread.java:679) [na:1.6.0_24]
    Caused by: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
    java.net.ConnectException: Connection refused
  • Matthias R
    Junior Member
    • Jul 2012
    • 19

    #2
    I have the same problem here. One problem I see is that there seems to be no way to test whether the Java application is correctly set up. I mean, zabbix_get returns an empty line, no value. Telnet reports that the remote party closes the connection. First the java instance should do its job, but how can one test that?

    Edit: When I first used Zapcat I got the expected results in telnet, but the Java gateway reported "Connection refused". I undeployed Zapcat because I guessed it won't work with Zabbix 2.0.1 and modified the Tomcat start script as explained in the manual. Now I get no results from neither telnet nor zabbix_get, and still Connection refused messages in the Java Gateway's log.
    Last edited by Matthias R; 16-07-2012, 12:41.

    Comment

    • Matthias R
      Junior Member
      • Jul 2012
      • 19

      #3
      There is a firewall issue if you try to connect to a remote server: The server you are contacting opens an arbitrary port to communicate back. If there is a firewall in between or you are using ssh tunneling (as in my case) this won't work.

      Comment

      • Matthias R
        Junior Member
        • Jul 2012
        • 19

        #4
        I added this issue to the bug tracker: https://support.zabbix.com/browse/ZBX-5326

        Comment

        • Matthias R
          Junior Member
          • Jul 2012
          • 19

          #5
          If the software you are about to monitor is Tomcat in version 6.0.26 or newer, there is a fix for this problem, see Connecting to JMX on Tomcat 6 through a firewall

          The appropriate catalina-jmx-remote.jar JAR file can be found at
          http://archive.apache.org/dist/tomcat/tomcat-6/v<<version>>/bin/extras/

          Comment

          • Matthias R
            Junior Member
            • Jul 2012
            • 19

            #6
            Here is a description of the workaround I figured out:

            Comment

            Working...