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 :
[2023-09-25T11:19:12.344+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:19:12.378+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:19:12.423+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: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)
[2023-09-25T11:19:12.439+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:19:12.447+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:19:12.456+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:19:12.464+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:19:12.488+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:19:12.503+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:19:12.519+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:19:12.528+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:19:12.539+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: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)
[2023-09-25T11:19:12.557+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:19:12.566+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:19:12.573+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:19:12.580+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:19:12.581+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)
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