Remote restart java | JMXeval/NRPE

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
edwardzg
Posts: 21
Joined: Fri Jan 10, 2014 5:11 am

Remote restart java | JMXeval/NRPE

Post by edwardzg »

Hi,

After restarting java (on windows host) using event_handler when RAM usage is at 100% (check RAM using the plugin jmxeval) during 10 minutes, calling all external scripts (from Nagios RH server) is not possible and in any event ends the following information:

Code: Select all

The command (scripts/check_jmxeval.bat scriptsj/mxeval_jb.xml) returned an invalid return code: -1073741502 
For runcmd.bat is that info:

Code: Select all

The command (scripts/runcmd.bat) returned an invalid return code: -1073741502 
Anyone has that problem? Any idea will be appreciated :)

P.S. Only restart Windows machine restores the communication server<->host by nrpe.


Regards,
Piotr
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Remote restart java | JMXeval/NRPE

Post by abrist »

If memory is fully utilized, you may have issues with certain applications. If you fire off your event handler when memory usage is at <=98%, do you still get those errors?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
edwardzg
Posts: 21
Joined: Fri Jan 10, 2014 5:11 am

Re: Remote restart java | JMXeval/NRPE

Post by edwardzg »

To perform the tests I don't wait until the memory usage will be at >98%. Only changing the Warning and Critical values ​​in the file .xml to lower. Jmxeval service got Critical status and restart java service on windows host.

When java restart finished i lose connection by nrpe port between windows host and Nagios server, similar to this situation https://nsclient.org/nscp/ticket/685 Helps only restart the virtual machine or closing all our java.exe serices on windows host

Any idea what is the problem?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Remote restart java | JMXeval/NRPE

Post by slansing »

Odd, so you are losing connectivity to NRPE via NSClient++ when you restart java? That should have no impact on access to NSClient++, this is just java correct? You are not restarting any sub-let type services or processes along with it? I don't think NSClient++ uses java itself.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Remote restart java | JMXeval/NRPE

Post by sreinhardt »

Based on the issue that you posted, it sounds like an issue with nsclient killing child processes and closing sockets correctly. I don't think its a java specific thing, although it may be possible nsclient has other issues with network\local sockets too. Especially if he rewrote a function that is used for multiple connection types and did so improperly.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked