Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HUP signal cause livestatus initialisation errors with TCP config #359

Open
snarf6 opened this issue Apr 12, 2021 · 1 comment
Open

HUP signal cause livestatus initialisation errors with TCP config #359

snarf6 opened this issue Apr 12, 2021 · 1 comment

Comments

@snarf6
Copy link

snarf6 commented Apr 12, 2021

Hi,

When using a HUP signal to reload naemon config, naemon complains about port binding

naemon                | Caught 'Hangup', restarting...
naemon                | Retention data successfully saved.
naemon                | Event broker module 'NERD' deinitialized successfully.
naemon                | livestatus: deinitializing
naemon                | livestatus: Logfile cache: flushing complete cache.
naemon                | Event broker module '/usr/lib/naemon/naemon-livestatus/livestatus.so' deinitialized successfully.
naemon                | Event broker module '/usr/lib/x86_64-linux-gnu/mod_gearman/mod_gearman_naemon.o' deinitialized successfully.
naemon                | Naemon 1.2.4 starting... (PID=14)
naemon                | Local time is Mon Apr 12 13:20:41 UTC 2021
naemon                | qh: Socket '/var/lib/naemon/naemon.qh' successfully initialized
naemon                | nerd: Channel hostchecks registered successfully
naemon                | nerd: Channel servicechecks registered successfully
naemon                | nerd: Fully initialized and ready to rock!
naemon                | livestatus: Naemon Livestatus 1.2.4.1.source, TCP: '0.0.0.0:6557'
naemon                | livestatus: Unable to bind to '0.0.0.0:6557'
naemon                | Error: Function nebmodule_init() in module '/usr/lib/naemon/naemon-livestatus/livestatus.so' returned an error.  Module will be unloaded.
naemon                | Event broker module '/usr/lib/naemon/naemon-livestatus/livestatus.so' deinitialized successfully.
naemon                | Error: Failed to load module '/usr/lib/naemon/naemon-livestatus/livestatus.so'.
naemon                | mod_gearman: initialized version 3.3.4.20210311 (libgearman 0.33)
naemon                | Event broker module '/usr/lib/x86_64-linux-gnu/mod_gearman/mod_gearman_naemon.o' initialized successfully.
naemon                | Error: Module loading failed. Aborting.
naemon                | Event broker module 'NERD' deinitialized successfully.
naemon                | Event broker module '/usr/lib/x86_64-linux-gnu/mod_gearman/mod_gearman_naemon.o' deinitialized successfully.

Btw, the tcp port still works well. and the port is still binded.
I think that the HUP make unload/load to fast.

This was tested in docker only atm

Naemon version :

ii  libnaemon                   1.2.4.g6d3ec340.20210313      amd64        Library for Naemon - common data files
ii  naemon-core                 1.2.4.g6d3ec340.20210313      amd64        host/service/network monitoring and management system
ii  naemon-livestatus           1.2.4.1                       amd64        contains the Naemon livestatus eventbroker module

I hope that could help ;)

Thx

@snarf6
Copy link
Author

snarf6 commented Apr 12, 2021

One more point, this behavior seems to appear when the HUP is send when there is no changement in configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant