Cant Launch Nagios Daemon - HELP :)

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.
Dualsweat
Posts: 13
Joined: Mon Oct 07, 2013 2:44 pm

Re: Cant Launch Nagios Daemon - HELP :)

Post by Dualsweat »

Hi Guys,

Any news on how to access the Web UI? Or, should I create a separate thread for that?

Thanks,

Matt M.-----
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Cant Launch Nagios Daemon - HELP :)

Post by tmcdonald »

Although I don't know the answer myself, I have seen this problem before at home. If a website is trying to give you the source code for a page as opposed to your browser viewing the page normally, it is a MIME type issue. MIME types basically let the server know if the file is plain text, HTML, an image, or code to be executed. In your case, it looks like the server is treating PHP code as something to be downloaded, possibly plain text.

I'm talking with a co-worker about this now to see if it is a known nagios issue or a general server misconfiguration.
Former Nagios employee
owls
Posts: 3
Joined: Tue Oct 08, 2013 10:27 am

Re: Cant Launch Nagios Daemon - HELP :)

Post by owls »

I'm having the same problem and substituted your "hack-ish" script for the original init script. I keep getting a "Permission denied" error when I try /etc/init.d/nagios start. I tried chowning to nagios:nagios from root:root, but that didn't help. Who should own the script?

Thanks.
Dualsweat
Posts: 13
Joined: Mon Oct 07, 2013 2:44 pm

Re: Cant Launch Nagios Daemon - HELP :)

Post by Dualsweat »

Hi Owls,

Perhaps this will help you?

root@PowerEdge-1850-1:/etc/init.d# ls -ltr |grep -i nagios
-rw-r--r-- 1 root root 11592 Oct 7 16:09 ent Nagios Core Development Team and Community Contributors
-rwxr-xr-x 1 root root 3303 Oct 7 16:54 nagios.bak
-rwxr-xr-x 1 root root 3411 Oct 7 16:57 nagios

root@PowerEdge-1850-1:/etc/init.d# /etc/init.d/nagios restart
Stopping nagios:
Starting nagios:
root@PowerEdge-1850-1:/etc/init.d#

Thank You,

Matt M.--
owls
Posts: 3
Joined: Tue Oct 08, 2013 10:27 am

Re: Cant Launch Nagios Daemon - HELP :)

Post by owls »

Never mind. Dumb mistake.
owls
Posts: 3
Joined: Tue Oct 08, 2013 10:27 am

Re: Cant Launch Nagios Daemon - HELP :)

Post by owls »

Thanks, Matt. Yeah, I had the file permissions wrong.

New problem though; I get a 404 when I try the web interface. I already have apache installed on this server for simple machines forum (SMF) and I'm thinking that I need to add directives to the conf file as described at http://www.unixmen.com/install-nagios-u ... x-and-10x/. I want to make sure I don't break anything that would affect SMF. I think I can just add the ScriptAlias, etc to my VirtualHost directive, but I wanted to check before I screw anything up. The suggested changes to the conf file are

--------------------------------------------------------------
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin

Options ExecCGI

AllowOverride None

Order allow,deny

Allow from all

AuthType Basic

AuthUserFile /usr/local/nagios/etc/htpasswd.users

Require valid-user

Alias /nagios /usr/local/nagios/share

Options None

AllowOverride None

Order allow,deny

Allow from all

AuthType Basic

AuthUserFile /usr/local/nagios/etc/htpasswd.users

Require valid-user
--------------------------------------------------------------

I do want to use htpasswd, so that's fine. Don't the options (Allow, Order, etc.) need to be in a <Directory> directive?

I realize this is really apache stuff, but I thought I'd try asking here first.

Thanks.

Owls
Dualsweat
Posts: 13
Joined: Mon Oct 07, 2013 2:44 pm

Re: Cant Launch Nagios Daemon - HELP :)

Post by Dualsweat »

Hi Owls,

To be honest, I have no idea. You might be better off starting a whole new thread for that question so you can get some more eyes on it. :-/

Thanks,

Matt M.-----
Dualsweat
Posts: 13
Joined: Mon Oct 07, 2013 2:44 pm

Re: Cant Launch Nagios Daemon - HELP :)

Post by Dualsweat »

Ok Guys,

I resolved this issue. We can close this out.

I must have missed the install for libapache2-mod-php5.
I installed it and everything is working now.

Thanks!

Matt M.------
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Cant Launch Nagios Daemon - HELP :)

Post by sreinhardt »

Locking thread, thanks for the heads up. Owls if your issue persists, please open a new thread.
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.
Locked