Page 1 of 1

Remote restart java | JMXeval/NRPE

Posted: Wed Apr 09, 2014 7:26 pm
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

Re: Remote restart java | JMXeval/NRPE

Posted: Thu Apr 10, 2014 10:52 am
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?

Re: Remote restart java | JMXeval/NRPE

Posted: Wed Apr 23, 2014 9:32 am
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?

Re: Remote restart java | JMXeval/NRPE

Posted: Wed Apr 23, 2014 2:51 pm
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.

Re: Remote restart java | JMXeval/NRPE

Posted: Wed Apr 23, 2014 2:52 pm
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.