Docker: Failed to resolve host name updates.jenkins-ci.org

Created on 18 Feb 2015  路  13Comments  路  Source: jenkinsci/docker

After starting the container, the webpage is correctly reachable but when I want to update the plugins, Jenkins throws me that :

Checking internet connectivity
Checking update center connectivity
Failed to resolve host name updates.jenkins-ci.org. Perhaps you need to configure HTTP proxy?

java.net.UnknownHostException: updates.jenkins-ci.org
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:579)
    at java.net.Socket.connect(Socket.java:528)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
    at sun.net.www.http.HttpClient.New(HttpClient.java:308)
    at sun.net.www.http.HttpClient.New(HttpClient.java:326)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1300)
    at hudson.model.UpdateCenter$UpdateCenterConfiguration.testConnection(UpdateCenter.java:872)
    at hudson.model.UpdateCenter$UpdateCenterConfiguration.checkUpdateCenter(UpdateCenter.java:710)
    at hudson.model.UpdateCenter$ConnectionCheckJob.run(UpdateCenter.java:1045)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104)
    at java.lang.Thread.run(Thread.java:745)

Most helpful comment

service docker restart solved the problem.

All 13 comments

Guy did you figure out what was the cause of this ?
The ticket was closed by op without updates.
Is it a misconfiguration in docker somewhere ?

Thank you!

Misconfiguration with Docker and the firewall.

Hi LnAlex,

Will it be possible for you to provide more information on this issue? How did you solve it?

p.s: I am an ex-employee of Atos, India and worked for the AWL project. It is a small world!

I was connected to my VPN, hence it wasn't working for me. I disconnected and now I am no longer facing any issues.

Small world indeed !

That's quite a long time, It was a misconfiguration with my iptables rules on my server and port binding with my container. I did not remember how I fixed it exactly (it was my first times with Docker therefore I was not very smart to using it).

I started the docker container as instructed with no configuration to speak of and see this error not sure what inside docker needs to be configured. Maybe can someone put it with the instructions?
Instructions - https://hub.docker.com/_/jenkins/
$ docker run -p 8080:8080 -p 50000:50000 jenkins

---Log----
Installing Plugins/Upgrades
Preparation
Checking internet connectivity
Checking update center connectivity
Failed to resolve host name updates.jenkins-ci.org. Perhaps you need to configure HTTP proxy?
java.net.UnknownHostException: updates.jenkins-ci.org
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.http.HttpClient.(HttpClient.java:211)
at sun.net.www.http.HttpClient.New(HttpClient.java:308)
at sun.net.www.http.HttpClient.New(HttpClient.java:326)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1169)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:933)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.testConnection(UpdateCenter.java:1143)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.checkUpdateCenter(UpdateCenter.java:953)
at hudson.model.UpdateCenter$ConnectionCheckJob.run(UpdateCenter.java:1360)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
at java.lang.Thread.run(Thread.java:745)

there's nothing to be configured by default, your docker host needs to have internet access and the right dns config

@lnalex You should re-run your jenkins images with parameter "--dns 8.8.8.8". Additional, don't forget to back up your jenkins data if you didn't mount a volume.

@yedaodao worked fine on my container jenkins! great!

service docker restart solved the problem.

docker restart worked for me

service docker restart solved the problem.

no use docker, how do

Hi There. After trying different things, these commands worked for me:

Disable and stop the firewall on my Centos Host
sudo systemctl disable firewalld
sudo systemctl stop firewalld

Then, restart docker

`sudo service docker restart`

I hope it works for you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arthurvanduynhoven picture arthurvanduynhoven  路  3Comments

lfcgomes picture lfcgomes  路  8Comments

simonCor picture simonCor  路  3Comments

jiankafei picture jiankafei  路  7Comments

manoj150283 picture manoj150283  路  3Comments