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 241 forks source link

No comunication to DB #8831

Closed Feliscucu closed 4 years ago

Feliscucu commented 4 years ago

BUG REPORT INFORMATION

Prerequisites

The opened issue, must be code related. GitHub is not meant for support. Feel free to check the CONTRIBUTING section for more details.

Versions

centreon-widget-grid-map-20.04.0-5.el7.centos.noarch
centreon-connector-perl-20.04.0-2.el7.centos.x86_64
centreon-engine-daemon-20.04.3-1.el7.centos.x86_64
centreon-plugin-Network-Cisco-Standard-Snmp-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Map4-Jmx-20200602-094050.el7.centos.noarch
centreon-plugin-Virtualization-Vmware2-Connector-Plugin-20200602-094050.el7.centos.noarch
centreon-widget-live-top10-memory-usage-20.04.0-5.el7.centos.noarch
centreon-widget-engine-status-20.04.1-1.el7.centos.noarch
centreon-broker-storage-20.04.5-1.el7.centos.x86_64
centreon-broker-cbmod-20.04.5-1.el7.centos.x86_64
centreon-plugin-Hardware-Printers-Generic-Snmp-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Database-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Central-20200602-094050.el7.centos.noarch
centreon-poller-centreon-engine-20.04.3-5.el7.centos.noarch
centreon-widget-hostgroup-monitoring-20.04.0-5.el7.centos.noarch
centreon-connector-20.04.0-2.el7.centos.x86_64
centreon-broker-20.04.5-1.el7.centos.x86_64
centreon-engine-20.04.3-1.el7.centos.x86_64
centreon-broker-cbd-20.04.5-1.el7.centos.x86_64
centreon-widget-service-monitoring-20.04.2-1.el7.centos.noarch
centreon-trap-20.04.3-5.el7.centos.noarch
centreon-plugin-Applications-Protocol-Ldap-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Protocol-Http-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Databases-Mysql-20200602-094050.el7.centos.noarch
centreon-auto-discovery-server-20.04.2-2.el7.centos.noarch
centreon-plugin-Hardware-Servers-Dell-Openmanage-Snmp-20200602-094050.el7.centos.noarch
centreon-release-20.04-1.el7.centos.noarch
centreon-widget-httploader-20.04.0-5.el7.centos.noarch
centreon-widget-graph-monitoring-20.04.0-5.el7.centos.noarch
centreon-widget-live-top10-cpu-usage-20.04.0-5.el7.centos.noarch
centreon-connector-ssh-20.04.0-2.el7.centos.x86_64
centreon-pp-manager-20.04.1-1.el7.centos.noarch
centreon-common-20.04.3-5.el7.centos.noarch
centreon-engine-extcommands-20.04.3-1.el7.centos.x86_64
centreon-widget-host-monitoring-20.04.3-2.el7.centos.noarch
centreon-plugin-Hardware-Ups-Standard-Rfc1628-Snmp-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Poller-20200602-094050.el7.centos.noarch
centreon-license-manager-20.04.2-1.el7.centos.noarch
centreon-database-20.04.3-5.el7.centos.noarch
centreon-20.04.3-5.el7.centos.noarch
centreon-plugin-Hardware-Servers-Dell-IDrac-Snmp-20200602-094050.el7.centos.noarch
centreon-plugin-Virtualization-VMWare-daemon-3.1.2-20200602093832.el7.centos.noarch
centreon-gorgone-centreon-config-20.04.3-1592898588.09205b2.el7.centos.noarch
centreon-widget-servicegroup-monitoring-20.04.0-5.el7.centos.noarch
centreon-widget-global-health-20.04.0-5.el7.centos.noarch
centreon-broker-core-20.04.5-1.el7.centos.x86_64
centreon-web-20.04.3-5.el7.centos.noarch
centreon-plugin-Operatingsystems-Linux-Snmp-20200602-094050.el7.centos.noarch
centreon-license-manager-common-20.04.2-1.el7.centos.noarch
centreon-base-config-centreon-engine-20.04.3-5.el7.centos.noarch
centreon-gorgone-20.04.3-1592898588.09205b2.el7.centos.noarch
centreon-clib-20.04.0-7.el7.centos.x86_64
centreon-widget-tactical-overview-20.04.0-5.el7.centos.noarch
centreon-perl-libs-20.04.3-5.el7.centos.noarch
centreon-plugin-Operatingsystems-Windows-Snmp-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Protocol-Ftp-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Protocol-Dns-20200602-094050.el7.centos.noarch

