Page 1 of 1

check_tomcat.pl doesn't work

Posted: Tue Jan 19, 2021 2:25 am
by Frédéric GRANAT
Hi,

/usr/local/nagios/libexec/check_tomcat.pl -H xxxxx -p xxxx -l xxxxxx -a xxxxxxx -w 25%,5% -c 10%,2%
CRITICAL: http://xxxxxxxxx:xxxx/manager/status?XML=true HTTP/1.1 403 Forbidden

Please read the post I opened in 2018.
I always have that problem on a particular server.
Ports are opened ont the server firewall.

Do you have any idea to diagnose that problem ?

Re: check_tomcat.pl doesn't work

Posted: Wed Jan 20, 2021 10:30 am
by vtrac
Hi Frédéric GRANAT,
The 403 Forbidden error telling you that Tomcat is blocking the connection and not allowing the Nagios server to connect.

Please check your logs for more details as that will give you more details info.

Also, please check with your network team and see if it is allow outside connection to your tomcat.

There are three common causes for this error. Here they are listed from most likely to least likely:
-An empty website directory
-No index page
-Permission / Ownership error

Regards,
Vinh

Re: check_tomcat.pl doesn't work

Posted: Thu Jan 21, 2021 4:12 am
by Frédéric GRANAT
Hi,
Thanks,
Please check your logs for more details as that will give you more details info.
Could you please tell me where these logs are ?

Re: check_tomcat.pl doesn't work

Posted: Thu Jan 21, 2021 7:19 pm
by ssax
You would need to reach out to your Tomcat admins in order to find out where the tomcat logs are stored on that system, we have limited Tomcat experience.

You can try this:

https://community.wegalvanize.com/s/art ... uage=en_US

You may need to reach out to Tomcat support on this.

Re: check_tomcat.pl doesn't work

Posted: Fri Jan 22, 2021 2:51 am
by Frédéric GRANAT
Hi,

I'm going to check the logs
Could you please tell me which tomcat role is required in order a tomcat user can run check_tomcat.pl ?

Re: check_tomcat.pl doesn't work

Posted: Fri Jan 22, 2021 1:15 pm
by vtrac
Hi Frédéric GRANAT,
I believe your Tomcat's user must belong to the "nagios" group.

Here's an example of user "apache" running http on our XI machine:

Code: Select all

grep apache /etc/group

apache:x:48:
nagios:x:1001:nagios,apache,snmptt
nagcmd:x:1002:nagios,apache,snmptt
Regards,
Vinh