read() returned error 11

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
arenist
Posts: 27
Joined: Fri Nov 29, 2013 9:29 am

read() returned error 11

Post 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
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: read() returned error 11

Post 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
Previous Nagios employee
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: read() returned error 11

Post by dwhitfield »

Also, just to clarify, are you using mod_gearman?
arenist
Posts: 27
Joined: Fri Nov 29, 2013 9:29 am

Re: read() returned error 11

Post 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
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: read() returned error 11

Post 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.
Previous Nagios employee
arenist
Posts: 27
Joined: Fri Nov 29, 2013 9:29 am

Re: read() returned error 11

Post 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
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: read() returned error 11

Post 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.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: read() returned error 11

Post by avandemore »

We encourage community participation on GitHub so that things like this can be avoided.
Previous Nagios employee
Locked