Hi ,
I am executing check_jvm.sh plugin in our tomcat server as root user. But it throw below error,
"UNKNOWN JVM is running with different username, run this script with UID 1011"
I couldnot get the output.
Please do the needful.
Thanks,
Nagarajan.M
UNKNOWN JVM is running with different username, run this scr
Re: UNKNOWN JVM is running with different username, run this
You can search the /etc/passwd file on that server for the UID to see what username it is expecting.
Run this as root to get the username
Then you would have to change the owner of the script using that username found from the above command using this example.
Try that and see if it fixes the issue.
Run this as root to get the username
Code: Select all
grep 1011 /etc/passwdCode: Select all
chown username check_jvm.shBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: UNKNOWN JVM is running with different username, run this
Hi ,
I tried above one. I got same error.
tomcat
1011:301::/home/tomcat:/bin/bash
-rwxrwxrwx 1 tomcat nagios 6580 May 18 16:03 check_jvm.sh
[root@sesklshrddev01 plugins]# ./check_jvm.sh -n Tomcat_BioHazardDev -p heap -w 80 -c 90
UNKNOWN JVM is running with different username, run this script with UID 1011
Please help me
I tried above one. I got same error.
tomcat
-rwxrwxrwx 1 tomcat nagios 6580 May 18 16:03 check_jvm.sh
[root@sesklshrddev01 plugins]# ./check_jvm.sh -n Tomcat_BioHazardDev -p heap -w 80 -c 90
UNKNOWN JVM is running with different username, run this script with UID 1011
Please help me
Re: UNKNOWN JVM is running with different username, run this
One thing I found in the documentation for the plugin, you need to use sudo to run it as the tomcat user which will make it match the service running as the tomcat user as well.
You would have to edit the command defined in nagios like the example below which will run the plugin as the tomcat user.
Try that and if you have any questions, let us know.
You would have to edit the command defined in nagios like the example below which will run the plugin as the tomcat user.
Code: Select all
/usr/bin/sudo -u tomcat /usr/local/nagios/libexec/check_jvm.sh -n Tomcat_BioHazardDev -p heap -w 80 -c 90Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: UNKNOWN JVM is running with different username, run this
Hi,
I cannot run from nagios server ( Remote server)
Can you help me.
I cannot run from nagios server ( Remote server)
Can you help me.
Re: UNKNOWN JVM is running with different username, run this
If you are using the NRPE agent to run the check on the remote system, you would have to edit the /etc/sudoers file on the remote server and add the following entry
Then the command that is defined in the nrpe.cfg file would look like the example below.
Then restart the NRPE Agent and see if this fixes the issue for you.
Take a look at the README file for that plugin at this link.
https://fidanov.net/c0d3/nagios-plugins ... tor/README
Code: Select all
nagios ALL=(ALL) NOPASSWD: /usr/local/nagios/libexec/check_jvm.shCode: Select all
command[tomcat_heap]=/usr/bin/sudo -u tomcat /usr/local/nagios/libexec/check_jvm.sh -n Tomcat_BioHazardDev -p heap -w 80 -c 90Take a look at the README file for that plugin at this link.
https://fidanov.net/c0d3/nagios-plugins ... tor/README
Be sure to check out our Knowledgebase for helpful articles and solutions!