Details

    • Type: Bug
    • Status: Open
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: 2.12.0
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      Jenkins 2.60.3 LTS
      Jenkins Artifactory Plugin 2.12.1
      Docker 17.03.1
      Artifactory 5.4.6

      Description

      Since the change to netty Artifactory Docker on Windows fails to push images as it tries to connect to the Docker daemon using Unix sockets instead of tcp (as defined in the Jenkinsfile).

      Sample from Jenkinsfile:

      def rtDockerWin = Artifactory.docker credentialsId: 'aaaaaa-bbbbbb-ccccc', host: "tcp://127.0.0.1:2375"
      for(int i = 0; i < imgs.size(); i++){
        dockerbuildInfo.append(rtDockerWin.push("${imgs[i]}", "${dockertargetrepo}"))
      }
      

      Exception:

      java.lang.NoClassDefFoundError: Could not initialize class io.netty.channel.epoll.IovArray
      	at io.netty.channel.epoll.EpollEventLoop.<init>(EpollEventLoop.java:62)
      	at io.netty.channel.epoll.EpollEventLoopGroup.newChild(EpollEventLoopGroup.java:130)
      	at io.netty.channel.epoll.EpollEventLoopGroup.newChild(EpollEventLoopGroup.java:35)
      	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:84)
      	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:58)
      	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:47)
      	at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:58)
      	at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:100)
      	at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:87)
      	at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:64)
      	at com.github.dockerjava.netty.NettyDockerCmdExecFactory$UnixDomainSocketInitializer.init(NettyDockerCmdExecFactory.java:220)
      	at com.github.dockerjava.netty.NettyDockerCmdExecFactory.init(NettyDockerCmdExecFactory.java:196)
      	at com.github.dockerjava.core.DockerClientImpl.withDockerCmdExecFactory(DockerClientImpl.java:161)
      	at com.github.dockerjava.core.DockerClientBuilder.build(DockerClientBuilder.java:45)
      	at org.jfrog.hudson.pipeline.docker.utils.DockerUtils.getDockerClient(DockerUtils.java:339)
      	at org.jfrog.hudson.pipeline.docker.utils.DockerUtils.isDockerHostExists(DockerUtils.java:30)
      	at org.jfrog.hudson.pipeline.docker.utils.DockerAgentUtils.registerImage(DockerAgentUtils.java:70)
      	at org.jfrog.hudson.pipeline.docker.utils.DockerAgentUtils.access$000(DockerAgentUtils.java:21)
      	at org.jfrog.hudson.pipeline.docker.utils.DockerAgentUtils$1.call(DockerAgentUtils.java:62)
      	at org.jfrog.hudson.pipeline.docker.utils.DockerAgentUtils$1.call(DockerAgentUtils.java:60)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      	at hudson.remoting.Request$2.run(Request.java:336)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at hudson.remoting.Engine$1$1.run(Engine.java:94)
      	at java.lang.Thread.run(Unknown Source)
      	at ......remote call to JNLP4-connect connection from ---windows-slave----- (Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
      	at hudson.remoting.Channel.call(Channel.java:830)
      Also:   java.lang.InterruptedException
      		at java.lang.Object.wait(Native Method)
      		at hudson.remoting.Request.call(Request.java:147)
      		at hudson.remoting.Channel.call(Channel.java:829)
      		at org.jfrog.hudson.pipeline.docker.utils.DockerAgentUtils.pushImage(DockerAgentUtils.java:149)
      		at org.jfrog.hudson.pipeline.steps.DockerPushStep$Execution.run(DockerPushStep.java:103)
      Caused: java.io.IOException: Remote call on JNLP4-connect connection from ---windows-slave----- failed
      	at hudson.remoting.Channel.call(Channel.java:838)
      	at org.jfrog.hudson.pipeline.docker.utils.DockerAgentUtils.registerImageOnAgents(DockerAgentUtils.java:60)
      	at org.jfrog.hudson.pipeline.steps.DockerPushStep$Execution.run(DockerPushStep.java:97)
      	at org.jfrog.hudson.pipeline.steps.DockerPushStep$Execution.run(DockerPushStep.java:62)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
      	at hudson.security.ACL.impersonate(ACL.java:260)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      

      From the line numbers in the stacktrace I figured that somehow in "org/jfrog/hudson/pipeline/docker/utils/DockerUtils.java" the host argument becomes empty otherwise line 339 would not be reached.

      The Pipeline consists of a parallel Docker build on Windows and Linux with different instances of Artifactory.docker Objects for each node.

        Attachments

          Activity

            People

            • Assignee:
              eyalb Eyal Ben Moshe
              Reporter:
              stefan.lengauer Stefan Lengauer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: