Unable to remove certificate: One or several certificates are assigned to the IP addresses or domains

Refers to:

  • Plesk for Windows
  • Plesk for Linux

Created:

2016-11-16 13:21:51 UTC

Modified:

2017-02-21 11:02:37 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Unable to remove certificate: One or several certificates are assigned to the IP addresses or domains

Symptoms

An attempt to remove an SSL certificate from example.com domain fails with the following error:

Unable to remove certificates: one or several certificates are assigned to the IP addresses/domains.

Cause

The certificate is assigned to another domain or an IP address and is currently in use.

Resolution

To find another domain or an IP address where SSL is used follow the steps below:

  1. Log in to psa database:

    Linux:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa

    Windows:

    # "%plesk_dir%\\MySQL\\bin\\mysql" -P8306 -uadmin -p psa
  2. Retrieve the certificate ID:

    mysql> select id, name from certificates where name = 'cert_name';
    +----+-----------+
    | id | name |
    +----+-----------+
    | 7 | cert_name |
    +----+-----------+
    1 row in set (0.00 sec)

'cert_name' is the name of the certificate that you are trying to remove. It can be checked at Domains > example.com > SSL Certificates > name :

alttext

  1. Find the domain to which the certificate was assigned:
    mysql> select d.name from domains d inner join hosting h on h.dom_id = d.id where h.certificate_id = 7;
    +----------------------+
    | name |
    +----------------------+
    | example.com |
    | example1.com |
    +----------------------+
    2 rows in set (0.00 sec)

NOTE: If the result is empty, the certificate is assigned to an IP address. To retrieve the IP address, execute the following query in psa database:

    mysql> select  ip_address from IP_Addresses where ssl_certificate_id = 7;
+--------------+
| ip_address |
+--------------+
| 203.0.113.2 |
+--------------+
1 rows in set (0.00 sec)
  1. Unassign or change the certificate from the domain example1.com so it can be removed:

Open Domains > example1.com > Hosting Settings and set Certificate to "Not selected"

![SSL support](http://kb.plesk.com/Attachments/kcs-2423/Screenshot_59.png "SSL support")
  1. If SSL is assigned to an IP address, remove it in Tools and Settings > IP Addresses > click on an IP address 203.0.113.2

  2. Remove the certificate again in Domains > example.com > SSL Certificates

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