Skip to main content
Solved

Database updates not active, pollers not running, get stack

  • May 2, 2022 11:43 AM UTC
  • 13 replies
  • 6157 views

Forum|alt.badge.img+1

Hello community,

 

I am new in centreon so quickly get stack at version upgrade from 20.04 to 21.10

My error is: Database updates not active, pollers not running, last update in yellow:

Somehow I found as well in the logs that the connection to SQL is failed:

2022-05-02 11:49:13|0|0|0|[local] [127.0.0.1] Authentication failed for 'admin'
 

I have a little idea about forcing the connection to sql but the centreon user is “centreon” normally for database.

Please help as my research was unsuccessfully.

 

Regards,

Eugene

 

 

 

 

Best answer by itoussies

 First time I’ve heard of the deletion of centreon_storage.logs (and I’ve done a lot of upgrade to the 21.10 version) 😅

 

Well, let’s recreate that table :
 

CREATE TABLE centreon_storage.`logs` (
`log_id` bigint(20) NOT NULL AUTO_INCREMENT,
`ctime` int(11) DEFAULT NULL,
`host_id` int(11) DEFAULT NULL,
`host_name` varchar(255) DEFAULT NULL,
`instance_name` varchar(255) NOT NULL,
`issue_id` int(11) DEFAULT NULL,
`msg_type` tinyint(4) DEFAULT NULL,
`notification_cmd` varchar(255) DEFAULT NULL,
`notification_contact` varchar(255) DEFAULT NULL,
`output` text DEFAULT NULL,
`retry` int(11) DEFAULT NULL,
`service_description` varchar(255) DEFAULT NULL,
`service_id` int(11) DEFAULT NULL,
`status` tinyint(4) DEFAULT NULL,
`type` smallint(6) DEFAULT NULL,
KEY `log_id` (`log_id`),
KEY `host_name` (`host_name`(64)),
KEY `service_description` (`service_description`(64)),
KEY `status` (`status`),
KEY `instance_name` (`instance_name`),
KEY `ctime` (`ctime`),
KEY `rq1` (`host_id`,`service_id`,`msg_type`,`status`,`ctime`),
KEY `rq2` (`host_id`,`msg_type`,`status`,`ctime`)
) ENGINE=InnoDB AUTO_INCREMENT=57759 DEFAULT CHARSET=utf8

 

Then, let’s manually execute the database partioning :

/usr/bin/php /usr/share/centreon/cron/centreon-partitioning.php -m logs

 

Finally, restart the cbd service.

View original

13 replies

Forum|alt.badge.img+11
  • Centreonian
  • May 2, 2022 12:02 PM UTC

Hello @Jenellu,

 

You can try to follow these step :

 

Don't hesitate to come back to this thread if these steps didn't work.

 

Regards.


Forum|alt.badge.img+1
  • Author
  • Steward *
  • May 2, 2022 12:08 PM UTC

Hello itoussies,

Thank you for fast reply,

I sow it already didn’t help.

 

Regards,


Forum|alt.badge.img+11
  • Centreonian
  • May 2, 2022 12:26 PM UTC

Do you have any recent errors in /var/log/centreon-broker/central-broker-master.log ?


Forum|alt.badge.img+1
  • Author
  • Steward *
  • May 2, 2022 12:50 PM UTC

Yes, please:

 

[2022-05-02T14:46:29.233+02:00] [sql] [error] mysql_connection: could not store logs correctly:  Table 'centreon_storage.logs' doesn't exist
[2022-05-02T14:46:29.239+02:00] [sql] [error] conflict_manager: error in the main loop: could not store logs correctly:  Table 'centreon_storage.logs' doesn't exist
[2022-05-02T14:46:29.264+02:00] [sql] [error] mysql_connection: could not store logs correctly:  Table 'centreon_storage.logs' doesn't exist
[2022-05-02T14:46:29.264+02:00] [sql] [error] conflict_manager: error while checking deleted indexes: could not query index table to get index to delete: could not store logs correctly:  Table 'centreon_storage.logs' doesn't exist
[2022-05-02T14:46:29.264+02:00] [core] [error] failover: global error: conflict_manager: events loop interrupted
[2022-05-02T14:46:29.264+02:00] [core] [info] storage stream stopped with 0 acknowledged events
[2022-05-02T14:46:30.026+02:00] [core] [error] failover: global error: conflict_manager: events loop interrupted
[2022-05-02T14:46:30.030+02:00] [core] [info] sql stream stopped with 0 ackowledged events
[2022-05-02T14:47:29.270+02:00] [sql] [error] storage stream instanciation failed
[2022-05-02T14:47:29.271+02:00] [core] [error] failover: global error: storage: Unable to initialize the storage connection to the database


Forum|alt.badge.img+11
  • Centreonian
  • May 2, 2022 1:11 PM UTC

Weird 🤔 

Let’s see what table are currently present :

mysql -u centreon -p centreon -e "SHOW TABLES"
mysql -u centreon -p centreon_storage -e "SHOW TABLES"

 

If you are using a Remote DBMS :

mysql -u centreon -p centreon -h < IP of your Remote DBMS > -e "SHOW TABLES"
...

 


Forum|alt.badge.img+1
  • Author
  • Steward *
  • May 2, 2022 1:37 PM UTC

Please here:

 

 Tables_in_centreon                     |
+----------------------------------------+
| acl_actions                            |
| acl_actions_rules                      |
| acl_group_actions_relations            |
| acl_group_contactgroups_relations      |
| acl_group_contacts_relations           |
| acl_group_topology_relations           |
| acl_groups                             |
| acl_res_group_relations                |
| acl_resources                          |
| acl_resources_hc_relations             |
| acl_resources_hg_relations             |
| acl_resources_host_relations           |
| acl_resources_hostex_relations         |
| acl_resources_meta_relations           |
| acl_resources_poller_relations         |
| acl_resources_sc_relations             |
| acl_resources_service_relations        |
| acl_resources_sg_relations             |
| acl_topology                           |
| acl_topology_relations                 |
| auth_ressource                         |
| auth_ressource_host                    |
| auth_ressource_info                    |
| cb_field                               |
| cb_fieldgroup                          |
| cb_fieldset                            |
| cb_list                                |
| cb_list_values                         |
| cb_log                                 |
| cb_log_level                           |
| cb_module                              |
| cb_module_relation                     |
| cb_tag                                 |
| cb_tag_type_relation                   |
| cb_type                                |
| cb_type_field_relation                 |
| cfg_centreonbroker                     |
| cfg_centreonbroker_info                |
| cfg_centreonbroker_log                 |
| cfg_nagios                             |
| cfg_nagios_broker_module               |
| cfg_resource                           |
| cfg_resource_instance_relations        |
| command                                |
| command_arg_description                |
| command_categories                     |
| command_categories_relation            |
| connector                              |
| contact                                |
| contact_feature                        |
| contact_host_relation                  |
| contact_hostcommands_relation          |
| contact_param                          |
| contact_service_relation               |
| contact_servicecommands_relation       |
| contactgroup                           |
| contactgroup_contact_relation          |
| contactgroup_host_relation             |
| contactgroup_hostgroup_relation        |
| contactgroup_service_relation          |
| contactgroup_servicegroup_relation     |
| cron_operation                         |
| css_color_menu                         |
| custom_view_default                    |
| custom_view_user_relation              |
| custom_views                           |
| dependency                             |
| dependency_hostChild_relation          |
| dependency_hostParent_relation         |
| dependency_hostgroupChild_relation     |
| dependency_hostgroupParent_relation    |
| dependency_metaserviceChild_relation   |
| dependency_metaserviceParent_relation  |
| dependency_serviceChild_relation       |
| dependency_serviceParent_relation      |
| dependency_servicegroupChild_relation  |
| dependency_servicegroupParent_relation |
| downtime                               |
| downtime_cache                         |
| downtime_host_relation                 |
| downtime_hostgroup_relation            |
| downtime_period                        |
| downtime_service_relation              |
| downtime_servicegroup_relation         |
| escalation                             |
| escalation_contactgroup_relation       |
| escalation_host_relation               |
| escalation_hostgroup_relation          |
| escalation_meta_service_relation       |
| escalation_service_relation            |
| escalation_servicegroup_relation       |
| extended_host_information              |
| extended_service_information           |
| giv_components_template                |
| giv_graphs_template                    |
| host                                   |
| host_hostparent_relation               |
| host_service_relation                  |
| host_template_relation                 |
| hostcategories                         |
| hostcategories_relation                |
| hostgroup                              |
| hostgroup_hg_relation                  |
| hostgroup_relation                     |
| informations                           |
| locale                                 |
| meta_contact                           |
| meta_contactgroup_relation             |
| meta_service                           |
| meta_service_relation                  |
| mod_auto_disco_change                  |
| mod_auto_disco_ht_rule_relation        |
| mod_auto_disco_inclusion_exclusion     |
| mod_auto_disco_inst_rule_relation      |
| mod_auto_disco_macro                   |
| mod_auto_disco_rule                    |
| mod_auto_disco_rule_contact_relation   |
| mod_auto_disco_rule_service_relation   |
| mod_host_disco_credential              |
| mod_host_disco_credential_parameter    |
| mod_host_disco_host                    |
| mod_host_disco_host_already_discovered |
| mod_host_disco_job                     |
| mod_host_disco_job_parameter           |
| mod_host_disco_mapper                  |
| mod_host_disco_provider                |
| mod_host_disco_provider_compatibility  |
| mod_host_disco_provider_type           |
| mod_ppm_categories                     |
| mod_ppm_host_service_relation          |
| mod_ppm_icons                          |
| mod_ppm_information_url                |
| mod_ppm_pluginpack                     |
| mod_ppm_pluginpack_command             |
| mod_ppm_pluginpack_dependency          |
| mod_ppm_pluginpack_host                |
| mod_ppm_pluginpack_service             |
| mod_ppm_resultset_tpl                  |
| modules_informations                   |
| nagios_macro                           |
| nagios_server                          |
| ns_host_relation                       |
| ods_view_details                       |
| on_demand_macro_command                |
| on_demand_macro_host                   |
| on_demand_macro_service                |
| options                                |
| platform_topology                      |
| poller_command_relations               |
| provider_configuration                 |
| remote_servers                         |
| rs_poller_relation                     |
| security_authentication_tokens         |
| security_token                         |
| service                                |
| service_categories                     |
| service_categories_relation            |
| servicegroup                           |
| servicegroup_relation                  |
| session                                |
| task                                   |
| timeperiod                             |
| timeperiod_exceptions                  |
| timeperiod_exclude_relations           |
| timeperiod_include_relations           |
| timezone                               |
| topology                               |
| topology_JS                            |
| traps                                  |
| traps_group                            |
| traps_group_relation                   |
| traps_matching_properties              |
| traps_preexec                          |
| traps_service_relation                 |
| traps_vendor                           |
| user_filter                            |
| view_img                               |
| view_img_dir                           |
| view_img_dir_relation                  |
| virtual_metrics                        |
| widget_models                          |
| widget_parameters                      |
| widget_parameters_field_type           |
| widget_parameters_multiple_options     |
| widget_parameters_range                |
| widget_preferences                     |
| widget_views                           |
| widgets                                |
+--------------------

 

 

and 

 

Tables_in_centreon_storage     |
+--------------------------------+
| acknowledgements               |
| centreon_acl                   |
| comments                       |
| config                         |
| customvariables                |
| data_stats_daily               |
| data_stats_monthly             |
| data_stats_yearly              |
| downtimes                      |
| eventhandlers                  |
| flappingstatuses               |
| hostgroups                     |
| hosts                          |
| hosts_hostgroups               |
| hosts_hosts_dependencies       |
| hosts_hosts_parents            |
| hoststateevents                |
| index_data                     |
| instances                      |
| issues                         |
| issues_issues_parents          |
| log_action                     |
| log_action_modification        |
| log_archive_last_status        |
| log_traps                      |
| log_traps_args                 |
| metrics                        |
| modules                        |
| nagios_stats                   |
| notifications                  |
| schemaversion                  |
| servicegroups                  |
| services                       |
| services_servicegroups         |
| services_services_dependencies |
| servicestateevents       

 


Forum|alt.badge.img+11
  • Centreonian
  • Answer
  • May 2, 2022 2:27 PM UTC

 First time I’ve heard of the deletion of centreon_storage.logs (and I’ve done a lot of upgrade to the 21.10 version) 😅

 

Well, let’s recreate that table :
 

CREATE TABLE centreon_storage.`logs` (
`log_id` bigint(20) NOT NULL AUTO_INCREMENT,
`ctime` int(11) DEFAULT NULL,
`host_id` int(11) DEFAULT NULL,
`host_name` varchar(255) DEFAULT NULL,
`instance_name` varchar(255) NOT NULL,
`issue_id` int(11) DEFAULT NULL,
`msg_type` tinyint(4) DEFAULT NULL,
`notification_cmd` varchar(255) DEFAULT NULL,
`notification_contact` varchar(255) DEFAULT NULL,
`output` text DEFAULT NULL,
`retry` int(11) DEFAULT NULL,
`service_description` varchar(255) DEFAULT NULL,
`service_id` int(11) DEFAULT NULL,
`status` tinyint(4) DEFAULT NULL,
`type` smallint(6) DEFAULT NULL,
KEY `log_id` (`log_id`),
KEY `host_name` (`host_name`(64)),
KEY `service_description` (`service_description`(64)),
KEY `status` (`status`),
KEY `instance_name` (`instance_name`),
KEY `ctime` (`ctime`),
KEY `rq1` (`host_id`,`service_id`,`msg_type`,`status`,`ctime`),
KEY `rq2` (`host_id`,`msg_type`,`status`,`ctime`)
) ENGINE=InnoDB AUTO_INCREMENT=57759 DEFAULT CHARSET=utf8

 

