Page 2 of 3

Re: Weird behavior after performing repair database script

Posted: Tue Mar 13, 2018 1:42 pm
by Berto
I PM scottwilkerson with the zip file.

Re: Weird behavior after performing repair database script

Posted: Tue Mar 13, 2018 2:04 pm
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

Re: Weird behavior after performing repair database script

Posted: Tue Mar 13, 2018 8:23 pm
by Berto
I have edited the /etc/my.cnf as requested. Should I send a new profile.zip?

Re: Weird behavior after performing repair database script

Posted: Wed Mar 14, 2018 8:46 am
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.

Re: Weird behavior after performing repair database script

Posted: Wed Mar 14, 2018 10:11 am
by Berto
Yes I restarted mysqld. Okay will monitor and update whether its an issue or if its been resolved.

Re: Weird behavior after performing repair database script

Posted: Wed Mar 14, 2018 10:35 am
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.

Re: Weird behavior after performing repair database script

Posted: Wed Mar 14, 2018 10:49 am
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

Re: Weird behavior after performing repair database script

Posted: Wed Mar 14, 2018 11:01 am
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

Re: Weird behavior after performing repair database script

Posted: Thu Mar 15, 2018 9:22 am
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?

Re: Weird behavior after performing repair database script

Posted: Thu Mar 15, 2018 9:45 am
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?