Operating System

CentOS Linux release 7.8.2003 (Core)

Browser used

Version: --

Additional environment details (AWS, VirtualBox, physical, etc.): VMware ESXi 6.7

Description

I update from 20.04 to 20.04.3 and now I have problems with database

Steps to Reproduce

Please describe precisely the steps to reproduce the encountered issue.

  1. I logged in Centreon
  2. Poller-->Pollers
  3. Try to export config in poller with restart method

Describe the received result

image

Describe the expected result

Poller don't restart and not take any modify

Logs

PHP error logs

[02-Jul-2020 09:04:13 Europe/Madrid] PHP Warning:  PDO::query(): MySQL server has gone away in /usr/share/centreon/www/class/centreonDB.class.php on line 261
[02-Jul-2020 09:04:13 Europe/Madrid] PHP Warning:  PDO::query(): Error reading result set's header in /usr/share/centreon/www/class/centreonDB.class.php on line 261
[02-Jul-2020 09:04:30 Europe/Madrid] PHP Warning:  PDO::query(): MySQL server has gone away in /usr/share/centreon/www/class/centreonDB.class.php on line 261
[02-Jul-2020 09:04:30 Europe/Madrid] PHP Warning:  PDO::query(): Error reading result set's header in /usr/share/centreon/www/class/centreonDB.class.php on line 261
[02-Jul-2020 15:13:39 Europe/Madrid] PHP Warning:  array_keys() expects parameter 1 to be array, null given in /usr/share/centreon/www/modules/centreon-pp-manager/core/class/Installation/OperationManager.php on line 422
[02-Jul-2020 15:13:39 Europe/Madrid] PHP Warning:  Invalid argument supplied for foreach() in /usr/share/centreon/www/modules/centreon-pp-manager/core/class/Installation/OperationManager.php on line 422
[02-Jul-2020 15:13:39 Europe/Madrid] PHP Warning:  array_keys() expects parameter 1 to be array, null given in /usr/share/centreon/www/modules/centreon-pp-manager/core/class/Installation/OperationManager.php on line 435
[02-Jul-2020 15:13:39 Europe/Madrid] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/centreon/www/modules/centreon-pp-manager/core/class/Installation/OperationManager.php on line 438
[03-Jul-2020 09:20:51 Europe/Madrid] PHP Notice:  Element 'rrdcached_enable' does not exist in /usr/share/centreon/www/lib/HTML/QuickForm/HTML_QuickFormCustom.php on line 188
[03-Jul-2020 09:20:51 Europe/Madrid] PHP Notice:  Element 'rrdcached_port' does not exist in /usr/share/centreon/www/lib/HTML/QuickForm/HTML_QuickFormCustom.php on line 188
[03-Jul-2020 09:20:51 Europe/Madrid] PHP Notice:  Element 'rrdcached_port' does not exist in /usr/share/centreon/www/lib/HTML/QuickForm/HTML_QuickFormCustom.php on line 183

centreon-engine logs (if needed)

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

centreon-broker logs (if needed)

[1593757547] error:   expected ':' in object, got 's' (115)
[1593757548] error:   mysql: Error while sending prepared query: Incorrect string value: '\xA2n de ...' for column `centreon_storage`.`logs`.`output` at row 1 (SQL: )
[1593757548] error:   conflict_manager: error in the main loop: Incorrect string value: '\xA2n de ...' for column `centreon_storage`.`logs`.`output` at row 1 (while executing statement 2075038481)
[1593757548] error:   mysql: Error while sending prepared query: Incorrect string value: '\xA0 desh...' for column `centreon_storage`.`logs`.`output` at row 1 (SQL: )
[1593757548] error:   mysql: Error while sending prepared query: Incorrect string value: '\xA2n de ...' for column `centreon_storage`.`logs`.`output` at row 1 (SQL: )
[1593757548] error:   mysql: Error while sending prepared query: Incorrect string value: '\xA2n de ...' for column `centreon_storage`.`logs`.`output` at row 1 (SQL: )
[1593757548] error:   mysql: Error while sending prepared query: Incorrect string value: '\xA2n de ...' for column `centreon_storage`.`logs`.`output` at row 1 (SQL: )
[1593757548] error:   mysql: Error while sending prepared query: Incorrect string value: '\xA2n de ...' for column `centreon_storage`.`logs`.`output` at row 1 (SQL: )
[1593757548] error:   mysql: Error while sending prepared query: Incorrect string value: '\xA2n de ...' for column `centreon_storage`.`logs`.`output` at row 1 (SQL: )
[1593757548] error:   mysql: Error while sending prepared query: Incorrect string value: '\xA2n de ...' for column `centreon_storage`.`logs`.`output` at row 1 (SQL: )
[1593757548] error:   mysql: Error while sending prepared query: Incorrect string value: '\xA2n de ...' for column `centreon_storage`.`logs`.`output` at row 1 (SQL: )
[1593757548] error:   conflict_manager: error while checking deleted indexes: could not query index table to get index to delete: Incorrect string value: '\xA0 desh...' for column `centreon_storage`.`logs`.`output` at row 1 (while executing statement 2075038481)
[1593757606] error:   TCP: could not connect to remote server 'localhost:5669': Connection refused
Centreon Broker 20.04.5 log file closed