Then, let’s manually execute the database partioning :

/usr/bin/php /usr/share/centreon/cron/centreon-partitioning.php -m logs

 

Finally, restart the cbd service.


Forum|alt.badge.img+11
  • Centreonian
  • May 2, 2022 2:56 PM UTC

Before everything, can you execute the follwowing command :

  • df -h 
  • ll /var/lib/mysql/centreon_storage/data_bin*
  • ll /var/lib/mysql/centreon_storage/logs*
  • ll /var/lib/mysql/centreon_storage/log_archive*

Forum|alt.badge.img+1
  • Author
  • Steward *
  • May 2, 2022 3:21 PM UTC

Let’s see by tomorrow. Finished my day.

 

thanks


Intence-Tech
Forum|alt.badge.img+5
  • Steward ***
  • Jul 11, 2022 8:19 AM UTC

Hello Community,

I have the same error (see capture below) and the topic didn’t help.


Here are the errors I have in /var/log/centreon-broker/central-broker-master.log
 

[2022-07-11T10:12:41.463+02:00] [perfdata] [error] storage: invalid perfdata format in service (47:3372): no numeric value after equal sign 'valeur'=;'

[2022-07-11T10:12:41.493+02:00] [sql] [error] mysql_connection: could not insert data in data_bin: Table 'centreon_storage.data_bin' doesn't exist

It seems that the table centreon_storage.data_bin does not exist.

Could you guide me to resolve the error and restore normal operation to centreon?
​​​​​​​

Thanks in advance.

Forum|alt.badge.img
  • Steward *
  • Aug 23, 2023 2:53 PM UTC

Hello @itoussies

 

I have the same problem as @Intence-Tech , could you help us please ? 

 

Thanks in advance


Forum|alt.badge.img+11
  • Centreonian
  • Aug 25, 2023 11:40 AM UTC

Hello,

If the table does not exist, you can create it with the following statement
 

CREATE TABLE `data_bin` (
`id_metric` int(11) DEFAULT NULL,
`ctime` int(11) DEFAULT NULL,
`value` float DEFAULT NULL,
`status` enum('0','1','2','3','4') DEFAULT NULL,
KEY `index_metric` (`id_metric`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;

 


Forum|alt.badge.img+1
  • Steward *
  • Aug 25, 2023 2:28 PM UTC

Hello,

If the table does not exist, you can create it with the following statement
 

CREATE TABLE `data_bin` (
`id_metric` int(11) DEFAULT NULL,
`ctime` int(11) DEFAULT NULL,
`value` float DEFAULT NULL,
`status` enum('0','1','2','3','4') DEFAULT NULL,
KEY `index_metric` (`id_metric`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;

 

thanks , i had this issue yesterday.

it seems this part must also be done :https://docs.centreon.com/fr/docs/administration/database-partitioning/#migration-des-tables-non-partitionn%C3%A9es so that the partitioning script can do his job by cron every day