shinken-monitoring / mod-nsca

Shinken module for listening exteranl commands from a NSCA like daemon
GNU Affero General Public License v3.0
1 stars 2 forks source link

Socket accept exception (Err 53) not catched ... #9

Open mohierf opened 9 years ago

mohierf commented 9 years ago

Regularly the receiver module goes down because of an exception

[1440607568] ERROR: [receiver-master] [nsca] Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/Shinken-2.4_rc4-py2.7.egg/shinken/basemodule.py", line 164, in start_module
    self._main()
  File "/usr/local/lib/python2.7/site-packages/Shinken-2.4_rc4-py2.7.egg/shinken/basemodule.py", line 296, in _main
    self.main()
  File "/usr/local/libexec/shinken/modules/nsca/module.py", line 217, in main
    client, _ = server.accept()
  File "/usr/local/lib/python2.7/socket.py", line 206, in accept
    sock, addr = self._sock.accept()
error: [Errno 53] Software caused connection abort
mohierf commented 9 years ago

On FreeBSD this exception is raised by the server because a client closed a pending socket before it has been opened ... indeed it does not seem to be a bug!

The module should catch this exception for not going down ...