• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

certificate CLI cannot work since update

NicolasC

New Pleskian
Hi,

Since about 23rd of March 2010, the certificate command always fails :

# /opt/psa/bin/certificate --update "Name" -admin -cert-file certif.crt -key-file certif.key
ERROR: PleskMainDBException
MySQL query failed: Cannot delete or update a parent row: a foreign key constraint fails (`psa/IP_Addresses`, CONSTRAINT `IP_Addresses_ibfk_1` FOREIGN KEY (`ssl_certificate_id`) REFERENCES `certificates` (`id`))

0: common_func.php3:168
db_query(string 'replace certificates set `id`='2', `name`='Name', `csr`='', `pvt_key`='-----BEGIN+RSA+PRIVATE+KEY-----%0A[...]%0A-----END+RSA+PRIVATE+KEY-----%0A', `cert`='-----BEGIN+CERTIFICATE-----%0A[...]%0A-----END+CERTIFICATE-----%0A', `cert_file`='cert-hWaBYG', `ca_file`='cert-x2teLX'')
1: class.Table.php:316
Table->replaceData(array)
2: class.Table.php:282
Table->update(array)
3: class.cObject.php:352
cObject->update()
4: class.SSLCertificate.php:454
SSLCertificate->update()
5: cuCertificate.php:636
cuCertificate->cmdUpdate(string 'Name', array)
6: cuCertificate.php:191
cuCertificate->execute()
7: certificate.php:23

In order to make it working again, I had to delete the foreign key on table IP_Address (and by the way, brake the relation between the tables) :

SUCCESS: Update of certificate 'Name' complete

I don't understand why because nothing changed on this server.... Does this foreign key exist since a long time ?

Thanks for your help
Nicolas
 
Back
Top