NSCA Network server accept failure (9: Bad file descriptor)

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
dhineshkumar
Posts: 22
Joined: Wed Jul 22, 2015 8:32 am

NSCA Network server accept failure (9: Bad file descriptor)

Post by dhineshkumar »

Hi.,

I am seeing the following error for NSCA in system logs. After restarting the NSCA services, this error stops coming for a while. When this error is coming the passive checks are not accepted in the Nagios.

nsca[20579]: Network server accept failure (9: Bad file descriptor)

NSCA Server version is 2.9.1.
NSCA Client Version 2.9.1

Can help me to stop this error coming.

Thanks in Advance.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: NSCA Network server accept failure (9: Bad file descript

Post by tgriep »

I did some searching and found that this was a bug that was fixed in an earlier version on NSCA.
But another thing that could cause it is too many connections or dropped connections to the server leaving the NSCA daemon stuck and not shutting down.
Can you check and see if that is happening?
Can you login to the server, run the following and post the output?

Code: Select all

ps -ef
ulimit -a
You can try and add these 2 lines to your /etc/xinetd.d/nsca file to give it unlimited connections and instances.

Code: Select all

per_source      = UNLIMITED
instances       = UNLIMITED
But, if the connections never drop, you may want to fix that instead of doing the edits.
Be sure to check out our Knowledgebase for helpful articles and solutions!
dhineshkumar
Posts: 22
Joined: Wed Jul 22, 2015 8:32 am

Re: NSCA Network server accept failure (9: Bad file descript

Post by dhineshkumar »

Thanks for your reply tgriep.

Nsca is running as standlone and not under xinetd. I could not see any connection dropping in the Nagios server.

Attached the output of the ps -ef and ulimit -a command ouput.

Thanks.
Attachments
ps output.txt
Output of Command ps -ef
(25.08 KiB) Downloaded 395 times
ulimit.txt
Output of Command Ulimit -a
(696 Bytes) Downloaded 408 times
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: NSCA Network server accept failure (9: Bad file descript

Post by tgriep »

Without more detailed messages, it is hard to debug.
You could enable debugging in the NSCA daemon by setting the following option to 1 in the nsca.cfg file

Code: Select all

debug=1
Then restart NSCA and wait for the error to happen again.

It could also be the open file limit is set too small.
Currently it is set to 1024 open files, you may want to increase that.
Be sure to check out our Knowledgebase for helpful articles and solutions!
dhineshkumar
Posts: 22
Joined: Wed Jul 22, 2015 8:32 am

Re: NSCA Network server accept failure (9: Bad file descript

Post by dhineshkumar »

After troubleshooting for weeks, found the issue on the MTU setting. MTU set on the server is high than the MTU on Network device, which broke the packets and NSCA couldnot identify those packets.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NSCA Network server accept failure (9: Bad file descript

Post by mcapra »

Thanks for sharing your findings!

Is it alright if we lock this thread and mark the issue as resolved?
Former Nagios employee
https://www.mcapra.com/
dhineshkumar
Posts: 22
Joined: Wed Jul 22, 2015 8:32 am

Re: NSCA Network server accept failure (9: Bad file descript

Post by dhineshkumar »

Yes. We can mark this Thread as Resolved.

Thanks.
Locked