Page 1 of 1

check_jvm plugin - Can't connect to the JVM

PostPosted: Mon Feb 07, 2022 4:16 am
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.

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

PostPosted: Tue Feb 08, 2022 7:58 pm
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.

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

PostPosted: Wed Feb 09, 2022 9:29 am
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

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

PostPosted: Mon Feb 14, 2022 4:12 pm
by mcapra
You might try upgrading your JvmInspector