centcore logs (if needed)

tail -f /var/log/centreon/centcore.log

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

lpinsivy commented 4 years ago

HI @Feliscucu, the problem is due to a version of Centreon Broker try to convert string into UTF-8 before to insert in DB. Can you try to update Centreon Broker component to the 20.04.6 version? Please remove also the queue files into /var/lib/centreon-broker/ before to start the new version.

Regards,

Feliscucu commented 4 years ago

Thanks Ipinsivy. I remove query files and update, but the same problem.

Versions

centreon-widget-grid-map-20.04.0-5.el7.centos.noarch
centreon-connector-perl-20.04.0-2.el7.centos.x86_64
centreon-plugin-Network-Cisco-Standard-Snmp-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Map4-Jmx-20200602-094050.el7.centos.noarch
centreon-plugin-Virtualization-Vmware2-Connector-Plugin-20200602-094050.el7.centos.noarch
centreon-common-20.04.4-6.el7.centos.noarch
centreon-engine-20.04.4-1.el7.centos.x86_64
centreon-20.04.4-6.el7.centos.noarch
centreon-widget-live-top10-memory-usage-20.04.0-5.el7.centos.noarch
centreon-widget-engine-status-20.04.1-1.el7.centos.noarch
centreon-plugin-Hardware-Printers-Generic-Snmp-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Database-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Central-20200602-094050.el7.centos.noarch
centreon-broker-20.04.6-3.el7.centos.x86_64
centreon-auto-discovery-server-20.04.3-3.el7.centos.noarch
centreon-widget-hostgroup-monitoring-20.04.0-5.el7.centos.noarch
centreon-connector-20.04.0-2.el7.centos.x86_64
centreon-widget-service-monitoring-20.04.2-1.el7.centos.noarch
centreon-plugin-Applications-Protocol-Ldap-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Protocol-Http-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Databases-Mysql-20200602-094050.el7.centos.noarch
centreon-plugin-Hardware-Servers-Dell-Openmanage-Snmp-20200602-094050.el7.centos.noarch
centreon-web-20.04.4-6.el7.centos.noarch
centreon-engine-daemon-20.04.4-1.el7.centos.x86_64
centreon-broker-cbd-20.04.6-3.el7.centos.x86_64
centreon-base-config-centreon-engine-20.04.4-6.el7.centos.noarch
centreon-release-20.04-1.el7.centos.noarch
centreon-widget-httploader-20.04.0-5.el7.centos.noarch
centreon-widget-graph-monitoring-20.04.0-5.el7.centos.noarch
centreon-widget-live-top10-cpu-usage-20.04.0-5.el7.centos.noarch
centreon-connector-ssh-20.04.0-2.el7.centos.x86_64
centreon-pp-manager-20.04.1-1.el7.centos.noarch
centreon-widget-host-monitoring-20.04.3-2.el7.centos.noarch
centreon-plugin-Hardware-Ups-Standard-Rfc1628-Snmp-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Poller-20200602-094050.el7.centos.noarch
centreon-license-manager-20.04.2-1.el7.centos.noarch
centreon-plugin-Hardware-Servers-Dell-IDrac-Snmp-20200602-094050.el7.centos.noarch
centreon-plugin-Virtualization-VMWare-daemon-3.1.2-20200602093832.el7.centos.noarch
centreon-gorgone-centreon-config-20.04.3-1592898588.09205b2.el7.centos.noarch
centreon-perl-libs-20.04.4-6.el7.centos.noarch
centreon-broker-core-20.04.6-3.el7.centos.x86_64
centreon-broker-cbmod-20.04.6-3.el7.centos.x86_64
centreon-poller-centreon-engine-20.04.4-6.el7.centos.noarch
centreon-awie-20.04.0-4.el7.centos.noarch
centreon-widget-servicegroup-monitoring-20.04.0-5.el7.centos.noarch
centreon-widget-global-health-20.04.0-5.el7.centos.noarch
centreon-plugin-Operatingsystems-Linux-Snmp-20200602-094050.el7.centos.noarch
centreon-license-manager-common-20.04.2-1.el7.centos.noarch
centreon-gorgone-20.04.3-1592898588.09205b2.el7.centos.noarch
centreon-broker-storage-20.04.6-3.el7.centos.x86_64
centreon-trap-20.04.4-6.el7.centos.noarch
centreon-clib-20.04.0-7.el7.centos.x86_64
centreon-widget-tactical-overview-20.04.0-5.el7.centos.noarch
centreon-plugin-Operatingsystems-Windows-Snmp-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Protocol-Ftp-20200602-094050.el7.centos.noarch
centreon-plugin-Applications-Protocol-Dns-20200602-094050.el7.centos.noarch
centreon-engine-extcommands-20.04.4-1.el7.centos.x86_64
centreon-database-20.04.4-6.el7.centos.noarch

And /var/lib/centreon-broker/:

image

image

if a solution is not possible, how can I create a new database and keep the Centreon configuration?

Thanks for your help!

lpinsivy commented 4 years ago

Hi,

May be you update first Centreon Broker before Centreon Engine.

Can you try to:

  1. Stop all your Centreon Engine (systemctl stop centengine)
  2. Can you stop Centreon Broker (systemctl stop cbd)
  3. Delete all queue files in /var/lib/centreon-broker/
  4. Start Centreon Broker (systemctl start cbd)
  5. start all Centreon Engine (systemctl start centengine)

Regards,

Feliscucu commented 4 years ago

Hi Ipinsivy, I have no queue files. I stop and start services but no luck.

any suggestion? Thanks!

cgagnaire commented 4 years ago

Hi @Feliscucu, Lets try this: Restart Engine: systemctl restart centengine Stop Broker: systemctl stop cbd Delete queue files: rm -f /var/lib/centreon-broker/* Start Broker: systemctl start cbd Then wait for the problematic services to be checked.

Feliscucu commented 4 years ago

Thanks @cgagnaire, Problem continue. In central-broker-master.log, I have this:


Centreon Broker 20.04.6 log file closed
Centreon Broker 20.04.6 log file opened
[1595144617] error:   cannot open '/var/lib/centreon-engine//central-module-master.memory.central-module-master-output' (mode w+): Permission denied
Centreon Broker 20.04.6 log file closed
Centreon Broker 20.04.6 log file opened
[1595144622] error:   cannot open '/var/lib/centreon-engine//central-module-master.memory.central-module-master-output' (mode w+): Permission denied
Centreon Broker 20.04.6 log file closed
Centreon Broker 20.04.6 log file opened
[1595144627] error:   cannot open '/var/lib/centreon-engine//central-module-master.memory.central-module-master-output' (mode w+): Permission denied
Centreon Broker 20.04.6 log file closed
Centreon Broker 20.04.6 log file opened
[1595144632] error:   cannot open '/var/lib/centreon-engine//central-module-master.memory.central-module-master-output' (mode w+): Permission denied
Centreon Broker 20.04.6 log file closed
Centreon Broker 20.04.6 log file opened
[1595144637] error:   cannot open '/var/lib/centreon-engine//central-module-master.memory.central-module-master-output' (mode w+): Permission denied
Centreon Broker 20.04.6 log file closed

Thanks everyone for the help!
cgagnaire commented 4 years ago

Hi @Feliscucu, Ok so the problem is different from what I see, there is no more errors with SQL backend. But that's odd because your central-broker-master.log should not mention central-module-master output or whatsoever. That's supposed to be cbmod module launched by Engine, so you have to make sure centreon-engine user can read and write on the folder and file.

Feliscucu commented 4 years ago

Thanks to @cgagnaire and @lpinsivy

Finally I create a new Centreon and import configuration with this great tool: https://github.com/centreon/centreon-awie