HTTP Errors since 1.8 upgrade

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
SDohmen
Posts: 240
Joined: Thu Jun 30, 2011 4:14 am

HTTP Errors since 1.8 upgrade

Post by SDohmen »

Ever since the last upgrade 1.8 i am getting lots of errors in the http files and also sometimes it just wont connect to the central.

Some of the errors include:

Code: Select all

[Wed Nov 09 08:06:21 2011] [error] [client *] PHP Notice:  A session had already been started - ignoring session_start() in /usr/local/nagiosxi/html/includes/utils.inc.php on line 88
[Wed Nov 09 08:06:21 2011] [error] [client *] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132
[Wed Nov 09 08:06:21 2011] [error] [client *] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132
[Wed Nov 09 08:06:21 2011] [error] [client *] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132
[Wed Nov 09 08:06:21 2011] [error] [client *] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132
[Wed Nov 09 08:06:21 2011] [error] [client *] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132
[Wed Nov 09 08:06:21 2011] [error] [client *] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132
[Wed Nov 09 08:06:22 2011] [error] [client *] PHP Notice:  A session had already been started - ignoring session_start() in /usr/local/nagiosxi/html/includes/utils.inc.php on line 88, referer: https://*/nagiosxi/includes/components/xicore/status.php?show=map&layout=3
[Wed Nov 09 08:06:22 2011] [error] [client *] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132, referer: https://*/nagiosxi/includes/components/xicore/status.php?show=map&layout=3
[Wed Nov 09 08:06:22 2011] [error] [client *] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132, referer: https://*/nagiosxi/includes/components/xicore/status.php?show=map&layout=3
[Wed Nov 09 08:06:22 2011] [error] [client *] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132, referer: https://*/nagiosxi/includes/components/xicore/status.php?show=map&layout=3
[Wed Nov 09 08:06:22 2011] [error] [client *] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132, referer: https://*/nagiosxi/includes/components/xicore/status.php?show=map&layout=3
[Wed Nov 09 08:06:22 2011] [error] [client *] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132, referer: https://*/nagiosxi/includes/components/xicore/status.php?show=map&layout=3
[Wed Nov 09 08:06:33 2011] [error] [client *] PHP Notice:  Undefined variable: services_event_handler_disabled in /usr/local/nagiosxi/html/includes/components/xicore/ajaxhelpers-tac.inc.php on line 723, referer: https://*/nagiosxi/includes/components/xicore/tac.php

Some other errors include bad requests or missing css files etc. I will try to add those when i get them later on.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: HTTP Errors since 1.8 upgrade

Post by mguthrie »

I think this might be related to SSL with the Nagios cgi's. Can you check to see if you're set to the following config in /usr/local/nagios/etc/cgi.cfg?

Code: Select all

use_ssl_authentication=1
SDohmen
Posts: 240
Joined: Thu Jun 30, 2011 4:14 am

Re: HTTP Errors since 1.8 upgrade

Post by SDohmen »

I just checked and it seems that wasn't set to 1. I changed it now so lets hope that fixes it :)
SDohmen
Posts: 240
Joined: Thu Jun 30, 2011 4:14 am

Re: HTTP Errors since 1.8 upgrade

Post by SDohmen »

It seems it didn't matter.

I am still getting lots of errors in the httpd file. What is worse is that the network status map stopped working for some reason.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: HTTP Errors since 1.8 upgrade

Post by mguthrie »

My bet is that the network status map stopped working from the change I suggested in the cgi.cfg file. Go ahead and switch it back for now. I'm pretty sure there's an SSL certificate issue there, and I'm guessing it's probably related to the apache settings for the /nagios alias. However, we'll have to test in our SSL environment and see if we can figure out where that might be going wrong. Just to verify, did you set up your SSL according to our doc?
http://library.nagios.com/library/produ ... -nagios-xi
SDohmen
Posts: 240
Joined: Thu Jun 30, 2011 4:14 am

Re: HTTP Errors since 1.8 upgrade

Post by SDohmen »

That setting fixed it.

For most part i did use the settings as supplied in your docs but the change i made is i used 1 cfg file instead of 10 loose ones. This was so i could get nrdp to work.

a full printout of the cfg is as follows:

Code: Select all

<VirtualHost *:80>
        ServerName *
        #ServerAlias *
        ServerAdmin webmaster@*

        RewriteEngine On
        RedirectPermanent / https://*/
</VirtualHost>

