'Let's Encrypt CLI not working: Failed to connect to acme-v02.api.letsencrypt.org port 443

I want to deploy a SSL certificate via shell but after a few seconds the following error occurs:

# plesk bin extension --exec letsencrypt cli.php -d DOMAIN --email EMAIL

[2022-01-25 19:50:08.293] 8075:61f046604762a ERR [extension/letsencrypt] The execution of cli.php has failed with the following message:
Could not obtain directory: cURL error 7: Failed to connect to acme-v02.api.letsencrypt.org port 443: Connection timed out (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
The execution of cli.php has failed with the following message:
Could not obtain directory: cURL error 7: Failed to connect to acme-v02.api.letsencrypt.org port 443: Connection timed out (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

exit status 1

DOMAIN is our domain and EMAIL is an email address.

Does anyone what the problem is?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source