Bobcares

Zabbix server can’t connect to java gateway – Quick solution

by | Mar 13, 2021

Are you looking for a solution to the error message ‘Zabbix server can’t connect to java gateway’? We can help you resolve it.

Here at Bobcares, we have seen several such errors while troubleshooting Zabbix issues as part of our Server Management Services for web hosts and online service providers.

Today, let us see how our Support Engineers resolve this Zabbix error message for our customers.

 

How to fix the ‘Zabbix server can’t connect to java gateway’ error

Recently, one of our customers approached us saying that he has a Zabbix server and java gateway in the same Linux server. He tried to start the Zabbix-server and Zabbix-java-gateway service.

Then in the Zabbix web console, he added a host that enabled the JMX interface. The host IP address was 192.xx.xx.2xx and the JMX port was 9999.

In jconsole, he was able to connect to the JMX-enabled java application. But in the Zabbix web console, he came across the below error message.

cannot connect to [[192.xx.xx.2xx]:10052]:[13]Permission denied

Now let us see how our Support Engineers resolve this error to our customer.

First, we made sure that the SELinux or iptables are not blocking the requests.

Next, we edited the Zabbix configuration file i.e. zabbix_server.conf file. Here we changed the below code

JavaGateway=192.xx.xx.2xx

to

JavaGateway=127.0.0.1

Then we modified the file java gateway configuration file i.e. zabbix_java_gateway.conf. Here we changed the below code

LISTEN_IP=192.xx.xx.2xx

to

LISTEN_IP=127.0.0.1

After that, we restarted the Zabbix server. For that, we ran the below command.

service zabbix-server restart

Then we restarted the java gateway as well. For that, we ran the below command.

service zabbix-java-gateway restart

Finally, we add the below VM options.

-Djava.net.preferIPv4Stack=true

That’s it! This resolved the Zabbix error message to our customer.

[Need any further assistance in fixing Zabbix errors? – We’re available 24*7]

 

Conclusion

In short, we can resolve this Zabbix error by making some changes in the server configuration files and restarting the Zabbix and java gateway. Today, we saw how our Support Engineers resolve this Zabbix error for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.