<VirtualHost *:443>
        ServerName *
        #ServerAlias *
        ServerAdmin webmaster@*

        SSLEngine On
        SSLCertificateFile /etc/httpd/conf.d/*.cer
        SSLCACertificateFile /etc/httpd/conf.d/*.cer
        SSLCertificateKeyFile /etc/httpd/conf.d/*.key

        DocumentRoot /var/www/html
        <Directory /var/www/html/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

	<Directory "/usr/local/nagios/sbin">
	#  SSLRequireSSL
	   Options ExecCGI
	   AllowOverride None
	   Order allow,deny
	   Allow from all
	#  Order deny,allow
	#  Deny from all
	#  Allow from 127.0.0.1
	   AuthName "Nagios Core"
	   AuthType Basic
	   AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
	   Require valid-user
	</Directory>

	<Directory "/usr/local/nagios/share">
	#  SSLRequireSSL
	   Options None
	   AllowOverride None
	   Order allow,deny
	   Allow from all
	#  Order deny,allow
	#  Deny from all
	#  Allow from 127.0.0.1
	   AuthName "Nagios Core"
	   AuthType Basic
	   AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
	   Require valid-user
	</Directory>

	<Directory "/var/www/html/nagiosql">
	   Options None
	   AllowOverride None
	   Order allow,deny
	   Allow from all
	</Directory>

	
        <Directory "/usr/local/nagiosxi/html">
	   AllowOverride All
	</Directory>

	#<Directory "/usr/local/nagiosxi/html">
	#  SSLRequireSSL
	#   Options None
	#   AllowOverride None
	#   Order allow,deny
	#   Allow from all
	##  Order deny,allow
	##  Deny from all
	##  Allow from 127.0.0.1
	##   AuthName "Nagios XI"
	##   AuthType Basic
	##   AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
	##   Require valid-user
	#</Directory>

	<Directory "/usr/local/nrdp">
	  #SSLRequireSSL
	   Options None
	   AllowOverride None
	   Order allow,deny
	   Allow from all
	#  Order deny,allow
	#  Deny from all
	#  Allow from 127.0.0.1
	#   AuthName "NRDP"
	#   AuthType Basic
	#   AuthUserFile /usr/local/nrdp/htpasswd.users
	#  Require valid-user
	</Directory>

        LogLevel warn
        ErrorLog /var/log/httpd/error2.log
        CustomLog /var/log/httpd/access2.log combined
</VirtualHost>

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
Alias /nagios "/usr/local/nagios/share"
Alias /nagiosql "/var/www/html/nagiosql"
Alias /nagiosxi "/usr/local/nagiosxi/html"
Alias /nrdp "/usr/local/nrdp/server"

Alias /mrtg /var/www/mrtg

<Location /mrtg>
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    Allow from ::1
    # Allow from .example.com
</Location>

The * are just things i removed.
SDohmen
Posts: 240
Joined: Thu Jun 30, 2011 4:14 am

Re: HTTP Errors since 1.8 upgrade

Post by SDohmen »

I noticed something else on the status map aswell. Even though it looks like its working i still have the errors in the httpd log and for some reason it wont update the icons on some of the hosts. I tried changing the names to others but even there it wont help a thing.

[EDIT]
Well i got some more info. It seems the status map is completely static by now. Even if i add a host/service or change any of the hosts with icons nothing will change. Errors that i get when i do a tail command are:

Code: Select all

[Thu Nov 10 21:43:02 2011] [error] [client 172.16.*] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132
[Thu Nov 10 21:43:02 2011] [error] [client 172.16.*] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132
[Thu Nov 10 21:43:02 2011] [error] [client 172.16.*] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132
[Thu Nov 10 21:43:02 2011] [error] [client 172.16.*] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132
[Thu Nov 10 21:43:02 2011] [error] [client 84.*] PHP Notice:  A session had already been started - ignoring session_start() in /usr/local/nagiosxi/html/includes/utils.inc.php on line 88, referer: https://central.o4s.nl/nagiosxi/includes/components/xicore/status.php?show=map&layout=3
[Thu Nov 10 21:43:02 2011] [error] [client 84.*] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132, referer: https://central.*/nagiosxi/includes/components/xicore/status.php?show=map&layout=3
[Thu Nov 10 21:43:02 2011] [error] [client 84.*] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132, referer: https://central.*/nagiosxi/includes/components/xicore/status.php?show=map&layout=3
[Thu Nov 10 21:43:02 2011] [error] [client 84.*] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132, referer: https://central.*/nagiosxi/includes/components/xicore/status.php?show=map&layout=3
[Thu Nov 10 21:43:02 2011] [error] [client 84.*] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132, referer: https://central.*/nagiosxi/includes/components/xicore/status.php?show=map&layout=3
[Thu Nov 10 21:43:02 2011] [error] [client 84.*] PHP Warning:  substr() expects parameter 2 to be long, string given in /usr/local/nagiosxi/html/includes/components/nagioscore/coreuiproxy.inc.php on line 132, referer: https://central.*/nagiosxi/includes/components/xicore/status.php?show=map&layout=3

It worked fine before but today it just stopped working. The only thing i did was add the history component and the custom logo one.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: HTTP Errors since 1.8 upgrade

Post by mguthrie »

I'll have to do some testing and see if I can recreate this issue. I'm not really sure what the source of the issue is.
SDohmen
Posts: 240
Joined: Thu Jun 30, 2011 4:14 am

Re: HTTP Errors since 1.8 upgrade

Post by SDohmen »

If it helps we can do a remote session so you can see the problems and perhaps the solutions.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: HTTP Errors since 1.8 upgrade

Post by mguthrie »

I just retested the SSL setup according to our documentation on 1.8, and so far everything is working fine, and the network status map is displaying both maps ok. I even closed port 80 just to be safe. I'll look through your apache configs and compare them to what I've got, I'll see if that turns anything up.
Locked