JMX monitoring time out issue.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vy3734
Posts: 109
Joined: Tue Sep 29, 2015 4:48 pm

JMX monitoring time out issue.

Post 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!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: JMX monitoring time out issue.

Post by ssax »

Connection refused to host
Please post the output of this command from your XI server:

Code: Select all

nmap -p 8084 RemoteJMXServer
vy3734
Posts: 109
Joined: Tue Sep 29, 2015 4:48 pm

Re: JMX monitoring time out issue.

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: JMX monitoring time out issue.

Post 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.
vy3734
Posts: 109
Joined: Tue Sep 29, 2015 4:48 pm

Re: JMX monitoring time out issue.

Post 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?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: JMX monitoring time out issue.

Post 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.
vy3734
Posts: 109
Joined: Tue Sep 29, 2015 4:48 pm

Re: JMX monitoring time out issue.

Post by vy3734 »

Any chance you would know where i can find the grant file? is there a default location where i can find it?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: JMX monitoring time out issue.

Post by ssax »

Unfortunately I do not, you would need to work with your JMX server admins in order to determine that.
Locked