Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-31394

Using socket as "Docker URL" causes Exception

    Details

    • Similar Issues:

      Description

      When trying to use the socket connection to docker (Docker URL = unix:///var/run/docker.sock) the build fails with the following exception:

      javax.ws.rs.ProcessingException: Could not initialize class org.newsclub.net.unix.NativeUnixSocket
      at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:255)
      at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:683)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
      at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424)
      at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:679)
      at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:435)
      at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:338)
      at com.github.dockerjava.jaxrs.CreateContainerCmdExec.execute(CreateContainerCmdExec.java:32)
      at com.github.dockerjava.jaxrs.CreateContainerCmdExec.execute(CreateContainerCmdExec.java:14)
      at com.github.dockerjava.jaxrs.AbstrDockerCmdExec.exec(AbstrDockerCmdExec.java:57)
      at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:29)
      at com.github.dockerjava.core.command.CreateContainerCmdImpl.exec(CreateContainerCmdImpl.java:376)
      at org.jenkinsci.plugins.dockerbuildstep.cmd.CreateContainerCommand.execute(CreateContainerCommand.java:143)
      at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder.perform(DockerBuilder.java:75)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
      at hudson.model.Build$BuildExecution.build(Build.java:205)
      at hudson.model.Build$BuildExecution.doRun(Build.java:162)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
      at hudson.model.Run.execute(Run.java:1741)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
      Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.newsclub.net.unix.NativeUnixSocket
      at org.newsclub.net.unix.AFUNIXSocketImpl.connect(AFUNIXSocketImpl.java:134)
      at org.newsclub.net.unix.AFUNIXSocket.connect(AFUNIXSocket.java:97)
      at com.github.dockerjava.jaxrs.ApacheUnixSocket.connect(ApacheUnixSocket.java:66)
      at com.github.dockerjava.jaxrs.UnixConnectionSocketFactory.connectSocket(UnixConnectionSocketFactory.java:78)
      at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:125)
      at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:319)
      at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
      at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
      at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
      at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
      at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
      at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
      at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
      at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:465)
      at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:246)

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              vjuranek vjuranek
              Reporter:
              nitek Claus Näveke
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: