javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2376 [localhost/127.0.0.1] failed: Connection refused

GitHub | neddogg | 2 months ago
  1. 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
  2. 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
  3. 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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Plugin fails when Docker for Mac is installed (OSX)

    GitHub | 8 months ago | Rambrant
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.spotify:docker-maven-plugin:0.4.5:build (server) on project web-service: Exception caught
  6. 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
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:345)
    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:74)
    2. org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
    3. org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
    4. org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
    5. org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    6. org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    7. org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    8. org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    9. org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    10. org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
    10 frames
  4. jersey-connectors-apache
    ApacheConnector.apply
    1. org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:435)
    1 frame
  5. jersey-core-client
    JerseyInvocation$2.call
    1. org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:252)
    2. org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:701)
    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:444)
    4 frames
  7. jersey-core-client
    JerseyInvocation$Builder.get
    1. org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:697)
    2. org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:420)
    3. org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:316)
    3 frames
  8. docker-java
    AbstrDockerCmd.exec
    1. com.github.dockerjava.jaxrs.InfoCmdExec.execute(InfoCmdExec.java:26)
    2. com.github.dockerjava.jaxrs.InfoCmdExec.execute(InfoCmdExec.java:13)
    3. com.github.dockerjava.jaxrs.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:23)
    4. com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
    4 frames
  9. test.docker.java
    App.main
    1. test.docker.java.App.main(App.java:28)
    1 frame