Error: Cannot open log file for reading

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
huanhuan7777
Posts: 19
Joined: Thu Nov 07, 2013 12:05 am

Re: Error: Cannot open log file for reading

Post by huanhuan7777 »

Perintis wrote:hi. sory for late message ,

you can see for list 25 august file not created. at september this issue's come again the log not created and message.log :
Sep 2 00:00:00 localhost nagios: Caught SIGSEGV, shutting down...
Sep 2 00:00:00 localhost ndo2db: Error: mysql_query() failed for 'UPDATE nagios_conninfo SET disconnect_time=NOW(), last_checkin_t
ime=NOW(), data_end_time=FROM_UNIXTIME, bytes_processed='0', lines_processed='0', entries_processed='0' WHERE conninfo_id='0''
Sep 2 00:00:00 localhost ndo2db: mysql_error: 'MySQL server has gone away'
Sep 2 00:00:00 localhost ndo2db: Error: Connection to MySQL database has been lost!

i tried to fix database nagios n complete successfully. n still monitoring this issue hope not happen again.

any advice ??

thnks.
Hi~

I have the same error now.

Can you tell me how did you solved it?

Thank you very much ~~~~~~~~~
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Error: Cannot open log file for reading

Post by abrist »

First, try repairing the db, and then try to restart the db:

Code: Select all

/usr/local/nagiosxi/scripts/repairmysql.sh nagios
/usr/local/nagiosxi/scripts/repairmysql.sh nagiosql
service mysqld stop
ps -aef | grep mysql
service mysqld start
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.
huanhuan7777
Posts: 19
Joined: Thu Nov 07, 2013 12:05 am

Re: Error: Cannot open log file for reading

Post by huanhuan7777 »

abrist wrote:First, try repairing the db, and then try to restart the db:

Code: Select all

/usr/local/nagiosxi/scripts/repairmysql.sh nagios
/usr/local/nagiosxi/scripts/repairmysql.sh nagiosql
service mysqld stop
ps -aef | grep mysql
service mysqld start
Thank you very much ~~~~
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Error: Cannot open log file for reading

Post by abrist »

Did the repair resolve your problems?
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.
Locked