Question

Poller is not reloading with export configuration


Badge +1

We have upgrade our fresh install of 22.10.1 to 23.04.0, after that we have issue exporting the configuration of poller server, everything it seem working but the “Uptime” is still the same before restarting/exporting poller configuration.

We have tried to restart “gorgoned” on the poller and still the same uptime.

We have tried with the following command on the poller:

su - centreon-gorgone -s /bin/bash -c 'sudo systemctl restart centengine'

With this command the uptime is resetted and it seem exported the configuration.


7 replies

Badge +7

Hi, we had a similar problem. Have you checked that the user centreon-gorgone is in the sudoers file?

Regards,

Badge +1

Hi, I checked and centreon-gorgone has permissions to restart all the Centreon services, we also add this user in the sudoers but still having same issue.

It’s strange because for sometime after the server startup or reboot it’s working for some time, after some hours or 1 day the restart of poller (from central UI) is not working.

Badge +2

Hello there,

Same problem here. Running Alma 9 on both Central and Poller.

  • Default installation using packages with an external poller, running as expected
  • /etc/sudoers.d/centreon : file created during installation and containing the default configuration

No way to reload or restart the service from the Web UI.

When running a restart ou reload from the Web UI, I can see the following message by running “systemctl status gorgoned” (part of the message appears in red) on the central and the poller :

sudo[7749]: centreon-gorgone : no tty ; PWD=/ ; USER=root ; COMMAND=/usr/sbin/service centengine restart

So, the command is received by the poller and the central (locally) but centreon-engine does not restart.

If I edit the file /etc/sudoers and change the line from “Defaults requiretty” to “Defaults !requiretty”, the message appears then as followed (not in red) :

sudo[7918]: centreon-gorgone : PWD=/ ; USER=root ; COMMAND=/usr/sbin/service centengine restart

But still no restart on the service.

The service restarts by running the command locally : 

su - centreon-gorgone -s /bin/bash -c 'sudo systemctl restart centengine'

Any help is welcome!

Badge +1

@MGR which version are you running of Centreon? In the last update they fix an issue with the poller restarting evry 24h crashing.

Reference: https://github.com/centreon/centreon/pull/1711

Badge +2

Hello,

 

I’m running the version 23.04.6 installed from the packages. In my case, I didn’t notice a crash, but every time I commit my changes to the central or the poller, the service ‘centengine’ does not restart. I must manually restart it from a shell.

Badge +2

Hello,

I may have found the issue.

By default, when adding a poller, the commands to reload or restart the service are using “/usr/sbin/service” (e.g. /usr/sbin/service centengine restart).

When running this command locally as the user centreon-gorgone, I have an access denied:
# su - centreon-gorgone -s /bin/bash -c 'sudo /usr/sbin/service centengine restart'
/usr/sbin/service: line 14: /bin/basename: Permission denied
/usr/sbin/service: line 16: /bin/basename: Permission denied
/usr/sbin/service: line 107: /usr/bin/systemd-escape: Permission denied
Redirecting to /bin/systemctl restart
/usr/sbin/service: line 109: /bin/systemctl: Permission denied
/usr/sbin/service: line 109: /bin/systemctl: Success

When changing the commands in the pollers configuration, I can see the service being restarted but with the file /etc/sudoers edited:

Line modified in /etc/sudoers:
“Defaults requiretty” to “Defaults !requiretty”

Config modified on the poller:

For information, the file /etc/sudoers.d/centreon is original:

 

If people getting the same issue are confirming the fix when using RedHat or Almalinux, maybe something must be done to:

  • adapt the commands when adding a poller depending on the OS
  • find a way to permit the legacy command /usr/sbin/service to run
  • keep /etc/sudoers as original with the line “Defaults requiretty”

 Please let us know!

Badge +1

Similar here, migrated from Centos 7, not refresh configuration on export with modified service, IIf I duplicate service is showed...

Reply