Search code examples
linuxdockercentosrheldocker-registry

RHEL7: How to solve “ import read failed(2)”?


I am trying to add Docker’s public key for CS packages using the following command( which is taken from the link https://docs.docker.com/docker-trusted-registry/install/install-csengine/):

sudo rpm --import "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"  

However, I am getting the following error on running the above command:

curl: (6) Could not resolve host: sks-keyservers.net; Name or service not known
error: https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e: import read failed(2).

Is it a firewall issue??

Please let me know if I need to add a host entry in /etc/hosts?


Solution

  • This problem is caused by your firewall, enable / disable it and try again

    systemctl disable firewalld
    systemctl stop firewalld
    

    or

    systemctl enable firewalld
    systemctl start firewalld