Cannot generate Let's Encrypt certificates in CLI: Domain with name '' does not exist

Created:

2017-07-19 03:53:05 UTC

Modified:

2017-08-17 15:09:03 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Cannot generate Let's Encrypt certificates in CLI: Domain with name '' does not exist

Applicable to:

  • Plesk Onyx for Linux

Note: This article has the reference to the issue with the fix available:

  • #EXTLETSENC-226 "The command line interface did not allow to issue certificates for domains with www prefix."
    Fixed in:
Please consider updating your server:

Symptoms

Cannot generate let's encrypt certificates in command-line interface:

[root@server ~] # plesk bin extension --exec letsencrypt cli.php -d www.example.com --email admin@example.com
ERR [extension/letsencrypt]
 Execution of /usr/local/psa/admin/plib/modules/letsencrypt/scripts/cli.php failed with exit code 1 and the output:
PHP Warning: substr() expects parameter 2 to be long, string given; File: /usr/local/psa/admin/plib/modules/letsencrypt/library/Bridge/Domain.php, Line: 80
Curl failed: Timeout was reached
Domain with name '' does not exist
Execution of /usr/local/psa/admin/plib/modules/letsencrypt/scripts/cli.php failed with exit code 1 and the output:
PHP Warning: substr() expects parameter 2 to be long, string given; File: /usr/local/psa/admin/plib/modules/letsencrypt/library/Bridge/Domain.php, Line: 80
Curl failed: Timeout was reached
Domain with name '' does not exist

Cause

This is Let's Encrypt extension bug with ID EXTLETSENC-226 which will be fixed in future updates.

Resolution

As a workaround, deploy a temporary fix:

1. download the fix and unpack it:

# wget https://support.plesk.com/hc/en-us/article_attachments/115001052693/Domain.php.tar.gz

# tar zxvf Domain.php.tar.gz

2. replace the domain.php with a fixed copy:

# cp Domain.php /usr/local/psa/admin/plib/modules/letsencrypt/library/Bridge/Domain.php

Alternatively, the certificate can be requested via Plesk Control Panel: Subscriptions > example.com > Websites & Domains > Let's Encrypt

Attachments:

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