java.lang.RuntimeException: javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to 172.17.0.1:4243 [/172.17.0.1] failed: Connection refused

Jenkins JIRA | Jordi Cabré | 2 months ago
  1. 0

    jenkins and docker-build-step-plugin configuration

    Stack Overflow | 2 months ago | Jordi
    java.lang.RuntimeException: javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to 172.17.0.1:4243 [/172.17.0.1] failed: Connection refused
  2. 0

    Everything went fine until having updated `docker-build-step-plugin`. After that, my job dumps me the message I dump bellow. I've took a look on `Global Cofiguration Tool` and I've realized my old Docker configuration has benn removed and appears another empty one which is nothing to do with the older one. I don't quite to difure out how to configure Docker again {code:java} [Docker] INFO: Creating docker image from /var/lib/jenkins/workspace/Create WebAPI Docker Image/webapi/QA 09:10:57 ERROR: Build step failed with exception 09:10:57 java.lang.RuntimeException: javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to 172.17.0.1:4243 [/172.17.0.1] failed: Connection refused 09:10:57 at org.jenkinsci.plugins.dockerbuildstep.cmd.CreateImageCommand.execute(CreateImageCommand.java:139) 09:10:57 at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder.perform(DockerBuilder.java:75) 09:10:57 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 09:10:57 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) 09:10:57 at hudson.model.Build$BuildExecution.build(Build.java:205) 09:10:57 at hudson.model.Build$BuildExecution.doRun(Build.java:162) 09:10:57 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) 09:10:57 at hudson.model.Run.execute(Run.java:1720) 09:10:57 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 09:10:57 at hudson.model.ResourceController.execute(ResourceController.java:98) 09:10:57 at hudson.model.Executor.run(Executor.java:404) 09:10:57 Caused by: javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to 172.17.0.1:4243 [/172.17.0.1] failed: Connection refused 09:10:57 at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:513) 09:10:57 at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:246) 09:10:57 at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:683) 09:10:57 at org.glassfish.jersey.internal.Errors.process(Errors.java:315) 09:10:57 at org.glassfish.jersey.internal.Errors.process(Errors.java:297) 09:10:57 at org.glassfish.jersey.internal.Errors.process(Errors.java:228) 09:10:57 at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424) 09:10:57 at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:679) 09:10:57 at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:435) 09:10:57 at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:338) 09:10:57 at com.github.dockerjava.jaxrs.BuildImageCmdExec.execute(BuildImageCmdExec.java:71) 09:10:57 at com.github.dockerjava.jaxrs.BuildImageCmdExec.execute(BuildImageCmdExec.java:27) 09:10:57 at com.github.dockerjava.jaxrs.AbstrDockerCmdExec.exec(AbstrDockerCmdExec.java:57) 09:10:57 at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:29) 09:10:57 at org.jenkinsci.plugins.dockerbuildstep.cmd.CreateImageCommand.execute(CreateImageCommand.java:110) 09:10:57 ... 10 more 09:10:57 Caused by: org.apache.http.conn.HttpHostConnectException: Connect to 172.17.0.1:4243 [/172.17.0.1] failed: Connection refused 09:10:57 at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:142) 09:10:57 at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:319) 09:10:57 at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363) 09:10:57 at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219) 09:10:57 at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195) 09:10:57 at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86) 09:10:57 at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108) 09:10:57 at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) 09:10:57 at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72) 09:10:57 at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:465) 09:10:57 ... 24 more 09:10:57 Caused by: java.net.ConnectException: Connection refused 09:10:57 at java.net.PlainSocketImpl.socketConnect(Native Method) 09:10:57 at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) 09:10:57 at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) 09:10:57 at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) 09:10:57 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 09:10:57 at java.net.Socket.connect(Socket.java:589) 09:10:57 at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:72) 09:10:57 at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:125) 09:10:57 ... 33 more 09:10:57 Build step 'Execute Docker command' marked build as failure 09:10:57 Finished: FAILURE {code}

    Jenkins JIRA | 2 months ago | Jordi Cabré
    java.lang.RuntimeException: javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to 172.17.0.1:4243 [/172.17.0.1] failed: Connection refused
  3. 0

    Unable connect to docker with docker-java

    GitHub | 2 months ago | neddogg
    javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2376 [localhost/127.0.0.1] failed: Connection refused
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error connecting to containers created with latest version of openshift

    GitHub | 2 years ago | rawlingsj
    org.apache.http.conn.HttpHostConnectException: Connect to jrmacbook.local:9802 [jrmacbook.local/10.0.1.12, jrmacbook.local/192.168.50.1, jrmacbook.local/192.168.59.3, jrmacbook.local/fe80:0:0:0:3e15:c2ff:fec0:c8a4%4] failed: Connection refused
  6. 0
    host port isnt set
    via GitHub by rawlingsj
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.ConnectException

    Connection refused

    at java.net.PlainSocketImpl.socketConnect()
  2. Java RT
    Socket.connect
    1. java.net.PlainSocketImpl.socketConnect(Native Method)
    2. java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    3. java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    4. java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    5. java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    6. java.net.Socket.connect(Socket.java:589)
    6 frames
  3. Apache HttpClient
    CloseableHttpClient.execute
    1. org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:72)
    2. org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:125)
    3. org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:319)
    4. org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
    5. org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
    6. org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
    7. org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
    8. org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
    9. org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    10. org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
    10 frames
  4. jersey-connectors-apache
    ApacheConnector.apply
    1. org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:465)
    1 frame
  5. jersey-core-client
    JerseyInvocation$2.call
    1. org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:246)
    2. org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:683)
    2 frames
  6. Jersey Core
    RequestScope.runInScope
    1. org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    2. org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    3. org.glassfish.jersey.internal.Errors.process(Errors.java:228)
    4. org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424)
    4 frames
  7. jersey-core-client
    JerseyInvocation$Builder.post
    1. org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:679)
    2. org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:435)
    3. org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:338)
    3 frames
  8. docker-java
    AbstrDockerCmd.exec
    1. com.github.dockerjava.jaxrs.BuildImageCmdExec.execute(BuildImageCmdExec.java:71)
    2. com.github.dockerjava.jaxrs.BuildImageCmdExec.execute(BuildImageCmdExec.java:27)
    3. com.github.dockerjava.jaxrs.AbstrDockerCmdExec.exec(AbstrDockerCmdExec.java:57)
    4. com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:29)
    4 frames
  9. org.jenkinsci.plugins
    DockerBuilder.perform
    1. org.jenkinsci.plugins.dockerbuildstep.cmd.CreateImageCommand.execute(CreateImageCommand.java:110)
    2. org.jenkinsci.plugins.dockerbuildstep.DockerBuilder.perform(DockerBuilder.java:75)
    2 frames
  10. Hudson
    Executor.run
    1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
    3. hudson.model.Build$BuildExecution.build(Build.java:205)
    4. hudson.model.Build$BuildExecution.doRun(Build.java:162)
    5. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
    6. hudson.model.Run.execute(Run.java:1720)
    7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    8. hudson.model.ResourceController.execute(ResourceController.java:98)
    9. hudson.model.Executor.run(Executor.java:404)
    9 frames