Seite 1 von 1
Backend referential integrity error
Verfasst: 01 Dez 2014, 13:58
von Antoine GUEVARA
Hi,
When I try to re install a host with opsi-local-image, during the hwinvent I have this error :
This is my
/etc/opsi/backendManager/dispatch.conf file :
Code: Alles auswählen
backend_.* : mysql, file, opsipxeconfd
host_.* : mysql , file, opsipxeconfd
productOnClient_.* : mysql, opsipxeconfd
configState_.* : mysql, opsipxeconfd
audit.* : mysql, file
license.* : mysql
softwareLicense.* : mysql
.* : file
All packages are up-to-date ( 4.0.5 *** )
I think it is link to the mysql module, but anyone have already fix this issue ?
Thanks
Antoine
Re: Backend referential integrity error
Verfasst: 01 Dez 2014, 14:00
von Antoine GUEVARA
I have to delete /var/lib/opsI/config/audit/<myclient>.hw and its works again ( for the first installation ), if I try an other install I have the same message backend integrity ....
Re: Backend referential integrity error
Verfasst: 01 Dez 2014, 19:42
von wolfbardo
Hi Antoine,
your dispatch.conf is wrong
if you one a use the mysql backend, your dispatch.conf should look like
Code: Alles auswählen
backend_.* : mysql, opsipxeconfd
host_.* : mysql, opsipxeconfd
productOnClient_.* : mysql, opsipxeconfd
configState_.* : mysql, opsipxeconfd
license.* : mysql
softwareLicense.* : mysql
audit.* : mysql
.* : mysql
If you use the recommended standard backend, you should use
Code: Alles auswählen
# Recommended standard configuration (dhcpd not at the opsi server)
# file as main backend, mysql as hw/sw invent
# and license management backend and opsipxeconfd backend:
backend_.* : file, mysql, opsipxeconfd
host_.* : file, opsipxeconfd
productOnClient_.* : file, opsipxeconfd
configState_.* : file, opsipxeconfd
license.* : mysql
softwareLicense.* : mysql
audit.* : mysql
.* : file
regards,
bardo wolf
Re: Backend referential integrity error
Verfasst: 02 Dez 2014, 08:46
von Antoine GUEVARA
Ok, thank you,
But now when I try to import file backend to mysql backend I always have this error :
Code: Alles auswählen
ERROR: Backend error: Failed to install package '/var/lib/opsi/repository/config-win-base_4.0.1-1.opsi' on depot 'opsixxxxxxxxx.fr': (1452, 'Cannot add or update a child row: a foreign key constraint fails (`opsixxxxxxx`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))')
And I don't see my packages, depot is empty.
Thank you for your help.
Antoine
Re: Backend referential integrity error
Verfasst: 02 Dez 2014, 08:52
von Antoine GUEVARA
extract of :
opsi-convert file mysql
Code: Alles auswählen
Error occured: Failed to replicate object <ProductOnDepot productId 'win2k', depotId 'opsi.FQDN'>: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`opsixxxxxxxx`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))')==================== ] 93/107
Error occured: Failed to replicate object <ProductOnDepot productId 'win7', depotId 'opsi.FQDN'>: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`opsixxxxxxxx`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))')====================== ] 94/107
Error occured: Failed to replicate object <ProductOnDepot productId 'win7-x64', depotId 'opsi.FQDN'>: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`opsixxxxxxxx`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))')================== ] 95/107
Error occured: Failed to replicate object <ProductOnDepot productId 'win8', depotId 'opsi.FQDN'>: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`opsixxxxxxxx`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))')======================= ] 96/107
Error occured: Failed to replicate object <ProductOnDepot productId 'win8-x64-enterprise', depotId 'opsi.FQDN'>: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`opsixxxxxxxx`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))')========= ] 97/107
Error occured: Failed to replicate object <ProductOnDepot productId 'win8-x64', depotId 'opsi.FQDN'>: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`opsixxxxxxxx`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))')==================== ] 98/107
Error occured: Failed to replicate object <ProductOnDepot productId 'win81', depotId 'opsi.FQDN'>: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`opsixxxxxxxx`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))')======================== ] 99/107
Error occured: Failed to replicate object <ProductOnDepot productId 'win81-x64', depotId 'opsi.FQDN'>: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`opsixxxxxxxx`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))')==================== ] 100/107
Error occured: Failed to replicate object <ProductOnDepot productId 'windomain', depotId 'opsi.FQDN'>: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`opsixxxxxxxx`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))')===================== ] 101/107
Error occured: Failed to replicate object <ProductOnDepot productId 'winvista', depotId 'opsi.FQDN'>: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`opsixxxxxxxx`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))')====================== ] 102/107
Error occured: Failed to replicate object <ProductOnDepot productId 'winvista-x64', depotId 'opsi.FQDN'>: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`opsixxxxxxxx`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))')=================== ] 103/107
Error occured: Failed to replicate object <ProductOnDepot productId 'winxppro', depotId 'opsi.FQDN'>: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`opsixxxxxxxx`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))')======================= ] 104/107
Error occured: Failed to replicate object <ProductOnDepot productId 'winxppro-x64', depotId 'opsi.FQDN'>: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`opsixxxxxxxx`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))')==================== ] 105/107
Error occured: Failed to replicate object <ProductOnDepot productId 'wipedisk', depotId 'opsi.FQDN'>: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`opsixxxxxxxx`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))')
Re: Backend referential integrity error
Verfasst: 02 Dez 2014, 15:38
von wolfbardo
mmh,
you where running with a somehow broken mysql-backend.
if you want to switch back to file-Backend, you can try
The other way around it would be good, if you have a opsi-backup (
http://download.uib.de/opsi4.0/doc/html ... ual-backup)
regards,
bardo Wolf
Re: Backend referential integrity error
Verfasst: 03 Dez 2014, 08:03
von Antoine GUEVARA
Hi,
Thank you for your reply, but I think there are problems with mysql and depot∕host with fqdn > 50 chars
Here is my bug topic.
viewtopic.php?f=6&t=7016
Regards,
Antoine