500 error after upgrade to 5.4.10
Posted: Thu Sep 21, 2017 12:38 am
When upgrading NagiosXI 5.4.9 -> NagiosXI 5.4.10 on CentOS 7.4.1708, I encountered a 500 error listing the following errors in /var/log/httpd/ssl_error_log:
[Thu Sep 21 00:59:53.210883 2017] [:error] [pid 27058] [client 10.150.73.108:60598] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0, referer: https://ashentlmon-d01.advisory.com/nag ... splash.php
[Thu Sep 21 00:59:53.210908 2017] [:error] [pid 27058] [client 10.150.73.108:60598] PHP Fatal error: Unknown: Failed opening required '/usr/local/nagiosxi/html/ajaxhelper.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0, referer: https://ashentlmon-d01.advisory.com/nag ... splash.php
[Thu Sep 21 00:59:53.211571 2017] [:error] [pid 27059] [client 10.150.73.108:60600] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0, referer: https://ashentlmon-d01.advisory.com/nag ... splash.php
[Thu Sep 21 00:59:53.211595 2017] [:error] [pid 27059] [client 10.150.73.108:60600] PHP Fatal error: Unknown: Failed opening required '/usr/local/nagiosxi/html/ajaxhelper.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0, referer: https://ashentlmon-d01.advisory.com/nag ... splash.php
[Thu Sep 21 00:59:53.212217 2017] [:error] [pid 27554] [client 10.150.73.108:60599] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0, referer: https://ashentlmon-d01.advisory.com/nag ... splash.php
[Thu Sep 21 00:59:53.212290 2017] [:error] [pid 27554] [client 10.150.73.108:60599] PHP Fatal error: Unknown: Failed opening required '/usr/local/nagiosxi/html/ajaxhelper.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0, referer: https://ashentlmon-d01.advisory.com/nag ... splash.php
I managed to get this working, but figured I'd share for anyone who runs into the same problem. Here's how I fixed the issue:
In the directory where I unpacked the nagiosxi installation tar.gz, I edited install-templates (this was the last file executed before the error occurred) from:
# Reconfigure Nagios
(
cd "$proddir/scripts"
./reconfigure_nagios.sh
)
TO:
# Reconfigure Nagios
(
cd "$proddir/scripts"
chmod -R 755 /usr/local/nagiosxi/html *
service httpd restart
./reconfigure_nagios.sh
)
Now, of course this is sub-optimal, but indeed it did let me get past the actual error. Hope this helps someone.
[Thu Sep 21 00:59:53.210883 2017] [:error] [pid 27058] [client 10.150.73.108:60598] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0, referer: https://ashentlmon-d01.advisory.com/nag ... splash.php
[Thu Sep 21 00:59:53.210908 2017] [:error] [pid 27058] [client 10.150.73.108:60598] PHP Fatal error: Unknown: Failed opening required '/usr/local/nagiosxi/html/ajaxhelper.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0, referer: https://ashentlmon-d01.advisory.com/nag ... splash.php
[Thu Sep 21 00:59:53.211571 2017] [:error] [pid 27059] [client 10.150.73.108:60600] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0, referer: https://ashentlmon-d01.advisory.com/nag ... splash.php
[Thu Sep 21 00:59:53.211595 2017] [:error] [pid 27059] [client 10.150.73.108:60600] PHP Fatal error: Unknown: Failed opening required '/usr/local/nagiosxi/html/ajaxhelper.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0, referer: https://ashentlmon-d01.advisory.com/nag ... splash.php
[Thu Sep 21 00:59:53.212217 2017] [:error] [pid 27554] [client 10.150.73.108:60599] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0, referer: https://ashentlmon-d01.advisory.com/nag ... splash.php
[Thu Sep 21 00:59:53.212290 2017] [:error] [pid 27554] [client 10.150.73.108:60599] PHP Fatal error: Unknown: Failed opening required '/usr/local/nagiosxi/html/ajaxhelper.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0, referer: https://ashentlmon-d01.advisory.com/nag ... splash.php
I managed to get this working, but figured I'd share for anyone who runs into the same problem. Here's how I fixed the issue:
In the directory where I unpacked the nagiosxi installation tar.gz, I edited install-templates (this was the last file executed before the error occurred) from:
# Reconfigure Nagios
(
cd "$proddir/scripts"
./reconfigure_nagios.sh
)
TO:
# Reconfigure Nagios
(
cd "$proddir/scripts"
chmod -R 755 /usr/local/nagiosxi/html *
service httpd restart
./reconfigure_nagios.sh
)
Now, of course this is sub-optimal, but indeed it did let me get past the actual error. Hope this helps someone.