Error: Cannot open log file for reading

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

Error: Cannot open log file for reading

Postby Perintis » Thu Aug 29, 2013 10:15 pm

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.
Perintis
 
Posts: 11
Joined: Tue Feb 19, 2013 5:01 am

Re: Error: Cannot open log file for reading

Postby slansing » Fri Aug 30, 2013 9:39 am

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
User avatar
slansing
The Good Cop
 
Posts: 7482
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Error: Cannot open log file for reading

Postby Perintis » Wed Sep 04, 2013 2:13 am

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.
Last edited by Perintis on Mon Sep 16, 2013 1:50 am, edited 1 time in total.
Perintis
 
Posts: 11
Joined: Tue Feb 19, 2013 5:01 am

Re: Error: Cannot open log file for reading

Postby lmiltchev » Wed Sep 04, 2013 1:10 pm

Are you seeing the same problem after fixing the database issue?
User avatar
lmiltchev
Bug Hunter Extraordinaire
 
Posts: 5218
Joined: Mon May 23, 2011 12:15 pm

Re: Error: Cannot open log file for reading

Postby Perintis » Wed Sep 04, 2013 6:52 pm

until now all this ok.
Perintis
 
Posts: 11
Joined: Tue Feb 19, 2013 5:01 am

Re: Error: Cannot open log file for reading

Postby lmiltchev » Thu Sep 05, 2013 1:21 pm

I am locking this topic as resolved. If you have any more issues, please, start a new thread.
User avatar
lmiltchev
Bug Hunter Extraordinaire
 
Posts: 5218
Joined: Mon May 23, 2011 12:15 pm

Re: Error: Cannot open log file for reading

Postby Perintis » Wed Sep 18, 2013 7:37 pm

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,
Perintis
 
Posts: 11
Joined: Tue Feb 19, 2013 5:01 am

Re: Error: Cannot open log file for reading

Postby slansing » Thu Sep 19, 2013 2:14 pm

Are you using mk_livestatus?:

Code: Select all
cat /usr/local/nagios/etc/nagios.cfg | grep broker_mod
User avatar
slansing
The Good Cop
 
Posts: 7482
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Error: Cannot open log file for reading

Postby Perintis » Thu Sep 19, 2013 9:04 pm

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
Perintis
 
Posts: 11
Joined: Tue Feb 19, 2013 5:01 am

Re: Error: Cannot open log file for reading

Postby slansing » Fri Sep 20, 2013 1:36 pm

Can you also show us the permissions on the nagios log?:

Code: Select all
ll -la /usr/local/nagios/var/archives/nagios*
User avatar
slansing
The Good Cop
 
Posts: 7482
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Next

Return to Nagios XI

Who is online

Users browsing this forum: Google [Bot] and 7 guests