Skip to main content

Hello,

I just added a new poller using API script. Everything seems fine, except my poller is in state “poller is not running”.

Communication between central and poller is OK.

On central logs, I see a lot of sql errors like this :

 

p2023-09-25T11:19:12.344+02:00] :sql] serror] mysql_connection: could not store host:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`hosts`, CONSTRAINT `hosts_ibfk_1` FOREIGN KEY (`instance_id`) REFERENCES `instances` (`instance_id`) ON DELETE CASCADE)
<2023-09-25T11:19:12.378+02:00] 2sql] [error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
)2023-09-25T11:19:12.423+02:00] 0sql] error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
E2023-09-25T11:19:12.431+02:00] +sql] ]error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
D2023-09-25T11:19:12.439+02:00] 9sql] 0error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
A2023-09-25T11:19:12.447+02:00] 4sql] 0error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
C2023-09-25T11:19:12.456+02:00] 4sql] :error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
S2023-09-25T11:19:12.464+02:00] .sql] 2error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
A2023-09-25T11:19:12.488+02:00] 2sql] 0error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
C2023-09-25T11:19:12.503+02:00] 1sql] +error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
2023-09-25T11:19:12.519+02:00] :sql] 9error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
E2023-09-25T11:19:12.528+02:00] 9sql] 2error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
T2023-09-25T11:19:12.539+02:00] 1sql] 5error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
E2023-09-25T11:19:12.546+02:00] :sql] .error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
L2023-09-25T11:19:12.557+02:00] 1sql] 2error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
E2023-09-25T11:19:12.566+02:00] 1sql] 1error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
D2023-09-25T11:19:12.573+02:00] Tsql] :error] mysql_connection: could not store service:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
2023-09-25T11:19:12.580+02:00] 5sql] 9error] mysql_connection: could not store host group membership:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`hosts_hostgroups`, CONSTRAINT `hosts_hostgroups_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
N2023-09-25T11:19:12.581+02:00] 2sql] 1error] mysql_connection: could not store host group membership:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`hosts_hostgroups`, CONSTRAINT `hosts_hostgroups_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
 

 

 

I guess that’s why my poller is not running...

can anybody tell me how to fix it please ?

 

My central is running 22.04.4 and my poller 23.04.4

Regards

I’ve remove all hosts linked to this poller, and still have SQL errors on central :

"2023-09-25T11:50:07.361+02:00] ]sql] ]error] mysql_connection: could not store host:  Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`hosts`, CONSTRAINT `hosts_ibfk_1` FOREIGN KEY (`instance_id`) REFERENCES `instances` (`instance_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.386+02:00] ]sql] ]error] mysql_connection: could not store host: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`hosts`, CONSTRAINT `hosts_ibfk_1` FOREIGN KEY (`instance_id`) REFERENCES `instances` (`instance_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.393+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.394+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.395+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.396+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.398+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.399+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.400+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.401+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.408+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.410+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.411+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.412+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.413+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.415+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.416+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.424+02:00] ]sql] ]error] mysql_connection: could not store service: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`services`, CONSTRAINT `services_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.426+02:00] ]sql] ]error] mysql_connection: could not store host group membership: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`hosts_hostgroups`, CONSTRAINT `hosts_hostgroups_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)
/2023-09-25T11:50:07.426+02:00] ]sql] ]error] mysql_connection: could not store host group membership: Cannot add or update a child row: a foreign key constraint fails (`centreon_storage`.`hosts_hostgroups`, CONSTRAINT `hosts_hostgroups_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`host_id`) ON DELETE CASCADE)

 


the new poller has not been created in centreon_storage.instances mysql tables


Reply