updating from nagios XI 2014R2.6 to 2014R2.7

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

updating from nagios XI 2014R2.6 to 2014R2.7

Post by questrad »

Hello,

We are trying to update our nagios XI 2014R2.6 to 2014R2.7. As listed in the Backing-Up-And-Restoring-Nagios-XI document we tried to backup, however, the backup failed with the following error.

i# /usr/local/nagiosxi/scripts/backup_xi.sh
Backing up Core Config Manager (NagiosQL)...
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up Nagios Core...
tar: Removing leading `/' from member names
Backing up Nagios XI...
tar: Removing leading `/' from member names
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up NRDP...
tar: Removing leading `/' from member names
Backing up MySQL databases...
mysqldump: Got error: 144: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!

I'm not sure if we changed the password of nagios db. Can assistance be provided ?
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: updating from nagios XI 2014R2.6 to 2014R2.7

Post by bwallace »

First try running through the steps in this doc, and post any errors that may come about...
https://assets.nagios.com/downloads/nag ... tabase.pdf
Be sure to check out the Knowledgebase for helpful articles and solutions!
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

Re: updating from nagios XI 2014R2.6 to 2014R2.7

Post by questrad »

Thank you. I will try and report back.
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: updating from nagios XI 2014R2.6 to 2014R2.7

Post by bwallace »

Sounds good, we'll be watching for any updates -
Be sure to check out the Knowledgebase for helpful articles and solutions!
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

Re: updating from nagios XI 2014R2.6 to 2014R2.7

Post by questrad »

Hello,

As advised, i fixed the mysql with the script in the document provided. Output attached. It seems that the repairmysql script had fixed the mysql db. However, i get the same error when i run the backupscript after fixing the mysql db.


usr/local/nagiosxi/scripts/backup_xi.sh
Backing up Core Config Manager (NagiosQL)...
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up Nagios Core...
tar: Removing leading `/' from member names
Backing up Nagios XI...
tar: Removing leading `/' from member names
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up NRDP...
tar: Removing leading `/' from member names
Backing up MySQL databases...
mysqldump: Got error: 144: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!


Any suggestions ?
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: updating from nagios XI 2014R2.6 to 2014R2.7

Post by scottwilkerson »

Page 2 of the document, has additional steps if you are still seeing "is marked as crashed" errors

https://assets.nagios.com/downloads/nag ... tabase.pdf
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

Re: updating from nagios XI 2014R2.6 to 2014R2.7

Post by questrad »

Thank you.

myisamchk -r -f nagios_logentries
- recovering (with sort) MyISAM-table 'nagios_logentries'
Data records: 961
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4

/usr/local/nagiosxi/scripts/backup_xi.sh
Backing up Core Config Manager (NagiosQL)...
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up Nagios Core...
tar: Removing leading `/' from member names
Backing up Nagios XI...
tar: Removing leading `/' from member names
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up NRDP...
tar: Removing leading `/' from member names
Backing up MySQL databases...
mysqldump: Got error: 144: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!

same error. Am i missing something ?
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: updating from nagios XI 2014R2.6 to 2014R2.7

Post by lmiltchev »

If running "myisamchk -r -f nagios_logentries" didn't fix the issue, you could try:

Code: Select all

echo 'repair table nagios_logentries use_frm;' | mysql -t -u root -pnagiosxi nagios
Be sure to check out our Knowledgebase for helpful articles and solutions!
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

Re: updating from nagios XI 2014R2.6 to 2014R2.7

Post by questrad »

Well, it's same even after running the command.

Code: Select all

# echo 'repair table nagios_logentries use_frm;' | mysql -t -u root -pnagiosxi nagios
+--------------------------+--------+----------+--------------------------------------+
| Table                    | Op     | Msg_type | Msg_text                             |
+--------------------------+--------+----------+--------------------------------------+
| nagios.nagios_logentries | repair | warning  | Number of rows changed from 0 to 961 |
| nagios.nagios_logentries | repair | status   | OK                                   |
+--------------------------+--------+----------+--------------------------------------+

# /usr/local/nagiosxi/scripts/backup_xi.sh
Backing up Core Config Manager (NagiosQL)...
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up Nagios Core...
tar: Removing leading `/' from member names
Backing up Nagios XI...
tar: Removing leading `/' from member names
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up NRDP...
tar: Removing leading `/' from member names
Backing up MySQL databases...
mysqldump: Got error: 144: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!
Last edited by tmcdonald on Tue May 31, 2016 5:06 pm, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: updating from nagios XI 2014R2.6 to 2014R2.7

Post by lmiltchev »

Let's try running this command again:

Code: Select all

echo 'repair table nagios_logentries use_frm;' | mysql -t -u root -pnagiosxi nagios
Next, restart mysql and show the last 50 lines of the mysqld.log.

Code: Select all

service mysqld restart
tail -50 /var/log/mysqld.log
Is opening a new support ticket in our email ticketing system an option for you?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked