Internal Server Error on Fresh Installation

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.
dwp
Posts: 9
Joined: Mon Jul 01, 2013 12:26 pm

Re: Internal Server Error on Fresh Installation

Post by dwp »

sreinhardt wrote:Your config looks great! Lets check permissions on the the cgi files and such then.

Code: Select all

ll /usr/local/nagios/sbin
ll /usr/local/nagios/share
Ok!

Code: Select all

root@machine:~# ll /usr/local/nagios/sbin/
total 3968
drwxrwxr-x. 2 nagios nagios   4096 Jun 26 10:51 ./
drwxr-xr-x  9 root   root     4096 Jun 26 11:05 ../
-rwxrwxr-x. 1 nagios nagios 281296 Jun 26 10:51 avail.cgi*
-rwxrwxrw-. 1 nagios nagios 275792 Jun 26 10:51 cmd.cgi*
-rwxrwxr-x. 1 nagios nagios 248448 Jun 26 10:51 config.cgi*
-rwxrwxr-x. 1 nagios nagios 289456 Jun 26 10:51 extinfo.cgi*
-rwxrwxr-x. 1 nagios nagios 240440 Jun 26 10:51 histogram.cgi*
-rwxrwxr-x. 1 nagios nagios 219824 Jun 26 10:51 history.cgi*
-rwxrwxr-x. 1 nagios nagios 219808 Jun 26 10:51 notifications.cgi*
-rwxrwxr-x. 1 nagios nagios 211576 Jun 26 10:51 outages.cgi*
-rwxrwxr-x. 1 nagios nagios 215688 Jun 26 10:51 showlog.cgi*
-rwxrwxr-x. 1 nagios nagios 289480 Jun 26 10:51 status.cgi*
-rwxrwxr-x. 1 nagios nagios 236408 Jun 26 10:51 statusmap.cgi*
-rwxrwxr-x. 1 nagios nagios 232128 Jun 26 10:51 statuswml.cgi*
-rwxrwxr-x. 1 nagios nagios 215712 Jun 26 10:51 statuswrl.cgi*
-rwxrwxr-x. 1 nagios nagios 240344 Jun 26 10:51 summary.cgi*
-rwxrwxr-x. 1 nagios nagios 232144 Jun 26 10:51 tac.cgi*
-rwxrwxr-x. 1 nagios nagios 248632 Jun 26 10:51 trends.cgi*
root@machine:~# ll /usr/local/nagios/share/
total 80
drwxrwxr-x 11 nagios nagios 4096 Jul  1 20:20 ./
drwxr-xr-x  9 root   root   4096 Jun 26 11:05 ../
-rw-rw-r--  1 nagios nagios  576 Jun 26 10:51 config.inc.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 contexthelp/
drwxrwxr-x  3 nagios nagios 4096 Jun 26 10:51 docs/
drwxrwxr-x  3 nagios nagios 4096 Jun 26 10:51 images/
drwxrwxr-x  3 nagios nagios 4096 Jun 26 10:51 includes/
-rw-rw-r--  1 nagios nagios 1608 Jun 26 10:51 index.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 js/
drwxr-xr-x  4 root   root   4096 Jun 26 11:05 locale/
-rw-rw-r--  1 nagios nagios 5862 Jun 26 10:51 main.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 media/
-rw-rw-r--  1 nagios nagios   26 Jun 26 10:51 robots.txt
-rw-rw-r--  1 nagios nagios  941 Jun 26 10:51 rss-corefeed.php
-rw-rw-r--  1 nagios nagios  995 Jun 26 10:51 rss-newsfeed.php
-rw-rw-r--  1 nagios nagios 5756 Jun 26 10:51 side.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 ssi/
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 stylesheets/
root@machine:~# 
Thank you!
dwp
Posts: 9
Joined: Mon Jul 01, 2013 12:26 pm

Re: Internal Server Error on Fresh Installation

Post by dwp »

dwp wrote:
sreinhardt wrote:Your config looks great! Lets check permissions on the the cgi files and such then.

Code: Select all

ll /usr/local/nagios/sbin
ll /usr/local/nagios/share
Ok!

Code: Select all

