NAGIOSSQL LOGIN FAILED

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

NAGIOSSQL LOGIN FAILED

Post by toleolu »

Got this error when I tried to update Nagios. I don't recall changing anything on the SQL login, but I guess I must have. Where can I find or change the sql login?

And since the update failed, I guess I have to go back and run it from the beginning again, is that right?
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NAGIOSSQL LOGIN FAILED

Post by lmiltchev »

Are you trying to upgrade to Nagios XI 2012R2.9? What is the Nagios XI version that you are currently using? Are you using a proxy?

What is the output of the following command?

Code: Select all

ll /usr/local/nagiosxi/scripts/nagiosql*
Run the upgrade script one more time as such:

Code: Select all

./upgrade | tee upgrade.txt
and upload the "upgrade.txt" file that was generated by running the above command.
Be sure to check out our Knowledgebase for helpful articles and solutions!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NAGIOSSQL LOGIN FAILED

Post by abrist »

Yeah, you will need to re-run ./update. NagiosQL login may have failed if the mysqld service was not running or if the tables are crashed. What is the output of:

Code: Select all

service mysqld status
tail -25 /var/log/mysqld.log
Do you have a copy of the upgrade log, or at least a copy of the last chunk of lines on terminal from 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.
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: NAGIOSSQL LOGIN FAILED

Post by toleolu »

nagiossql.txt
Yes I was trying to update to 2012R2.9, which according to the admin screen, the update was successful:
Capture.JPG
I am behind a proxy, but I did update the Proxy Config settings at least for the updates. I did not make the changes to the config files per the instructions because after I updated the Proxy Config settings, I was able to download and run the update.

MySQL status says running. Nagios never went down after the update.

Here's the output form the mysqld.log
sqlstatus.txt
And here's the output from the sql scripts:
nagiossql.txt
I haven't rerun the update yet. Let me know if you think I should try it again.

Mahalo
You do not have the required permissions to view the files attached to this post.
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NAGIOSSQL LOGIN FAILED

Post by abrist »

I would suggest trying to rerun the update. Did you change the db password by chance?
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.
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: NAGIOSSQL LOGIN FAILED

Post by toleolu »

As I mentioned in my initial post, I don't recall changing the password. What's the default?
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NAGIOSSQL LOGIN FAILED

Post by abrist »

The default should be "n@gweb"l, you can test with:

Code: Select all

mysql -unagiosql -pn@gweb
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.
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: NAGIOSSQL LOGIN FAILED

Post by toleolu »

Yeah, I can log in with that, so the password didn't change.

Is there any difference between nagiosql and MySQL, I thought I saw somewhere that Nagiosql was an add on?
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NAGIOSSQL LOGIN FAILED

Post by abrist »

Nope, nagiosql was forked by us and is one of the core components to the ccm. You may want to restart all the associated services:

Code: Select all

service mysqld restart
service nagios restart
service ndo2db restart
service httpd restart
Check the db as well:

Code: Select all

/usr/local/nagiosxi/scripts/repairmysql.sh nagios
/usr/local/nagiosxi/scripts/repairmysql.sh nagiosql
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.
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: NAGIOSSQL LOGIN FAILED

Post by toleolu »

Got a different error on the NAGIOSQL Login this time. See the attached text file.
New Text Document.txt
The first two errors popped up when I was trying to restart ndo2db and httpd. Not really errors, just a couple of hiccups.

After that is the result I get when I run the upgrade again.

Thanks
You do not have the required permissions to view the files attached to this post.
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
Locked