mysql_pconnect and cp *.zip issues while preforming upgrade

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tylergates_ats
Posts: 5
Joined: Mon Jul 14, 2014 8:34 am

mysql_pconnect and cp *.zip issues while preforming upgrade

Post by tylergates_ats »

Upgrading from 2014R1.2 to 2014R1.3 using the manually installer I received the following message:

Code: Select all

[root@nagios nagiosxi]# ./upgrade 
PHP Warning:  mysql_pconnect(): Access denied for user 'ndoutils'@'localhost' (using password: YES) in /usr/local/src/nagiosxi/nagiosxi/basedir/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
Message: A database connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, please contact Nagios support.<br /><br />Run the following from the CLI as root to attempt to repair the DB<br /><br /><pre>/usr/local/nagiosxi/scripts/repair_databases.sh</pre>Checking required prereqs... 
Please wait... 

OLD VERSION: 405
Loaded plugins: fastestmirror
Determining fastest mirrors
<snip>
I did change the default ndoutils password earlier so it would explain the error but it is unclear to me if the script was able to get past this message or if I really do need to run /usr/local/nagiosxi/scripts/repair_databases.sh? From what I can tell things appear to be OK but it would be nice to have confirmation this was not an issue.

Also I noticed this message as well:

Code: Select all

<snip>Sourceguardian extension already in php.ini
Copying over new XI directory...
/bin/chown: cannot access `/usr/local/nagiosxi/tmp/*.zip': No such file or directory
chmod: cannot access `/usr/local/nagiosxi/tmp/*.zip': No such file or directory
Building latest perms binary...
Updating NagiosQL..
<snip>
Again I am unclear whether this is a problem.

Thanks
Tyler
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: mysql_pconnect and cp *.zip issues while preforming upgr

Post by abrist »

Check you mysql logs for crashed tables or other errors:

Code: Select all

tail -25 /var/log/mysqld.log
If you have errors, you will need to run the repair before re-running the upgrade.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
tylergates_ats
Posts: 5
Joined: Mon Jul 14, 2014 8:34 am

Re: mysql_pconnect and cp *.zip issues while preforming upgr

Post by tylergates_ats »

Code: Select all

[root@nagios httpd]# tail -25 /var/log/mysqld.log
140714 11:47:04 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
140714 11:47:06 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140714 11:47:06 [Note] Event Scheduler: Loaded 0 events
140714 11:47:06 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
140716 10:59:06 [Note] /usr/libexec/mysqld: Normal shutdown

140716 10:59:06 [Note] Event Scheduler: Purging the queue. 0 events
140716 10:59:08 [Note] /usr/libexec/mysqld: Shutdown complete

140716 10:59:08 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
140716 10:59:21 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140716 10:59:21 [Note] Event Scheduler: Loaded 0 events
140716 10:59:21 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
140718 14:06:34 [Note] /usr/libexec/mysqld: Normal shutdown

140718 14:06:34 [Note] Event Scheduler: Purging the queue. 0 events
140718 14:06:36 [Note] /usr/libexec/mysqld: Shutdown complete

140718 14:06:36 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
140718 14:06:39 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140718 14:06:39 [Note] Event Scheduler: Loaded 0 events
140718 14:06:39 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
14:06 would be the relevant time.

I take it the chown and chmod errors are OK?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: mysql_pconnect and cp *.zip issues while preforming upgr

Post by lmiltchev »

I did change the default ndoutils password earlier so it would explain the error but it is unclear to me if the script was able to get past this message or if I really do need to run /usr/local/nagiosxi/scripts/repair_databases.sh?
Where did you change the password? What is the password that you have in the "/usr/local/nagiosxi/html/config.inc.php"? It doesn't seem that you have the mysql errors, so this is not your issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
tylergates_ats
Posts: 5
Joined: Mon Jul 14, 2014 8:34 am

Re: mysql_pconnect and cp *.zip issues while preforming upgr

Post by tylergates_ats »

I changed the passwords in the database and updated /usr/local/nagios/etc/nagios/ndo2db.cfg and /usr/local/nagiosxi/html/config.inc.php. After a restart things worked fine, it was just these messages from the upgrader that caused me a little concern.

I went back into the upgrade script later that day and made it exit before it prints out the old version to see if it got hung up like it did before and received no database errors or warnings printed to screen so I'm hoping things are well.

I would have thought updating the default passwords would be good practice, should I not?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: mysql_pconnect and cp *.zip issues while preforming upgr

Post by lmiltchev »

I would have thought updating the default passwords would be good practice, should I not?
Definitely. In fact, we are putting up a document together on changing default passwords in Nagios XI. As soon as it is tested, I will be posting it on the Nagios Library.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked