Page 1 of 3

Error: Cannot open log file for reading

Posted: Thu Aug 29, 2013 10:15 pm
by Perintis
Hi,

Could you help me for "Error: Cannot open log file '/usr/local/nagios/var/archives/nagios-xx-xx-xx.log' for reading!" .
when i'm want look Notification history the error show up and likes my history and performance graph for spesific time and date gone .
i'm tried look on nagios.log no one clue related this error. search the file nagios-xx-xx-xx.log on the path is gone . i think this log on spesific date archive isn't create. please your advice for solve this issue.. :?:

thank in advance for your help.

Note:
Nagios version Nagios XI 2012R2.2
OS -> Centos 6.4 x84_64.

Re: Error: Cannot open log file for reading

Posted: Fri Aug 30, 2013 9:39 am
by slansing
Are you able to open earlier date ranges? Can you view the last 24 hours? Please also rung the following and report it back to us:

Code: Select all

ll -la /usr/local/nagios/var/archives/

ll -la /usr/local/nagios/var/nagios.log

Re: Error: Cannot open log file for reading

Posted: Wed Sep 04, 2013 2:13 am
by Perintis
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.

Re: Error: Cannot open log file for reading

Posted: Wed Sep 04, 2013 1:10 pm
by lmiltchev
Are you seeing the same problem after fixing the database issue?

Re: Error: Cannot open log file for reading

Posted: Wed Sep 04, 2013 6:52 pm
by Perintis
until now all this ok.

Re: Error: Cannot open log file for reading

Posted: Thu Sep 05, 2013 1:21 pm
by lmiltchev
I am locking this topic as resolved. If you have any more issues, please, start a new thread.

Re: Error: Cannot open log file for reading

Posted: Wed Sep 18, 2013 7:37 pm
by Perintis
hello ,

i found the root couse is if any scheduled downtime host or service (ex. 3 days) at midnight nagios service unexpectedly stop and impact to log archives didn't created. please your advice this is bug from nagios or any information ?? ,i used nagios xi 2012R2.2 .
for temporary action i created corntab job for check nagios service at midnight every day its fix for issue nagios stop with "SIGSEGV "message ,but nagios log didn't created archive log .
could you help to share manually run Log rotate / where script on nagios to run log rotate archive??,can i ran manual it..

thank you,

Re: Error: Cannot open log file for reading

Posted: Thu Sep 19, 2013 2:14 pm
by slansing
Are you using mk_livestatus?:

Code: Select all

cat /usr/local/nagios/etc/nagios.cfg | grep broker_mod

Re: Error: Cannot open log file for reading

Posted: Thu Sep 19, 2013 9:04 pm
by Perintis
yes , as below :

Code: Select all

# cat /usr/local/nagios/etc/nagios.cfg | grep broker_mod
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
broker_module=/usr/local/lib/mk-livestatus/livestatus.o /usr/local/nagios/var/rw/live

Re: Error: Cannot open log file for reading

Posted: Fri Sep 20, 2013 1:36 pm
by slansing
Can you also show us the permissions on the nagios log?:

Code: Select all

ll -la /usr/local/nagios/var/archives/nagios*