From inside a Linux container, attempted curl or DNS resolution for URLs with multiple redirects returns errors such as, 'UnknownHostException', 'Name or service not known' and 'Unknown error'

Solution In Progress - Updated -


Under certain circumstances, trying to curl URLs with multiple redirects from inside a Linux container returns errors such as, 'Unknown error.' If DNS resolution is attempted to the same address, errors such as 'UnknownHostException' and 'Name or service not known' may be thrown by the DNS client. This can occur even though successful connection or DNS resolution may be possible from one of the cluster nodes and from outside of the OpenShift cluster.

For example, trying to curl to "" may result in an error like:

$ oc rsh <pod_name> -n <project_name>
sh-4.2$ curl 
curl: (6) Could not resolve host:; Unknown error


  • OpenShift
    • 3.x
    • 4.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content