Unable to load object of type SSLCertificate with id=: SSLCertificate: unable to select: no such row in the table

Created:

2016-11-16 12:56:21 UTC

Modified:

2017-04-26 09:37:19 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to load object of type SSLCertificate with id=: SSLCertificate: unable to select: no such row in the table

Applicable to:

  • Plesk for Linux

Symptoms

SSl certificates menu at Tools & Settings , or in the domain\client control panel displays the below error:

Unable to load object of type SSLCertificate with id=1: SSLCertificate: unable to select: no such row in the table

0: common_func.php3:3160
objectMakerEx(string 'SSLCertificate', integer '1')
1: IPControlClientForm.php:28
IPControlClientForm->getCertificates(object of type IPAddress, object of type Client)
2: IPControlForm.php:121
IPControlForm->assign(object of type IPAddress, object of type Client)
3: IPControlClientForm.php:104
IPControlClientForm->assign(object of type IPAddress, object of type Client)
4: client.ipaddress.properties.php:93
plesk__client__ipaddress__properties->renderEditForm(boolean true)
5: client.ipaddress.properties.php:55
plesk__client__ipaddress__properties->render(boolean true)
6: client.ipaddress.properties.php:36
plesk__client__ipaddress__properties->accessItem(string 'GET', NULL null)
7: UIPointer.php:596
UIPointer->access(string 'GET')
8: plesk.php:38

Cause

Inconsistency in Plesk database.

Resolution

  1. Backup Plesk database.

  2. Find out a domain which has a link to a non-existing SSL certificate in psa database:

    mysql> select d.id, d.name, R.rep_id, R.component_id, c.id from domains d, Repository R left join certificates c on c.id=R.component_id where d.cert_rep_id=R.rep_id and c.id is NULL;
    +----+-----------------+--------+--------------+------+

    | id | name | rep_id | component_id | id |
    +----+-----------------+--------+--------------+------+

    | 7 | domain.tld | 1 | 1 | NULL |
    +----+-----------------+--------+--------------+------+
    1 row in set (0.00 sec)

    An entry 'component_id=1' in 'Repository' table points to a non-existent entry in 'certificates' (this is indicated by NULL id in the query result). It should be corrected.

  3. Find the out if the mentioned domain is a default one for any IP address. 'default_domain_id' should be taken from the p.2 result) :

    mysql> select * from IP_Addresses where default_domain_id=7;
    +----+---------------+-----------------+-------+--------------------+-------------------+-------+

    | id | ip_address | mask | iface | ssl_certificate_id | default_domain_id | ftps |
    +----+---------------+-----------------+-------+--------------------+-------------------+-------+

    | 1 | 11.22.33.44 | 255.255.255.192 | eth0 | 30 | 7 | false |
  4. In case if the previous entry returned the result, assign the correct certificate ID accordingly:

    mysql> update Repository set component_id = 30 where rep_id = 1 and component_id =1;
  5. In case if the domain is not a default one for any IP address, or 'ssl_certificate_id' from the previous query is 0, then update the 'domains' table and set 0 'cert_rep_id' .

    mysql> update domains set cert_rep_id=0 where id=7;

    You may re-upload the valid SSL certificate and assign it to a domain further.

Have more questions? Submit a request
Please sign in to leave a comment.