Page 1 of 1
Nagios Web Interface
Posted: Fri Feb 13, 2015 9:35 am
by allanhillier
I have installed Nagios 4.0.8 on Centos6.5 and I'm getting a 404 Not Found error when trying to access the Web Interface.
The requested URL /nagios was not found on this server.
I confirmed nagios was running:
[root@nagios tmp]# service nagios status
nagios (pid 2953) is running...
When I ran the following command it says httpd is stopped:
[root@nagios tmp]# service httpd status
httpd is stopped
When I run "service httpd start " I get the following:
[root@nagios tmp]# service httpd start
Starting httpd: httpd: Syntax error on line 163 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_ldap.so into server: /etc/httpd/modules/mod_ldap.so: undefined symbol: apr_ldap_ssl_init
[FAILED]
We are using the following to start Apache:
/etc/init.d/apachectl start
[root@nagios tmp]# ps -ef|grep http
root 2636 1 0 Feb10 ? 00:00:03 /usr/local/apache2/bin/httpd -k start
daemon 30205 2636 0 10:13 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
daemon 30206 2636 0 10:13 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
daemon 30207 2636 0 10:13 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
daemon 30208 2636 0 10:13 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
daemon 30209 2636 0 10:13 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
daemon 30210 2636 0 10:13 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
root 30291 29582 0 10:23 pts/2 00:00:00 grep http
I verified that the firewall was disabled:
[root@nagios tmp]# service iptables status
iptables: Firewall is not running.
This is th output of my netstat command:
[root@nagios tmp]# netstat -tulpn | grep 80
tcp 0 0 :::80 :::* LISTEN 2636/httpd
I have installed Nagios on older operating systems with no issues but I think I used
service httpd start
instead of
/etc/init.d/apachectl start
Any help would be appreciated.
Thanks,
Allan
Re: Nagios Web Interface
Posted: Fri Feb 13, 2015 11:24 am
by scottwilkerson
The installer if you ran make all will likely have created the httpd config file in /etc/httpd/conf.d/nagios.conf
However looks like you are using a different / changes apache, you need to make sure your current apache2 configuration file is including the nagios.conf file
Re: Nagios Web Interface
Posted: Fri Jun 19, 2015 11:19 am
by whitest
I have similar problem. I just upgraded my Nagios from 4.0.6 to 4.0.8. Nagios upgraded successfully.
I used these commands:
Code: Select all
#./configure --with-command-group=nagcmd
#make all
#make install
#/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
#/sbin/service nagios restart
When I restarted HTTPD I recieved the error:
Code: Select all
Starting httpd: httpd: Syntax error on line 161 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_ldap.so into server: /etc/httpd/modules/mod_ldap.so: undefined symbol: apr_ldap_ssl_init
My System is CentOS release 5.9 (Final).
Apache/2.2.3
Could somebody help me?
Re: Nagios Web Interface
Posted: Fri Jun 19, 2015 11:27 am
by jolson
Starting httpd: httpd: Syntax error on line 161 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_ldap.so into server: /etc/httpd/modules/mod_ldap.so: undefined symbol: apr_ldap_ssl_init
Are you using ldap authentication with your Nagios server? If not, the fix might be as easy as commenting out the appropriate lines in /etc/httpd/conf/httpd.conf. If you are using ldap authentication, there are several possible causes. What does your httpd error log show?
Code: Select all
tail -n20 /var/log/httpd/error_log
Some possible solutions from the internet:
http://ubuntuforums.org/showthread.php?t=981837
http://ubuntuforums.org/showthread.php?t=1029393
Re: Nagios Web Interface
Posted: Fri Jun 19, 2015 11:37 am
by whitest
jolson wrote:Are you using ldap authentication with your Nagios server? If not, the fix might be as easy as commenting out the appropriate lines in /etc/httpd/conf/httpd.conf. If you are using ldap authentication, there are several possible causes. What does your httpd error log show?
Thank you for reply,
jolson.
Yes, I use LDAP-auth.
I tried some solutions, but without luck =|
My second the same server has been upgraded without issues. =| Hmm...
Re: Nagios Web Interface
Posted: Fri Jun 19, 2015 11:44 am
by jolson
Is there anything relevant in the httpd error log?
Some other possible solutions:
Export the LD library path:
Code: Select all
export LD_LIBRARY_PATH=/usr/lib
service apache2 restart
Check on the dependencies of mod_ldap:
Code: Select all
find / -name mod_ldap.so
ldd <location of mod_ldap>/mod_ldap.so
Please post the output of the above.
Re: Nagios Web Interface
Posted: Fri Jun 19, 2015 11:57 am
by whitest
jolson wrote:Is there anything relevant in the httpd error log?
Sorry I forgot pastle output error_log:
Code: Select all
[Fri Jun 19 11:16:34 2015] [error] [client 192.168.100.242] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Moscow' for 'FET/3.0/no DST' instead in /usr/local/nagios/share/index.php on line 53
[Fri Jun 19 11:16:35 2015] [error] [client 192.168.100.242] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Moscow' for 'FET/3.0/no DST' instead in /usr/local/nagios/share/main.php on line 224, referer: http://10.93.1.51/nagios/
[Fri Jun 19 13:59:48 2015] [error] [client 192.168.100.242] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Moscow' for 'FET/3.0/no DST' instead in /usr/local/nagios/share/index.php on line 53
[Fri Jun 19 13:59:49 2015] [error] [client 192.168.100.242] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Moscow' for 'FET/3.0/no DST' instead in /usr/local/nagios/share/main.php on line 224, referer: http://10.93.1.51/nagios/
[Fri Jun 19 14:59:21 2015] [error] [client 10.93.1.215] File does not exist: /var/www/html/favicon.ico
[Fri Jun 19 14:59:21 2015] [error] [client 10.93.1.215] File does not exist: /var/www/html/favicon.ico
[Fri Jun 19 15:41:27 2015] [warn] [client 10.93.1.215] [30894] auth_ldap authenticate: user nagios authentication failed; URI /nagios/cgi-bin/extinfo.cgi [User not found][No such object]
[Fri Jun 19 15:41:27 2015] [warn] [client 10.93.1.215] [30894] auth_ldap authenticate: user nagios authentication failed; URI /nagios/cgi-bin/extinfo.cgi [User not found][No such object]
[Fri Jun 19 15:41:27 2015] [error] [client 10.93.1.215] user nagios not found: /nagios/cgi-bin/extinfo.cgi
[Fri Jun 19 15:41:31 2015] [warn] [client 10.93.1.215] [8817] auth_ldap authenticate: user default authentication failed; URI /nagios/cgi-bin/extinfo.cgi [User not found][No such object]
[Fri Jun 19 15:41:32 2015] [warn] [client 10.93.1.215] [8817] auth_ldap authenticate: user default authentication failed; URI /nagios/cgi-bin/extinfo.cgi [User not found][No such object]
[Fri Jun 19 15:41:32 2015] [error] [client 10.93.1.215] user default not found: /nagios/cgi-bin/extinfo.cgi
[Fri Jun 19 15:41:35 2015] [warn] [client 10.93.1.215] [1795] auth_ldap authenticate: user guest authentication failed; URI /nagios/cgi-bin/extinfo.cgi [Empty password not allowed][Invalid credentials]
[Fri Jun 19 15:41:35 2015] [error] [client 10.93.1.215] user guest: authentication failure for "/nagios/cgi-bin/extinfo.cgi": Password Mismatch
[Fri Jun 19 17:54:45 2015] [error] [client 192.168.100.242] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Moscow' for 'FET/3.0/no DST' instead in /usr/local/nagios/share/index.php on line 53
[Fri Jun 19 17:54:45 2015] [error] [client 192.168.100.242] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Moscow' for 'FET/3.0/no DST' instead in /usr/local/nagios/share/main.php on line 224, referer: http://10.93.1.51/nagios/
[Fri Jun 19 19:04:29 2015] [notice] caught SIGTERM, shutting down
Code: Select all
export LD_LIBRARY_PATH=/usr/lib
service httpd restart
No helped.
Code: Select all
# find / -name mod_ldap.so
/usr/lib/httpd/modules/mod_ldap.so
oO... After "find / -name mod_ldap.so" I can start httpd as usualy =) Awesome!
Re: Nagios Web Interface
Posted: Fri Jun 19, 2015 12:11 pm
by jolson
oO... After "find / -name mod_ldap.so" I can start httpd as usualy =) Awesome!
Did that resolve the issue you were having? If so, are we good to lock this case?
Re: Nagios Web Interface
Posted: Fri Jun 19, 2015 12:16 pm
by whitest
Yes, let's lock.
Thank you very much!