• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Solutions for recent Let´s Encrypt issues

trialotto

Golden Pleskian
Plesk Guru
@Everyone,

In the recent days or weeks, a Let´s Encrypt related issue was re-occurring on the Plesk Forum.

SYMPTOM: error notification of the kind and/or with the text "Unable to set certificate name".

The solution is quite simple and can be found on:

Error "Unable to set certificate name :" · plesk/letsencrypt-plesk Wiki · GitHub

In short, thanks to @EugeneKazakov !!

However, for the sake of convenience, I will provide the steps to be followed in chronological order

1) login to SSH

2) verify the existence of the certificate by running the command:

plesk db "select id, name from certificates where name = 'Lets Encrypt <sub>.<domain>.<tld>'"

3) check for inconsistencies by running the command:

plesk db "select c.id, c.name, r.rep_id, d.name from certificates c left join Repository r on (c.id = r.component_id) left join domains d on (r.rep_id = d.cert_rep_id) where r.rep_id not in (select val from misc where param = 'cert_rep_id') or r.rep_id is null"

and note that the first column "name" is the Let´s Encrypt certificate name, whereas the second column "name" is the domain in which the Let´s Encrypt certificate has been applied, implying that

a - if you have a NULL in the second "name" column, then it is safe to remove the certificate
b - if you do not have a NULL in the second "name" column, then it is also safe to remove the certificate, but this is also indicating a root cause of another problem,

and note that the before mentioned root cause of the problem is not often related to the Plesk Let´s Encrypt extension, but to some external issues, being mostly database corruption due to (amongst others)

- faulty migration
- backup/restore sequences
- manually running the Let´s Encrypt commands from the command line

and so on.

4) clean up the database by running the commands (in the order mentioned below):

plesk db "delete r.* from Repository r inner join certificates c on (r.component_id = c.id) where c.name = 'Lets Encrypt <sub>.<domain>.<tld>'"

plesk db "delete from certificates where name = 'Lets Encrypt <sub>.<domain>.<tld>'"

5) in order to be sure, update the Plesk Let´s Encrypt extension:

- go to "Extensions > Extension Catalog (click) > Let´s Encrypt (click upgrade)"

6) install a new certificate on <sub>.<domain>.<tld> by:

- using the Plesk Let´s Encrypt Extension: go to "Extensions > Let´s Encrypt (click)", OR
- using the Plesk Panel: go to "Domains > [ <sub>.<domain>.<tld> ] (select) > Let´s Encrypt (click)"

and that would suffice to install a proper certificate without error notifications.

If it does not work, just post in this thread.

Hope the above helps!

Regards........
 
@Everyone,

At this moment, there are some service disruptions that can affect the Let´s Encrypt certification process.

The above mentioned service disruptions affect (at least)

  1. Creation and renewal of Let´s Encrypt certificates, (and)
  2. Let´s Encryption certificates for Plesk Panel,
and note that a Let´s Encrypt certificate for Plesk Panel, assigned during any service disruption, is not present, even though the Security Advisor Extension states otherwise.

More information about the service disruption can be found on: Let's Encrypt Status

Hope the above helps (and have some patience, since the issues with Let´s Encrypt service are being resolved at this moment).

Regards......
 
@Everyone,

The service disruption has been resolved, Let´s Encrypt should be working fine now.

If you (still) encounter any problems, just post them in this topic thread, maybe I can be of some assistance.

Regards...........
 
@Everyone,

A similar issue as mentioned in the first post can occur when migrating subdomains.

SYMPTOM: LE certificates for subdomains of the sort <sub>.<domain>.<tld> cannot be installed or renewed.

CAUSE: the database is corrupted and shows something similar to

+-----+-----------------------------------------+--------+--------------------+
| id | name | rep_id | name |
+-----+-----------------------------------------+--------+--------------------+
| 165 | Lets Encrypt <domain>.<tld> | 111 | <domain>.<tld> |
| 166 | Lets Encrypt <sub>.<domain>.<tld> | 111 | <domain>.<tld> |
+-----+-----------------------------------------+--------+--------------------+
2 rows in set (0.00 sec)

when using the mysql command:

mysql> select c.id, c.name, r.rep_id, d.name from certificates c left join Repository r on (c.id = r.component_id) left join domains d on (r.rep_id = d.cert_rep_id) where c.name like "%<domain>.<tld>%";

Please note the "like" term in the mysql command!

The whole process of installing/renewing the LE certificates is very similar to the method, mentioned in my first post.

The steps to follow are (in chronological order)

1) to enter the database, run the command (from SSH): plesk db

2) run the mysql command: delete r.* from Repository r inner join certificates c on (r.component_id = c.id) where c.name = '<sub>.<domain>.<tld>';

3) run the mysql command: delete from certificates where name = 'Lets Encrypt <sub>.<domain>.<tld>';

4) use Plesk Panel, with

- the Security Advisor extension, OR
- under Domains > [Domain] > Let's Encrypt (click)

to install a new LE certificate.

That is all!

Hope the above helps a bit!

Regards..............
 
Back
Top