check_jvm plugin - Can't connect to the JVM

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
netanelp
Posts: 5
Joined: Mon Aug 02, 2021 3:47 am

check_jvm plugin - Can't connect to the JVM

Post by netanelp »

RESOLVED EDIT AT THE BOTTOM OF THE COMMENT

Hey guys,
I'm using check_jvm plugin with nagios 3.5.1 to monitor a server running Jira.
After a Jira software update I'm getting the following issue when trying to use the check.
Check command:
/usr/bin/sudo -u USER /usr/lib/nagios/plugins/check_jvm -p heap -n org.apache.catalina.startup.Bootstrap -p heap -w 13800000000 -c 14200000000
The output of this command:
UNKNOWN Can't connect to the JVM:
JVM pid: 36657
name: org.apache.catalina.startup.Bootstrap start
Exception: Non-numeric value found - int expected
I've tried to run this as root as well to make sure there was nothing changed with the permissions but i'm getting the same error.
Currently running Java version openjdk version "1.8.0_265"

Thanks!


EDIT:
As I did some more investigations I understood I needed to update the check_jvm plugin to a newer version(mine was from 2014),update the JvmInspector.jar to support java 11 and finally upgrade the java 8 on the machine to java 11.
Last edited by netanelp on Thu Feb 10, 2022 10:00 am, edited 1 time in total.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: check_jvm plugin - Can't connect to the JVM

Post by mcapra »

Which version of check_jvm are you using? Can you provide a copy of the plugin?

What version of Jira was previously used, and what version was it updated to?

Do you know what version of Tomcat/Java is being used by the Jira instance?

What is the output of these commands, executed from the CLI as root:

Code: Select all

java -jar "/opt/JvmInspector/JvmInspector.jar" "36657" 2>&1
Might need to change 36657 to whatever the current PID is for the Tomcat process, and your JvmInspector path if it's not what I provided above.
Former Nagios employee
https://www.mcapra.com/
netanelp
Posts: 5
Joined: Mon Aug 02, 2021 3:47 am

Re: check_jvm plugin - Can't connect to the JVM

Post by netanelp »

mcapra wrote:Which version of check_jvm are you using? Can you provide a copy of the plugin?

What version of Jira was previously used, and what version was it updated to?

Do you know what version of Tomcat/Java is being used by the Jira instance?

What is the output of these commands, executed from the CLI as root:

Code: Select all

java -jar "/opt/JvmInspector/JvmInspector.jar" "36657" 2>&1
Might need to change 36657 to whatever the current PID is for the Tomcat process, and your JvmInspector path if it's not what I provided above.
Hey,

Which version of check_jvm are you using? Can you provide a copy of the plugin?
---I wasn't able to find the version of the plugin,tried --version but got no results.

What version of Jira was previously used, and what version was it updated to?
--- Updated from 7.x.x to 8.20.5

Do you know what version of Tomcat/Java is being used by the Jira instance?
--- found on the Jira page 8.20 Application Server Apache Tomcat/8.5.65 Adopt OpenJDK 11.0.11+9


What is the output of these commands, executed from the CLI as root:

Code: Select all

java -jar "/opt/JvmInspector/JvmInspector.jar" "36657" 2>&1
Might need to change 36657 to whatever the current PID is for the Tomcat process, and your JvmInspector path if it's not what I provided above
--The Output of these commands are(as root)

Code: Select all

JVM pid: 32107
  name: org.apache.catalina.startup.Bootstrap start
Exception attaching or reading a jvm.well-known file /tmp/.java_pid32107 is not secure: file should be owned by the current user (which is 0) but is owned by 1001
When running the commands with UID 1001

Code: Select all

UNKNOWN Can't connect to the JVM:
JVM pid: 32107
  name: org.apache.catalina.startup.Bootstrap start
Exception: Non-numeric value found - int expected
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: check_jvm plugin - Can't connect to the JVM

Post by mcapra »

You might try upgrading your JvmInspector
Former Nagios employee
https://www.mcapra.com/
Locked