curl shows error on Plesk server: Could not resolve host: example.com: Name or

Started by Suhitha, Feb 23, 2026, 07:19 AM

Previous topic - Next topic

Suhitha

Question: curl shows error on Plesk server: Could not resolve host: example.com: Name or service not known

Applicable to:

  • Plesk for Linux


Symptoms

  • cURL utility does not work on the Plesk server.
  • Other tools are able to resolve the hostname properly.
  • Unable to open PHP page that uses cURL:

Could not resolve host: example.com: Name or service not known
  • CentOS/RHEL was upgraded to the newer version
  • OpenSSL packages were updated recently:
# grep -i ssl /var/log/yum.log
Updated: 1:openssl-libs-1.0.2k-12.el7.x86_64
Updated: 1:openssl-1.0.2k-12.el7.x86_64

  • glibc package was updated recently:

# grep -i glibc /var/log/yum.log
Updated: 1:glibc-2.17-196.el7_4.2.x86_64
Updated: 1

  • Cannot issue Let's Encrypt certificate:

ERR [extension/letsencrypt] Domain validation failed: Could not obtain directory: cURL error 6: Could not resolve host: acme-v01.api.letsencrypt.org; Name or service not known
  • Plesk license cannot be updated:

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)
  • Unable to add domains to Cloudflare with Cloudflare ServerShield extension.

  • Unable to install a license key in Tools & Settings > License Management > Install Key. Following error message appears in Plesk interface:

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

  • In some cases license can be successfully installed via CLI with the following command:

# plesk bin license -i AAAAA-BBBBB-CCCCC-DDDDD-EEEEE


Cause

Shared libraries used by curl were updated, for example: OpenSSL, glibc.


Resolution

Solution via Plesk UI:

1.Log in to Plesk.

2.Navigate to Tools & Settings > Server Management > Restart Server:



Alternatively, restart required services one by one:

1.Log into Plesk.

2.Navigate to Tools & Settings > Server Management > Services Management

3.Click on 'Restart' button for each FPM service, Apache and Nginx:



Note: Restart of Plesk services (sw-cp-server and sw-engine) is possible only from the command-line
interface.


Solution via the command-line interface:

1.Connect to the server via SSH.

2.Restart the services:

# systemctl restart sw-engine sw-cp-server httpd nginx php-fpm plesk-php72-fpm

Note: restart other FPM-services if used, execute the command below:

# plesk bin php_handler --list | grep -E plesk.*fpm | awk -F" " '{ print $1 }' | while read i; do service $i restart; done

3.If this does not help, reboot the server:

# reboot