root@machine:~# ll /usr/local/nagios/sbin/
total 3968
drwxrwxr-x. 2 nagios nagios   4096 Jun 26 10:51 ./
drwxr-xr-x  9 root   root     4096 Jun 26 11:05 ../
-rwxrwxr-x. 1 nagios nagios 281296 Jun 26 10:51 avail.cgi*
-rwxrwxrw-. 1 nagios nagios 275792 Jun 26 10:51 cmd.cgi*
-rwxrwxr-x. 1 nagios nagios 248448 Jun 26 10:51 config.cgi*
-rwxrwxr-x. 1 nagios nagios 289456 Jun 26 10:51 extinfo.cgi*
-rwxrwxr-x. 1 nagios nagios 240440 Jun 26 10:51 histogram.cgi*
-rwxrwxr-x. 1 nagios nagios 219824 Jun 26 10:51 history.cgi*
-rwxrwxr-x. 1 nagios nagios 219808 Jun 26 10:51 notifications.cgi*
-rwxrwxr-x. 1 nagios nagios 211576 Jun 26 10:51 outages.cgi*
-rwxrwxr-x. 1 nagios nagios 215688 Jun 26 10:51 showlog.cgi*
-rwxrwxr-x. 1 nagios nagios 289480 Jun 26 10:51 status.cgi*
-rwxrwxr-x. 1 nagios nagios 236408 Jun 26 10:51 statusmap.cgi*
-rwxrwxr-x. 1 nagios nagios 232128 Jun 26 10:51 statuswml.cgi*
-rwxrwxr-x. 1 nagios nagios 215712 Jun 26 10:51 statuswrl.cgi*
-rwxrwxr-x. 1 nagios nagios 240344 Jun 26 10:51 summary.cgi*
-rwxrwxr-x. 1 nagios nagios 232144 Jun 26 10:51 tac.cgi*
-rwxrwxr-x. 1 nagios nagios 248632 Jun 26 10:51 trends.cgi*
root@machine:~# ll /usr/local/nagios/share/
total 80
drwxrwxr-x 11 nagios nagios 4096 Jul  1 20:20 ./
drwxr-xr-x  9 root   root   4096 Jun 26 11:05 ../
-rw-rw-r--  1 nagios nagios  576 Jun 26 10:51 config.inc.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 contexthelp/
drwxrwxr-x  3 nagios nagios 4096 Jun 26 10:51 docs/
drwxrwxr-x  3 nagios nagios 4096 Jun 26 10:51 images/
drwxrwxr-x  3 nagios nagios 4096 Jun 26 10:51 includes/
-rw-rw-r--  1 nagios nagios 1608 Jun 26 10:51 index.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 js/
drwxr-xr-x  4 root   root   4096 Jun 26 11:05 locale/
-rw-rw-r--  1 nagios nagios 5862 Jun 26 10:51 main.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 media/
-rw-rw-r--  1 nagios nagios   26 Jun 26 10:51 robots.txt
-rw-rw-r--  1 nagios nagios  941 Jun 26 10:51 rss-corefeed.php
-rw-rw-r--  1 nagios nagios  995 Jun 26 10:51 rss-newsfeed.php
-rw-rw-r--  1 nagios nagios 5756 Jun 26 10:51 side.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 ssi/
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 stylesheets/
root@machine:~# 
Thank you!
no more ideas ? :S
I need solution, please.

Thank you in advance!
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Internal Server Error on Fresh Installation

Post by sreinhardt »

Do your files in sbin, actually have *'s after them or is that and oddity of the shell you are using? Otherwise your permissions look great as well. Just to confirm, did you do the tail -f commands while attempting to view pages that error? Let's also check your users and be sure thats ok.

cat /etc/group| grep nag
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
dwp
Posts: 9
Joined: Mon Jul 01, 2013 12:26 pm

Re: Internal Server Error on Fresh Installation

Post by dwp »

sreinhardt wrote:Do your files in sbin, actually have *'s after them or is that and oddity of the shell you are using? Otherwise your permissions look great as well. Just to confirm, did you do the tail -f commands while attempting to view pages that error? Let's also check your users and be sure thats ok.

cat /etc/group| grep nag
At least in Ubuntu, this *'s means that it is an executable file. This is not oddity. My shell is a simple Bash.

Yes, confirmed, I have done tail -f commands while attempting to view pages that error.

Code: Select all

root@machine:~# cat /etc/group | grep nag
nagios:x:121:nagios
nagcmd:x:1007:www-data
This is very difficult... I thought it Nagios installation would be much easier, really :S
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Internal Server Error on Fresh Installation

Post by sreinhardt »

Ah I see, not an ubuntu person myself and other distro's don't seem to include that bit. Let's try adding www-data to the nagios group and restarting apache. At this point I don't believe apache would have access to the nagios files despite being in the nagcmd group.

Code: Select all

usermod -a -G nagios www-data
service apache2 restart
Does it begin to work now?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
dwp
Posts: 9
Joined: Mon Jul 01, 2013 12:26 pm

Re: Internal Server Error on Fresh Installation

Post by dwp »

sreinhardt wrote:Ah I see, not an ubuntu person myself and other distro's don't seem to include that bit. Let's try adding www-data to the nagios group and restarting apache. At this point I don't believe apache would have access to the nagios files despite being in the nagcmd group.

Code: Select all

usermod -a -G nagios www-data
service apache2 restart
Does it begin to work now?

Code: Select all

root@machine:~# usermod -a -G nagios www-data
root@machine:~# service apache2 restart
 * Restarting web server apache2
 ... waiting    ...done.
And the error still appears... :S
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Internal Server Error on Fresh Installation

Post by abrist »

You really should have some errors in the apache error_log or system messages.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked