centreon / centreon-archived

Centreon is a network, system and application monitoring tool. Centreon is the only AIOps Platform Providing Holistic Visibility to Complex IT Workflows from Cloud to Edge.
https://www.centreon.com
GNU General Public License v2.0
574 stars 240 forks source link

Host or service not added after reload/restart of the poller from web interface #8562

Open wilvh opened 4 years ago

wilvh commented 4 years ago

Versions

$ rpm -qa | grep centreon
centreon-plugin-Applications-Monitoring-Centreon-Central-20200204-093915.el7.cen                                                                                 tos.noarch
centreon-perl-libs-19.10.10-1.el7.centos.noarch
centreon-broker-cbmod-19.10.3-1.el7.centos.x86_64
centreon-plugin-Network-Cisco-Standard-Snmp-20200204-093915.el7.centos.noarch
centreon-auto-discovery-server-19.10.2-2.el7.centos.noarch
centreon-connector-ssh-19.10.1-1.el7.centos.x86_64
centreon-plugin-Applications-Protocol-Dns-20200204-093915.el7.centos.noarch
centreon-engine-daemon-19.10.13-1.el7.centos.x86_64
centreon-plugin-Hardware-Ups-Standard-Rfc1628-Snmp-20200204-093915.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Database-20200204-093915.el7.centos.noarch
centreon-19.10.10-1.el7.centos.noarch
centreon-nrpe-plugin-2.15-4.el7.centos.x86_64
centreon-widget-live-top10-cpu-usage-19.10.0-1.el7.centos.noarch
centreon-engine-extcommands-19.10.13-1.el7.centos.x86_64
centreon-plugin-Hardware-Printers-Generic-Snmp-20200204-093915.el7.centos.noarch
centreon-web-19.10.10-1.el7.centos.noarch
centreon-connector-perl-19.10.1-1.el7.centos.x86_64
centreon-nrpe3-plugin-3.2.1-7.el7.centos.x86_64
centreon-widget-servicegroup-monitoring-19.10.0-1.el7.centos.noarch
centreon-database-19.10.10-1.el7.centos.noarch
centreon-common-19.10.10-1.el7.centos.noarch
centreon-broker-core-19.10.3-1.el7.centos.x86_64
centreon-engine-19.10.13-1.el7.centos.x86_64
centreon-plugin-Operatingsystems-Linux-Snmp-20200204-093915.el7.centos.noarch
centreon-license-manager-19.10.1-3.el7.centos.noarch
centreon-widget-host-monitoring-19.10.1-1.el7.centos.noarch
centreon-plugin-Applications-Protocol-Ftp-20200204-093915.el7.centos.noarch
centreon-poller-centreon-engine-19.10.10-1.el7.centos.noarch
centreon-widget-hostgroup-monitoring-19.10.0-1.el7.centos.noarch
centreon-widget-live-top10-memory-usage-19.10.0-1.el7.centos.noarch
centreon-widget-global-health-19.10.0-1.el7.centos.noarch
centreon-pp-manager-19.10.0-5.el7.centos.noarch
centreon-plugin-Applications-Databases-Mysql-20200204-093915.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Poller-20200204-093915.el7.centos.noarch
centreon-base-config-centreon-engine-19.10.10-1.el7.centos.noarch
centreon-clib-19.10.0-6.el7.centos.x86_64
centreon-widget-grid-map-19.10.0-1.el7.centos.noarch
centreon-widget-engine-status-19.10.0-1.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Map4-Jmx-20200204-093915.el7.centos.noarch
centreon-broker-19.10.3-1.el7.centos.x86_64
centreon-broker-cbd-19.10.3-1.el7.centos.x86_64
centreon-plugin-Operatingsystems-Windows-Snmp-20200204-093915.el7.centos.noarch
centreon-widget-service-monitoring-19.10.2-1.el7.centos.noarch
centreon-connector-19.10.1-1.el7.centos.x86_64
centreon-widget-graph-monitoring-19.10.0-1.el7.centos.noarch
centreon-plugin-Applications-Protocol-Ldap-20200204-093915.el7.centos.noarch
centreon-license-manager-common-19.10.1-3.el7.centos.noarch
centreon-broker-storage-19.10.3-1.el7.centos.x86_64
centreon-trap-19.10.10-1.el7.centos.noarch
centreon-widget-tactical-overview-19.10.1-1.el7.centos.noarch
centreon-plugin-Applications-Protocol-Http-20200204-093915.el7.centos.noarch
centreon-release-19.10-1.el7.centos.noarch
centreon-widget-httploader-19.10.0-1.el7.centos.noarch

Operating System

CentOS Linux release 7.7.1908 (Core)

Browser used

Version: 75

Additional environment details (AWS, VirtualBox, physical, etc.): VM on vSphere

Description

When I add a host and export configuration with restart or reload, the new host does not appear. I must restart centengine from SSH for the new host to be added.

Steps to Reproduce

Please describe precisely the steps to reproduce the encountered issue.

  1. I logged in Centreon
  2. I added a host
  3. I went to Configuration/Pollers/Central/Export Configuration
  4. I checked "Move Export Files" and "Restart Monitoring Engine" with reload or restart and "Apply"

Describe the received result

No errors from export step but no new host added

Describe the expected result

No errors from export step but new host added

Logs

PHP error logs

tail -f /var/opt/rh/rh-php72/log/php-fpm/centreon-error.log
[07-Apr-2020 16:09:35 Europe/Paris] PHP Notice:  Element 'remote_additional_id' does not exist in /usr/share/centreon/www/lib/HTML/QuickForm/HTML_QuickFormCustom                                                                            .php on line 188
[07-Apr-2020 16:13:55 Europe/Paris] PHP Notice:  Element 'remote_additional_id' does not exist in /usr/share/centreon/www/lib/HTML/QuickForm/HTML_QuickFormCustom                                                                            .php on line 188
[07-Apr-2020 16:34:07 Europe/Paris] PHP Notice:  Element 'remote_additional_id' does not exist in /usr/share/centreon/www/lib/HTML/QuickForm/HTML_QuickFormCustom                                                                            .php on line 188
[07-Apr-2020 16:34:46 Europe/Paris] PHP Notice:  Element 'remote_additional_id' does not exist in /usr/share/centreon/www/lib/HTML/QuickForm/HTML_QuickFormCustom                                                                            .php on line 188
[07-Apr-2020 17:02:43 Europe/Paris] PHP Notice:  Element 'remote_additional_id' does not exist in /usr/share/centreon/www/lib/HTML/QuickForm/HTML_QuickFormCustom                                                                            .php on line 188

centreon-engine logs (if needed)

tail -f /var/log/centreon-engine/centengine.log
no logs

centreon-broker logs (if needed)

tail -f /var/log/centreon-broker/central-broker-master.log
[1586328604] config:  module applier: loading directory '/usr/share/centreon/lib/centreon-broker'
[1586328604] config:  applier: 12 modules loaded
[1586328788] config:  main: configuration update requested
[1586328788] config:  log applier: applying 1 logging objects
[1586328788] config:  module applier: loading directory '/usr/share/centreon/lib/centreon-broker'
[1586328788] config:  applier: 12 modules loaded
[1586328800] config:  main: configuration update requested
[1586328800] config:  log applier: applying 1 logging objects
[1586328800] config:  module applier: loading directory '/usr/share/centreon/lib/centreon-broker'
[1586328800] config:  applier: 12 modules loaded

centcore logs (if needed)

tail -f /var/log/centreon/centcore.log
This file does not exist

Additional relevant information (e.g. frequency, ...)

Everytime I add a host or a service and reload/restart the poller from the web interface, the new service/host does not appear. I've checked centreon sudoers file and everything seems ok. When I execute "sudo systemctl reload centengine" from SSH with centreon user, the new host/service appears. On "poller Configuration" I've changed start/stop/restart/reload commands which started with "service..." for the newer "Systemctl" but it is not better.

lpinsivy commented 4 years ago

Updating my platform to 19.10.0 I din't have this error.

From which version you start your update? or maybe it's a fresh install?

lpinsivy commented 4 years ago

OK this is a simple notice message.

Can you check that 'centcore' process is running?

wilvh commented 4 years ago

Updating my platform to 19.10.0 I din't have this error.

From which version you start your update? or maybe it's a fresh install?

If I remember correctly, the original version was 18.10. I updated in 19.04 then 19.10 ( and several minor updates in 19.10). This problem has been present since at least 19.04.

OK this is a simple notice message.

Can you check that 'centcore' process is running?

After verification, the centcore process is not started. Even after restarting the server, the process does not start. I've tried to enable the service at startup with "systemctl enable centcore" but the process does not start until I type "systemctl start centcore". Once the process is started, the "move export file" and "restart monitoring engine" are working and new host is visible.

There are messages in /var/log/centreon/centcore.log but they were generated before I make some tests : Job for centengine.service failed because start of the service was attempted too often. See "systemctl status centengine.service" and "journalctl -xe" for details. To force a start use "systemctl reset-failed centengine.service" followed by "systemctl start centengine.service" again. Job for centengine.service failed because start of the service was attempted too often. See "systemctl status centengine.service" and "journalctl -xe" for details. To force a start use "systemctl reset-failed centengine.service" followed by "systemctl start centengine.service" again. Job for centengine.service invalid. Job for centengine.service failed because start of the service was attempted too often. See "systemctl status centengine.service" and "journalctl -xe" for details. To force a start use "systemctl reset-failed centengine.service" followed by "systemctl start centengine.service" again. Job for centengine.service invalid. Job for centengine.service invalid. 2020-04-24 08:59:08 - ERROR - Could not write into pipe file /var/lib/centreon-engine/rw/centengine.cmd on poller 1

I've tied this https://github.com/centreon/centreon/issues/5589#issuecomment-385559738 but it doest not work better

lpinsivy commented 4 years ago

Hi @wilvh those errors in /var/log/centreon/centcore.log are unusual.

Can you try to restart centengine then centcore?

wilvh commented 4 years ago

Hi @lpinsivy , I've deleted the log and restarted centengine and centcore and there is no content in /var/log/centreon/centcore.log file. I've updated Centreon to 19.10.10 and after a reboot of the server, the Centcore service was not running (and nothing in /var/log/centreon/centcore.log).

systemctl status centcore
● centcore.service - Centreon Core
   Loaded: loaded (/usr/lib/systemd/system/centcore.service; enabled; vendor preset: disabled)
   Active: inactive (dead)

A manual start of the service is working perfectly (and without anything in /var/log/centreon/centcore.log).

systemctl status centcore -l
● centcore.service - Centreon Core
   Loaded: loaded (/usr/lib/systemd/system/centcore.service; enabled; vendor preset: disabled)
   Active: active (running) since mer. 2020-05-13 11:46:31 CEST; 5min ago
 Main PID: 11714 (centcore)
   CGroup: /system.slice/centcore.service
           └─11714 /usr/bin/perl /usr/share/centreon/bin/centcore --logfile=/var/log/centreon/centcore.log --severity=error --config=/etc/centreon/conf.pm

mai 13 11:46:31 myserver systemd[1]: Started Centreon Core.
mai 13 11:46:31 myserver sudo[11715]: centreon : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/systemctl reload centengine

To summarize : everything seems to be working perfectly if I start manually centcore service after a server reboot but I don't understand why the service does not start automatically.

Thank you