Weird behavior after performing repair database script

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Berto
Posts: 162
Joined: Tue Jul 01, 2014 6:12 pm

Re: Weird behavior after performing repair database script

Post by Berto »

I PM scottwilkerson with the zip file.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Weird behavior after performing repair database script

Post by scottwilkerson »

Looking at the profile you sent I am seeing a log of lines like these

Code: Select all

Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php on line 117
Lets edit /etc/my.cnf
and right under

Code: Select all

[mysqld]
add

Code: Select all

max-connections=500
Then restart mysqld

Code: Select all

service mysqld restart
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Berto
Posts: 162
Joined: Tue Jul 01, 2014 6:12 pm

Re: Weird behavior after performing repair database script

Post by Berto »

I have edited the /etc/my.cnf as requested. Should I send a new profile.zip?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Weird behavior after performing repair database script

Post by scottwilkerson »

Berto wrote:I have edited the /etc/my.cnf as requested. Should I send a new profile.zip?
Did you also restart mysqld?

If you are still experiencing the same problems, yes, please send a new profile.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Berto
Posts: 162
Joined: Tue Jul 01, 2014 6:12 pm

Re: Weird behavior after performing repair database script

Post by Berto »

Yes I restarted mysqld. Okay will monitor and update whether its an issue or if its been resolved.
Berto
Posts: 162
Joined: Tue Jul 01, 2014 6:12 pm

Re: Weird behavior after performing repair database script

Post by Berto »

Noticed after the change most the red warnings have gone away now, except for two as seen in the PNG file. I'll go ahead a PM again with a new profile.zp file.
You do not have the required permissions to view the files attached to this post.
Berto
Posts: 162
Joined: Tue Jul 01, 2014 6:12 pm

Re: Weird behavior after performing repair database script

Post by Berto »

I've PM a new profile.zip but now the Nagios server now is displaying:

SQL Error [nagiosxi] : Table './nagiosxi/xi_auditlog' is marked as crashed and should be repaired
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Weird behavior after performing repair database script

Post by scottwilkerson »

Run the repair database script

Code: Select all

cd /usr/local/nagiosxi/scripts/
./repair_databases.sh
Additionally, because you are getting errors like thing on nagios_logentries

Code: Select all

ndo2db: mysql_error: 'Duplicate entry '5431088' for key 'PRIMARY''
, I'd like you run the following

Code: Select all

echo "select max(logentry_id) from nagios_logentries;"| mysql -pnagiosxi nagios
echo "describe nagios_logentries;"| mysql -pnagiosxi nagios
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Berto
Posts: 162
Joined: Tue Jul 01, 2014 6:12 pm

Re: Weird behavior after performing repair database script

Post by Berto »

I ran ./repair_databases.sh and after a long time of the script running, the following error was displayed:

/usr/local/nagiosxi/scripts/repairmysql.sh: line 110: 22215 Segmentation fault $cmd $t --sort_buffer_size=256M

I see that the issue was that /var was filled up and I see that the nagiosxi directory under /var/lib/mysql filled up with 72, should that have occurred?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Weird behavior after performing repair database script

Post by scottwilkerson »

Berto wrote:I ran ./repair_databases.sh and after a long time of the script running, the following error was displayed:

/usr/local/nagiosxi/scripts/repairmysql.sh: line 110: 22215 Segmentation fault $cmd $t --sort_buffer_size=256M

I see that the issue was that /var was filled up and I see that the nagiosxi directory under /var/lib/mysql filled up with 72, should that have occurred?
That shouldn't normally occur, your system ran out of memory, how much memory do you have? can you allocate more?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked