Ad Widget

Collapse

JMX: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested excepti

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sorin
    Junior Member
    • Feb 2014
    • 11

    #1

    JMX: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested excepti

    I do get this error very often and I do know that the JVM is configured to accept connections from anywhere, telnet on the JMX port works from localhost and also from other machines.

    Still, Zabbix JMX seems to fail most of the times.

    java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: \n\tjava.net.ConnectException: Connectio

    Zabbix 2.2.1, oracle-java 1.7.51
  • jan.garaj
    Senior Member
    Zabbix Certified Specialist
    • Jan 2010
    • 506

    #2
    How did you setup your JMX connection?
    Did you setup also -Djava.rmi.server.hostname ?
    Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
    My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

    Comment

    • sorin
      Junior Member
      • Feb 2014
      • 11

      #3
      Nope, this was the problem. And the trick is that you *must* set it up to the public IP of the server if you want to be able to connect from outside. Even if you put 127.0.0.1 it will accept only localhost. More interesting is that it does open the port but it does respond to requests from outside localhost.

      That's more like a bug in Java and quite confusing.

      Comment

      Working...