shinken-monitoring / mod-booster-nrpe

Shinken module for boosting NRPE connections

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Shinken 2.4] AttributeError: NRPEAsyncClient instance has no attribute '_socket'

k0ste opened this issue · comments

[1431957842] INFO: [Shinken] [NRPEPoller] Module started!
[1431957856] ERROR: [Shinken] NRPE poller exited with an unmanaged exception : Traceback (most recent call last):
  File "/var/lib/shinken/modules/booster-nrpe/module.py", line 507, in work
    self.do_work(s, returns_queue, c)
  File "/var/lib/shinken/modules/booster-nrpe/module.py", line 548, in do_work
    self.manage_finished_checks()
  File "/var/lib/shinken/modules/booster-nrpe/module.py", line 462, in manage_finished_checks
    asyncore.poll2(timeout=1)
  File "/usr/lib64/python2.7/asyncore.py", line 201, in poll2
    readwrite(obj, flags)
  File "/usr/lib64/python2.7/asyncore.py", line 123, in readwrite
    obj.handle_error()
  File "/usr/lib64/python2.7/asyncore.py", line 503, in handle_error
    self.handle_close()
  File "/usr/lib64/python2.7/asyncore.py", line 522, in handle_close
    self.close()
  File "/var/lib/shinken/modules/booster-nrpe/module.py", line 216, in close
    sock = self._socket
  File "/usr/lib64/python2.7/asyncore.py", line 421, in __getattr__
    %(self.__class__.__name__, attr))
AttributeError: NRPEAsyncClient instance has no attribute '_socket'

[1431957857] WARNING: [Shinken] [poller-master] The worker 7 goes down unexpectedly!
[1431957857] INFO: [Shinken] [poller-master] Allocating new nrpe_poller Worker: 16
[1431957858] INFO: [Shinken] [NRPEPoller] Module started!

command:

define command {
  command_name          check_nrpe
  command_line          $NAGIOSPLUGINSDIR$/check_nrpe -H $HOSTADDRESS$ -t 10 -u -c $ARG1$
  module_type          nrpe_poller
}

On server with nrpe - no one connection. If execute with -n (withous tls), in debug only connection, on Shinken - CRITICAL (Error : Empty response from the NRPE server)

P.S.: shinken 2.4, module from .io

The same with Shinken 2.4.1, but status on WebUI does not changed.

I fixed this by installing the openssl extensions for Python:

pip install pyOpenSSL

Well I don't think this is a particularly good fix for this problem. The code seems to handle non-existing pyOpenSSL, but it doesn't seem to handle it well when the server expects an SSL connection.

It should be fixed in the code.