wproc error question

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

wproc error question

Post by benhank »

Hey guys,
Does anyone know what this error is?

Code: Select all

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
Thanks!
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: wproc error question

Post by npolovenko »

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.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: wproc error question

Post by benhank »

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.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: wproc error question

Post by npolovenko »

@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):
rm /usr/local/nagios/var/status.dat
rm /usr/local/nagios/var/retention.dat
This will delete all scheduled downtime, all acknowledgments, and comments.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: wproc error question

Post by benhank »

we actually fixed the nagvis errors today. The

Code: Select all

/usr/local/nagvis/etc/nagvis.ini.php
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:

Code: Select all

The current BPI config has 3 missing objects. Missing objects will show up as having an UNKNOWN or UNREACHABLE status. Hide Details
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: wproc error question

Post by npolovenko »

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.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: wproc error question

Post by benhank »

I made the change but now I cant log into xi the page is blank
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: wproc error question

Post by npolovenko »

@benhank, You're missing the closing } in this block and you don't need the closing php tag ?>. Please change this:
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');
?>
To:
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');

}
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: wproc error question

Post by benhank »

That did it i can log in again. Ill wait for a bit and see if the error pops up again
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: wproc error question

Post by benhank »

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?
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
Locked