Page 1 of 1

read() returned error 11

Posted: Thu Dec 15, 2016 6:12 am
by arenist
Hi,

those strange things DrydenK described in https://support.nagios.com/forum/viewto ... =7&t=39856 are happening to me, too. I'm running nagios 4.2.4 on Oralce Linux Server release 6.8.

First of all, I don't understand why nagios is writing to /var/log/messages. This should be forbidden by use_syslog=0 in nagios.cfg. After setting debug_level=4 nagios does not write anything into nagios.debug. A possible reason for this behavior might be, that nagios has detected the service to be flapping.

The service that produces this output to /var/log/messages should check the syslog for the occurence of the string "error". Nagios is allowed to read syslog:
-rw-r--r-- 1 root root 3903114 Dec 15 11:33 /var/log/messages

While nagios is writing continously this blocks of 12 errors
Dec 15 11:21:53 nagsrv01 nagios: job 157 (pid=11009): read() returned error 11
Dec 15 11:21:53 nagsrv01 nagios: job 157 (pid=11013): read() returned error 11
Dec 15 11:21:53 nagsrv01 nagios: job 157 (pid=11015): read() returned error 11
Dec 15 11:21:53 nagsrv01 nagios: job 158 (pid=11019): read() returned error 11
Dec 15 11:21:53 nagsrv01 nagios: job 157 (pid=11010): read() returned error 11
Dec 15 11:21:53 nagsrv01 nagios: job 158 (pid=11016): read() returned error 11
Dec 15 11:21:53 nagsrv01 nagios: job 157 (pid=11014): read() returned error 11
Dec 15 11:21:53 nagsrv01 nagios: job 157 (pid=11011): read() returned error 11
Dec 15 11:21:53 nagsrv01 nagios: job 158 (pid=11018): read() returned error 11
Dec 15 11:21:53 nagsrv01 nagios: job 158 (pid=11017): read() returned error 11
Dec 15 11:21:53 nagsrv01 nagios: job 157 (pid=11008): read() returned error 11
Dec 15 11:21:53 nagsrv01 nagios: job 157 (pid=11012): read() returned error 11
it will find the string "error" of course. And so nagios makes the service flapping itself.

install environment:
Oralce Linux Server release 6.8, fully updated
Nagios Core 4.2.4 installed from tar-ball
Server with 16GB RAM, 8 CPU cores

How can I prevent nagios from writing into my syslog???

Thanks in advance,
arenist

Re: read() returned error 11

Posted: Thu Dec 15, 2016 5:21 pm
by avandemore
arenist wrote:First of all, I don't understand why nagios is writing to /var/log/messages. This should be forbidden by use_syslog=0 in nagios.cfg
That may be a seperate bug.

For your problem, see here:
https://github.com/NagiosEnterprises/na ... issues/172

Re: read() returned error 11

Posted: Thu Dec 15, 2016 5:25 pm
by dwhitfield
Also, just to clarify, are you using mod_gearman?

Re: read() returned error 11

Posted: Mon Dec 19, 2016 1:20 am
by arenist
Hi avandemore,

sorry, but I can't find a solution of my problem in the link you sent me. jfrickson says, he has
changed it to LOG_NOTIC in branch 'maint'
. Whatever this means, I actually DO see an error in my syslog.

@dwhitfield: I'm not using mod_gearman. I had to google what mod_gearman is ...

Best regards,
arenist

Re: read() returned error 11

Posted: Mon Dec 19, 2016 12:15 pm
by avandemore
It means the issue has been fixed. You can either wait for the next version of Nagios Core to be released, or install from source using the maint branch.

Re: read() returned error 11

Posted: Tue Dec 20, 2016 12:39 am
by arenist
Ah, thanks for your explanation avandemore. I will try to install from source. So you can close this thread. But it was really ugly that nagios is writing exactly that string into a file which I want to be noticed of.

Best regards,
arensit

Re: read() returned error 11

Posted: Tue Dec 20, 2016 11:42 am
by dwhitfield
arenist wrote:I will try to install from source.
be sure to use the maint branch...or just wait. Unfortunately, I don't have an ETA on when that will be. I know the devs are busy getting the Core version in XI updated to 4.2.4.

Re: read() returned error 11

Posted: Tue Dec 20, 2016 11:55 am
by avandemore
We encourage community participation on GitHub so that things like this can be avoided.