Articles in this section

External hosts are not resolved from a Plesk server: "Name or service not known" or "Could not resolve host"

Plesk for Linux kb: technical ABT: Group A

Applicable to:

  • Plesk for Linux

Symptoms

  • nginx fails to start with the error message:

    CONFIG_TEXT: nginx[58503]: nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "r3.o.lencr.org" in the certificate "/usr/local/psa/var/certificates/scfO1mntc"

  • When securing a domain with a Let's Encrypt certificate, the operation fails with:

    PLESK_ERROR: Could not issue a Let's Encrypt SSL/TLS certificate for example.com
    Failed to connect to the Let's Encrypt server https://acme-v01.api.letsencrypt.org.
    Please try again later or report the issue to support.

    Details

    Could not obtain directory:

  • When installing a Plesk license, the operation fails with:

    PLESK_ERROR: cURL cannot communicate with license server https://id-00.kaid.plesk.com:443/ (): Couldn't resolve host name(6) cURL cannot communicate with license server https://id-00.kaid.plesk.com:443/ (): Couldn't resolve host name(6) (Error code: 2)


    PLESK_ERROR: Could not update the license. Make sure that connections to the license server ka.plesk.com on TCP port 443 are not blocked. See how to do so.

  • On attempt to connect to any external host using the cURL utility, the command shows:

    # curl -I http://example.com
    curl: (6) Could not resolve host: example.com

Cause

The DNS resolver specified in the file /etc/resolv.conf cannot resolve domain names.

Resolution

  1. Connect to the Plesk server via SSH.

  2. Open the file /etc/resolv.conf in a text editor. In this example, we are using the vi editor:

    # vi /etc/resolv.conf

  3. Comment out the invalid resolver by placing a # (hash) character at the beginning of the line:

    CONFIG_TEXT: #nameserver 203.0.113.2

  4. Add a different DNS resolver, for example Cloudflare DNS:

    CONFIG_TEXT: nameserver 1.1.1.1

  5. Save the change and close the file.

    Note: /etc/resolv.conf can be overwritten on Ubuntu 18.04 and higher by netplan and systemd-resolved.services. To learn more, see this KB article.

  6. Retry the previously failed operation.

    Note: If the above solution does not help, contact your service provider in order to check the network setup.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.