Skip to main content

Hi all

 

New problem. I have the following error (line 69) sometimes and that must explain why I have un incident on my mysql database.

password is set in :

/etc/centreon/centreon.conf.php

/etc/centreon/conf.pm

 

240724  9:53:56     11 Query    SELECT nagios_server_id, command_file, cfg_dir, centreonbroker_cfg_path, snmp_trapd_path_conf, engine_start_command, engine_stop_command, engine_restart_command, engine_reload_command, broker_reload_command, init_script_centreontrapd FROM cfg_nagios, nagios_server WHERE nagios_server.id = cfg_nagios.nagios_server_id AND cfg_nagios.nagios_activate = '1'
11 Query SELECT `value` FROM options WHERE `key` = 'gorgone_illegal_characters'
66 Connect centreon@localhost on centreon using Socket
66 Query SET NAMES utf8
67 Connect centreon@localhost on centreon using Socket
67 Query SET NAMES utf8
66 Quit
67 Query SELECT `session_id` FROM session WHERE `session_id` = 'nikmbv8rjbipcr9nnklci1l2cs'
67 Query SELECT name FROM modules_informations
68 Connect centreon@localhost on centreon using Socket
68 Query SET NAMES utf8
68 Query SELECT `session_id` FROM session WHERE `session_id` = 'nikmbv8rjbipcr9nnklci1l2cs'
68 Query UPDATE `session`
SET `last_reload` = 1721807636, `ip_address` = '172.22.219.1'
WHERE `session_id` = 'nikmbv8rjbipcr9nnklci1l2cs'
68 Query SELECT `value`
FROM `options`
WHERE `key` = 'session_expire'
68 Query UPDATE `security_token`
SET `expiration_date` = 1721814836
WHERE `token` = 'nikmbv8rjbipcr9nnklci1l2cs'
68 Quit
67 Quit
240724 9:53:59 69 Connect centreon@localhost on centreon_storage using Socket
69 Connect Access denied for user 'centreon'@'localhost' (using password: YES)
240724 9:54:01 70 Connect centreon@localhost on centreon using Socket
70 Query SET NAMES utf8
71 Connect centreon@localhost on centreon_storage using Socket
71 Query SET NAMES utf8
70 Query SELECT id, running FROM cron_operation WHERE name LIKE 'centAcl.php'
70 Query UPDATE cron_operation SET running = '1', time_launch = 1721807641
WHERE id = 2
70 Query SELECT `key`, `value` FROM `options` WHERE `key` IN ('ldap_auth_enable', 'ldap_last_acl_update')
70 Query START TRANSACTION
70 Query SELECT auth.ar_id, auth.ar_sync_base_date, info.ari_value AS `interval`
FROM auth_ressource auth
INNER JOIN auth_ressource_info info ON auth.ar_id = info.ar_id
WHERE auth.ar_enable = '1' AND info.ari_name = 'ldap_sync_interval'
70 Query COMMIT
71 Query START TRANSACTION
71 Query DELETE FROM centreon_acl WHERE group_id NOT IN (SELECT DISTINCT acl_group_id
FROM `centreon`.acl_groups WHERE acl_group_activate = '1')
71 Query DELETE FROM centreon_acl WHERE group_id NOT IN (SELECT DISTINCT acl_group_id FROM `centreon`.acl_res_group_relations)
71 Query COMMIT
70 Query SELECT acl_res_id, all_hosts, all_hostgroups, all_servicegroups
FROM acl_resources WHERE acl_res_activate = '1'
AND (all_hosts IS NOT NULL OR all_hostgroups IS NOT NULL OR all_servicegroups IS NOT NULL)
70 Query START TRANSACTION
70 Query SELECT host_id FROM host WHERE host_id NOT IN (SELECT DISTINCT host_host_id
FROM acl_resources_host_relations WHERE acl_res_id = 1)
AND host_register = '1'
70 Query COMMIT
70 Query START TRANSACTION
70 Query SELECT hg_id FROM hostgroup
WHERE hg_id NOT IN (
SELECT DISTINCT hg_hg_id FROM acl_resources_hg_relations
WHERE acl_res_id = 1)
70 Query COMMIT
70 Query START TRANSACTION
70 Query SELECT sg_id FROM servicegroup
WHERE sg_id NOT IN (
SELECT DISTINCT sg_id FROM acl_resources_sg_relations
WHERE acl_res_id = 1)
70 Query COMMIT
70 Query SELECT DISTINCT acl_groups.acl_group_id
FROM acl_res_group_relations, `acl_groups`, `acl_resources`
WHERE acl_groups.acl_group_id = acl_res_group_relations.acl_group_id
AND acl_res_group_relations.acl_res_id = acl_resources.acl_res_id
AND acl_groups.acl_group_activate = '1'
AND (
acl_groups.acl_group_changed = '1' OR
(acl_resources.changed = '1' AND acl_resources.acl_res_activate IS NOT NULL)
)
70 Query UPDATE cron_operation
SET running = '0', last_execution_time = 0
WHERE id = 2
71 Quit
70 Quit

 

and the screenshot

 

How can I find the cause of this error ?

thanks for help

Hello,

Can you check the log file /var/log/centreon-broker/central-broker-master.log ?

Does the password is set in the Centreon broker master config? (Configuration > Pollers > Broker Configuration)

Make sure it is the good password, then Export the config to the Central and restart the cbd service

systemctl restart cbd

Hope it helps


Thanks for your reply.

 

I modified as : 

then

 

Export files

restart cbd

but I still have the following problem :

d2024-07-24T16:52:56.557+02:00] 0sql] lerror] mysql_connection 0x7f658001fb40: error while starting connection: mysql_connection: The mysql/mariadb database seems not started. Waiting before attempt to connect again: Access denied for user 'centreon'@'localhost' (using password: YES)
2024-07-24T16:52:56.557+02:00] 0processing] gerror] failover central-broker-master-unified-sql: global error: mysql_connection: error while starting connection


And with same password …

 

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 6936
Server version: 10.5.25-MariaDB-log MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB a(none)]>


I begin to desperate ….

 

 


When you are connected to the database, can you see the centreon_storage database?

SHOW DATABASES;

 


yes

[root@supervision2 ~]# mysql -u centreon -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 6936
Server version: 10.5.25-MariaDB-log MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| centreon |
| centreon_storage |
| information_schema |
| mysql |
+--------------------+
4 rows in set (0.000 sec)

MariaDB [(none)]>

 


Can you read the file /etc/centreon-broker/central-broker.json and check if the password on this part match the one you actually use to connect to the database?

 


Yes. Same one.


Reply