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]: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
Then we modified the file java gateway configuration file i.e. zabbix_java_gateway.conf. Here we changed the below code
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.
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]
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.