Announcement

Collapse
No announcement yet.

centengine start: bad configuration. [FAILED]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • centengine start: bad configuration. [FAILED]

    Hi everybody,

    I need help, Im trying to solve a problem with the centreon-engine, the centreon works but I have no reports, I checked an I found that the centreon-engine it's not working, when I tried to start the centreon-engine service I receive the message "centengine start: bad configuration. [FAILED]"

    [[email protected] centreon-engine]# service centengine start
    centengine start: bad configuration. [FAILED]

    But with the check command everything since to be ok

    [[email protected] centreon-engine]# /usr/sbin/centengine -v /etc/centreon-engine/centengine.cfg
    [1517595974] [3942] Reading main configuration file '/etc/centreon-engine/centengine.cfg'.
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/hostTemplates.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/hosts.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/serviceTemplates.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/services.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/commands.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/contactgroups.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/contacts.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/hostgroups.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/servicegroups.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/timeperiods.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/escalations.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/dependencies.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/connectors.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/meta_commands.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/meta_timeperiod.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/meta_host.cfg'
    [1517595974] [3942] Processing object config file '/etc/centreon-engine/meta_services.cfg'
    [1517595974] [3942] Reading resource file '/etc/centreon-engine/resource.cfg'
    [1517595974] [3942] Checking global event handlers...
    [1517595974] [3942] Checking obsessive compulsive processor commands...
    [1517595974] [3942]
    [1517595974] [3942] Checked 18 commands.
    [1517595974] [3942] Checked 2 connectors.
    [1517595974] [3942] Checked 1 contacts.
    [1517595974] [3942] Checked 0 host dependencies.
    [1517595974] [3942] Checked 0 host escalations.
    [1517595974] [3942] Checked 1 host groups.
    [1517595974] [3942] Checked 6 hosts.
    [1517595974] [3942] Checked 0 service dependencies.
    [1517595974] [3942] Checked 0 service escalations.
    [1517595974] [3942] Checked 0 service groups.
    [1517595974] [3942] Checked 53 services.
    [1517595974] [3942] Checked 1 time periods.
    [1517595974] [3942]
    [1517595974] [3942] Total Warnings: 0
    [1517595974] [3942] Total Errors: 0

    The /var/log/centreon-engine/centengine.log file doesn't register any new message

    [[email protected] centreon-engine]# tailf centengine.log
    [1515691203] [1818] INITIAL SERVICE STATE: Centreon-Server;Ping;OK;HARD;1;OK - 127.0.0.1: rta 0.045ms, lost 0%
    [1515691203] [1818] INITIAL SERVICE STATE: Centreon-Server;Memory;OK;HARD;1;Total memory used : 4% ram used : 26%, swap used 0%
    [1515691203] [1818] INITIAL SERVICE STATE: Centreon-Server;Load;OK;HARD;1;Load average: 0.78, 0.42, 0.39.
    [1515691203] [1818] INITIAL SERVICE STATE: Centreon-Server;Disk-/;OK;HARD;1;Disk OK - / TOTAL: 28.712GB USED: 5.340GB (18%) FREE: 23.372GB (82%)
    [1515691203] [1818] Event loop start at Thu Jan 11 14:20:03 2018
    [1515691203] [1818] Configuration loaded, main loop starting.
    [1515696401] [1818] Caught SIGTERM, shutting down ...
    [1515696401] [1818] Successfully shutdown ... (PID=1818)
    [1515696401] [1818] Event broker module '/usr/lib64/centreon-engine/externalcmd.so' deinitialized successfully
    [1515696402] [1818] Event broker module '/usr/lib64/nagios/cbmod.so' deinitialized successfully

    I found the follow messages in the /var/log/centreon-engine/centreon-broker/central-broker-master.log file:

    [1517496507] config: correlation: invalid correlation configuration, correlation engine is NOT loaded
    [1517496507] config: applier: 14 modules loaded
    [1517585418] error: could not commit to database 'centreon_storage' on host 'localhost': MySQL server has gone away QMYSQL: Unable to commit transaction
    [1517585418] error: could not commit to database 'centreon_storage' on host 'localhost': MySQL server has gone away QMYSQL: Unable to commit transaction
    Centreon Broker 2.11.7 log file closed
    Centreon Broker 2.11.7 log file opened
    [1517591107] config: module applier: loading directory '/usr/share/centreon/lib/centreon-broker'
    [1517591107] config: correlation: invalid correlation configuration, correlation engine is NOT loaded
    [1517591107] config: applier: 14 modules loaded
    [1517591107] error: TCP: could not connect to localhost:5670: Connection refused

    I found the follow messages in the /var/log/centreon/centreon.log file:

    2018-01-11 14:19:17 - MySQL error : cannot connect to database centreon: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) (caller: centreon::common::db:/usr/share/perl5/vendor_perl/centreon/common/db.pm:266)
    2018-01-11 14:19:17 - MySQL error : cannot connect to database centreon: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) (caller: centreon::common::db:/usr/share/perl5/vendor_perl/centreon/common/db.pm:266)
    2018-01-11 14:19:17 - Error when getting server properties
    2018-02-01 10:34:52 - MySQL error: MySQL server has gone away (caller: centreon:cript::centcore:/usr/share/perl5/vendor_perl/centreon/script/centcore.pm:798)
    Query: SELECT * FROM options WHERE `key` IN ('enable_perfdata_sync', 'enable_logs_sync', 'centcore_cmd_timeout', 'enable_broker_stats')

    2018-02-02 12:30:31 - MySQL error: MySQL server has gone away (caller: centreon:cript::centcore:/usr/share/perl5/vendor_perl/centreon/script/centcore.pm:798)
    Query: SELECT * FROM options WHERE `key` IN ('enable_perfdata_sync', 'enable_logs_sync', 'centcore_cmd_timeout', 'enable_broker_stats')

    I tried to repair the database but doesn't change:

    [[email protected] mphadmin]# mysql -u centreon -p -h 127.0.0.1 -e "REPAIR TABLE centreon_storage.logs"
    Enter password:
    +-----------------------+--------+----------+----------+
    | Table | Op | Msg_type | Msg_text |
    +-----------------------+--------+----------+----------+
    | centreon_storage.logs | repair | status | OK |
    +-----------------------+--------+----------+----------+

Working...
X