Monitoring Wildfly 14 and Java 10

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
eSailVite
Posts: 22
Joined: Thu Feb 14, 2019 2:18 am

Monitoring Wildfly 14 and Java 10

Post by eSailVite »

Hi,
First, I`m sorry for my English..

I would like to monitoring my server Wildfly 14 and java 10.. The problem is the plugins are old. Can you help me?

Regards
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Monitoring Wildfly 14 and Java 10

Post by ssax »

You will need to monitor through JMX via this method for now:

Code: Select all

https://assets.nagios.com/downloads/nagiosxi/docs/Monitoring-JMX-with-Nagios-XI.pdf
eSailVite
Posts: 22
Joined: Thu Feb 14, 2019 2:18 am

Re: Monitoring Wildfly 14 and Java 10

Post by eSailVite »

Thanks for your answer. I have this error

./check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9990/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -vvvv -w 4248302272 -c 5498760192
JMX CRITICAL - Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.net.SocketTimeoutException: Read timed out] connecting to java.lang:type=Memory by URL service:jmx:rmi:///jndi/rmi://localhost:9990/jmxrmijava.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.net.SocketTimeoutException: Read timed out]
at java.management.rmi/javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:370)
at java.management/javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270)
at jmxquery.DefaultJMXProvider.getConnector(DefaultJMXProvider.java:17)
at jmxquery.JMXQuery.connect(JMXQuery.java:95)
at jmxquery.JMXQuery.runCommand(JMXQuery.java:70)
at jmxquery.JMXQuery.main(JMXQuery.java:116)
Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.net.SocketTimeoutException: Read timed out]
at jdk.naming.rmi/com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:137)
at java.naming/com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:207)
at java.naming/javax.naming.InitialContext.lookup(InitialContext.java:409)
at java.management.rmi/javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1839)
at java.management.rmi/javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1813)
at java.management.rmi/javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:302)
... 5 more
Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.net.SocketTimeoutException: Read timed out
at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:300)
at java.rmi/sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:196)
at java.rmi/sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
at java.rmi/sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:112)
at jdk.naming.rmi/com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:133)
... 10 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.base/java.net.SocketInputStream.socketRead0(Native Method)
at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:141)
at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:271)
at java.base/java.io.DataInputStream.readByte(DataInputStream.java:270)
at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:239)
... 14 more
In wildfly 14, jmx use "service:jmx:http-remoting-jmx", I think so..
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Monitoring Wildfly 14 and Java 10

Post by jomann »

You're running the plugin locally on the java server? It seems like it's having trouble connecting to service:jmx:rmi:///jndi/rmi://localhost:9990/jmxrmi, is there a way to verify that your java is running and port 9990 is accepting requests?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
eSailVite
Posts: 22
Joined: Thu Feb 14, 2019 2:18 am

Re: Monitoring Wildfly 14 and Java 10

Post by eSailVite »

Hi,

The 9990 port is open.

look at the imagen

Regards
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitoring Wildfly 14 and Java 10

Post by scottwilkerson »

Is the firewall open on that port as well?

Code: Select all

iptables -L -n
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
eSailVite
Posts: 22
Joined: Thu Feb 14, 2019 2:18 am

Re: Monitoring Wildfly 14 and Java 10

Post by eSailVite »

Hi,
The port is open as well.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitoring Wildfly 14 and Java 10

Post by scottwilkerson »

You have ./check_jmx installed on the remote machine right? Not the Nagios server right?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
eSailVite
Posts: 22
Joined: Thu Feb 14, 2019 2:18 am

Re: Monitoring Wildfly 14 and Java 10

Post by eSailVite »

Hi,

Yes... I installed jmx on the remote server.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitoring Wildfly 14 and Java 10

Post by scottwilkerson »

In doing some googling on this error it is possible that rmi port isn't the same as the jmx port

See answer I found here
https://serverfault.com/questions/30866 ... -jmx-error
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked