Page 1 of 1
JMX monitoring time out issue.
Posted: Wed Oct 17, 2018 2:31 pm
by vy3734
Hi,
I'm trying to setup Nagios JMX monitoring on a few remote hosts. I am seeing the following error when i tried executing the following.
check_jmx command execution timed out with the following error:
[nagios@NagiosServer libexec]$ ./check_jmx -U service:jmx:rmi:///jndi/rmi://RemoteJMXServer:8084/jmxrmi -O java.lang:type=OperatingSystem -A SystemLoadAverage -w 85 -c 90 --username user --password password
JMX CRITICAL - Error opening RMI connection: Connection refused to host: RemoteJMXServerIP; nested exception is:
java.net.ConnectException: Connection timed out (Connection timed out)
Any help is very much appreciated.
Thanks!
Re: JMX monitoring time out issue.
Posted: Wed Oct 17, 2018 3:30 pm
by ssax
Connection refused to host
Please post the output of this command from your XI server:
Re: JMX monitoring time out issue.
Posted: Wed Oct 17, 2018 4:13 pm
by vy3734
[nagios@NagiosServer static]$ nmap -p 8084 RemoteJMXServer
Starting Nmap 6.40 (
http://nmap.org ) at 2018-10-17 17:11 EDT
Nmap scan report for RemoteJMXServer (RemoteJMXServer_IP)
Host is up (0.00050s latency).
rDNS record for RemoteJMXServer_IP : RemoteJMXServer
PORT STATE SERVICE
8084/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds
You have mail in /var/spool/mail/nagios
Re: JMX monitoring time out issue.
Posted: Wed Oct 17, 2018 4:41 pm
by ssax
Please talk with your JMX admins and ask them if you have a security policy grant file that you need to add your XI server to that will allow remote access to it. This is likely what is stopping it from working.
Re: JMX monitoring time out issue.
Posted: Mon Oct 22, 2018 8:54 am
by vy3734
We tried executing the check_jmx on the remote host. It works fine. It must probably be a firewall issue. Does JMX service send response back to the same port on the nagios server when check_jmx command is executed remotely from the nagios server.
[nagios@NagiosServer libexec]$ ./check_jmx -U service:jmx:rmi:///jndi/rmi://RemoteJMXServer:8084/jmxrmi -O java.lang:type=OperatingSystem -A SystemLoadAverage -w 85 -c 90 --username user --password password
We know for a fact that on the remote host JMX service is running on port 8084. when the above command is executed on the nagios server, does the service send response back to the same 8084 port on nagios server?
Re: JMX monitoring time out issue.
Posted: Mon Oct 22, 2018 2:04 pm
by ssax
It should respond back on the same port. There is likely a security policy grant file that you need to add your XI server IP address to that grants the remote connection to RMI.
Re: JMX monitoring time out issue.
Posted: Mon Oct 22, 2018 2:59 pm
by vy3734
Any chance you would know where i can find the grant file? is there a default location where i can find it?
Re: JMX monitoring time out issue.
Posted: Mon Oct 22, 2018 3:13 pm
by ssax
Unfortunately I do not, you would need to work with your JMX server admins in order to determine that.