wproc: stderr line 03: PHP Fatal error: Cannot redeclare parse_argv() (previously declared in /usr/local/nagiosxi/scripts/handle_nagioscore.inc.php:113) in /usr/local/nagiosxi/html/includes/utilsx.inc.php on line 330
Hi, @benhank. I would like to get some context of this error before making a conclusion. How long have you seen this error? Does it go away with a server reboot? Do you recall any events with this XI server before you started seeing this error?
Could you also send in your system profile so that I can review it?
To send us your system profile. Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and send it in a private message.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
How long have you seen this error?
Its odd. according to nls its been happening for about a week.
Does it go away with a server reboot?'
No we rebooted it today and the errors are still there
Do you recall any events with this XI server before you started seeing this error?
Yes I upgraded to ver 5.5.7 from version.5.4.12
after that I used the knowledgebase article to migrate postgresql to mysql which worked with no issues.
@benhank, Is your Nagvis working? Looks like it can't connect to the database:
[Mon Dec 10 16:22:04 2018] [error] [client 172.30.242.53] Could not initialize a database connection: SQLSTATE[28000] [1045] Access denied for user 'nagios'@'localhost' (using password: YES), referer: http://lkennagiost01/nagvis/frontend/nagvis-js/
Can you open the backend editor in nagvis and make sure that its using db user ndoutils, dbpass n@gweb?
Also, why did you delete the /usr/local/nagios/etc/pnp/ folder? I see there is pnp.bak folder. Consider renaming it back to pnp.
Is your BPI component working?
I also suggest stopping the nagios process and removing the following two files(if they exist):
file had incorrect info that wasn't allowing nagvis to talk to the mysql db's but that is all set now.
as for bpi we don't use it but I think that we tested it a year or so ago and tried to set it up. When I clicked on it to double check I noticed this error:
Please open the /usr/local/nagiosxi/html/config.inc.php and scroll all the way to the bottom of the file.
Replace this block of code:
///////// keep these in order /////////
// include generic db defs
require_once(dirname(__FILE__) . '/includes/db.inc.php');
// include generic definitions
require_once(dirname(__FILE__) . '/db/common.inc.php');
// include db-specific definitions
//require_once(dirname(__FILE__).'/db/'.$cfg['dbtype'].'.inc.php');
With:
///////// keep these in order /////////
if (!defined('CFG_ONLY')) {
// include generic db defs
require_once(dirname(__FILE__) . '/includes/db.inc.php');
// include generic definitions
require_once(dirname(__FILE__) . '/db/common.inc.php');
}
Then run these commands in order:
service crond stop
service npcd stop
service nagios stop
service ndo2db stop
pkill -9 -u nagios
for i in $(ipcs -q | grep nagios |awk '{print $2}'); do ipcrm -q $i; done
rm -rf /usr/local/nagiosxi/var/dbmaint.lock
rm -rf /usr/local/nagiosxi/var/event_handler.lock
rm -rf /usr/local/nagiosxi/scripts/reconfigure_nagios.lock
service mysqld restart
service ndo2db start
service nagios start
service npcd start
service crond start
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
SWEET! looks like that fixed it. and as a bonus I did the same on the second server that was getting this error and they went away.
now the bad news:
We are testing the upgrade to 5.5.7 from our current prod environment currently running 5.4.12.
for my test I reinstalled centos 6.8, installed xi version xi-2014r2.7 (in order to have postgresql installed), then I upgraded to 5.4.12
I then did a restore from my prod server to the test server, tested it and made sure everything was working and finally did the upgrade to 557.
The issue we just resolved doesn't exist on the servers running 5.4.12. Which makes me ask is this a bug?