zorkian / nagios-api

A REST-like, JSON interface to Nagios
BSD 3-Clause "New" or "Revised" License
586 stars 173 forks source link

Latest version of greenlet (0.4.10) causes nagios-api to not start #76

Open brizrobbo opened 7 years ago

brizrobbo commented 7 years ago

Problem:

Have been happily running nagios-api for a long time (thank you :) ) using greenlet versions < 0.4.9.

However, greenlet recently updated to 0.4.10, and I built some new machines that used the latest when installed.

Nagios-api no longer starts, producing this error:

fake@somehost:/# sudo python /usr/sbin/nagios-api -p 7654 Traceback (most recent call last): File "/usr/sbin/nagios-api", line 31, in <module> from diesel import Application, Loop, Service, sleep File "/usr/local/lib/python2.7/dist-packages/diesel/__init__.py", line 4, in <module> from core import sleep, Loop, wait, fire, thread, until, Connection, UDPSocket, ConnectionClosed, ClientConnectionClosed, signal File "/usr/local/lib/python2.7/dist-packages/diesel/core.py", line 13, in <module> from greenlet import greenlet ImportError: /usr/local/lib/python2.7/dist-packages/greenlet.so: undefined symbol: _PyTrash_thread_deposit_object

I can confirm that downgrading the version to 0.4.9 enables it to work.

Workaround:

Interestingly, if you use easy_install to install the greenlet 0.4.10 egg, it works. Go figure!! :)

danieldias51 commented 7 years ago

I'm having a problem with greenlet too I guess

I'm using greenlet version 0.4.10

$ sudo nagios-api -p 8080 -c /usr/local/nagios/var/rw/nagios.cmd -s usr/local/nagios/var/status.dat -l /usr/local/nagios/var/nagios.log
Usage: nagios-api [options]

nagios-api: error: Status file not found: usr/local/nagios/var/status.dat
Exiting.
Exception KeyError: KeyError(140131292870464,) in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored

Someone had the same problem?

Answer

ok, the problem was nothing related with this, the problem was the status.dat path: is /usr/local/nagios/var/status.dat and not usr/local/nagios/var/status.dat