Page 1 of 2
Monitoring Wildfly 14 and Java 10
Posted: Mon Feb 18, 2019 2:35 am
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
Re: Monitoring Wildfly 14 and Java 10
Posted: Mon Feb 18, 2019 4:05 pm
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
Re: Monitoring Wildfly 14 and Java 10
Posted: Wed Feb 20, 2019 3:24 am
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..
Re: Monitoring Wildfly 14 and Java 10
Posted: Wed Feb 20, 2019 4:59 pm
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?
Re: Monitoring Wildfly 14 and Java 10
Posted: Thu Feb 21, 2019 2:39 am
by eSailVite
Hi,
The 9990 port is open.
look at the imagen
Regards
Re: Monitoring Wildfly 14 and Java 10
Posted: Thu Feb 21, 2019 8:15 am
by scottwilkerson
Is the firewall open on that port as well?
Re: Monitoring Wildfly 14 and Java 10
Posted: Fri Feb 22, 2019 2:22 am
by eSailVite
Hi,
The port is open as well.
Re: Monitoring Wildfly 14 and Java 10
Posted: Fri Feb 22, 2019 2:27 pm
by scottwilkerson
You have ./check_jmx installed on the remote machine right? Not the Nagios server right?
Re: Monitoring Wildfly 14 and Java 10
Posted: Tue Feb 26, 2019 5:02 am
by eSailVite
Hi,
Yes... I installed jmx on the remote server.
Re: Monitoring Wildfly 14 and Java 10
Posted: Tue Feb 26, 2019 11:41 am
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