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

Registry credential are not used during pulling the image

      Docker agent template is configured in following way:

      During trying to create new slave - it fails.

      Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision
      Asked to provision 20 slave(s) for: docker
      Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision
      Will provision 'my-private-registry.com/jenkins-slave:compose2', for label: 'docker', in cloud: 'Docker'
      Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud addProvisionedSlave
      Not Provisioning 'my-private-registry.com/jenkins-slave:compose2'. Instance limit of '1' reached on server 'Docker'
      Oct 11, 2017 8:14:34 AM INFO io.jenkins.docker.DockerSlaveProvisioner pullImage
      Pulling image 'my-private-registry.com/jenkins-slave:compose2'. This may take awhile...
      Oct 11, 2017 8:14:34 AM SEVERE com.github.dockerjava.core.async.ResultCallbackTemplate onError
      Error during callback
      com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://my-private-registry.com/v2/jenkins-slave/manifests/compose2: unauthorized: authentication required"}
      
      	at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:109)
      	at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
      	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
      	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
      	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
      	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
      	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
      	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
      	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
      	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
      	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
      	at java.lang.Thread.run(Thread.java:745)
      
      Oct 11, 2017 8:14:34 AM SEVERE com.nirima.jenkins.plugins.docker.DockerCloud$1 call
      Error in provisioning; template='DockerTemplate{configVersion=2, labelString='docker', launcher=com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher@3fa145e6, remoteFsMapping='/var/jenkins_home', remoteFs='/home/jenkins', instanceCap=1, mode=EXCLUSIVE, retentionStrategy=com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy@18662289, numExecutors=1, dockerTemplateBase=DockerTemplateBase{image=my-private-registry.com/jenkins-slave:compose2}, removeVolumes=false, pullStrategy=PULL_LATEST, nodeProperties=[]}' for cloud='Docker'
      com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://my-private-registry.com/v2/jenkins-slave/manifests/compose2: unauthorized: authentication required"}
      
      	at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:109)
      	at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
      	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
      	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
      	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
      	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
      	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
      	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
      	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
      	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
      	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
      	at java.lang.Thread.run(Thread.java:745)
      
      

      This issue appeared after upgrading docker-plugin from 0.16.2 to 0.17 (this issue is there in 0.18). After downgrading to 0.16.2 - this issue is gone.

      If you need any additional info - let me know

          [JENKINS-47381] Registry credential are not used during pulling the image

          Ihor Sviziev created issue -
          Ihor Sviziev made changes -
          Description Original: Template is configured in following way:
           !image-2017-10-11-11-18-35-295.png|thumbnail!

          During trying to create new slave - it fails.

          {code}Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision
          Asked to provision 20 slave(s) for: docker
          Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision
          Will provision 'my-private-registry.com/jenkins-slave:compose2', for label: 'docker', in cloud: 'Docker'
          Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud addProvisionedSlave
          Not Provisioning 'my-private-registry.com/jenkins-slave:compose2'. Instance limit of '1' reached on server 'Docker'
          Oct 11, 2017 8:14:34 AM INFO io.jenkins.docker.DockerSlaveProvisioner pullImage
          Pulling image 'my-private-registry.com/jenkins-slave:compose2'. This may take awhile...
          Oct 11, 2017 8:14:34 AM SEVERE com.github.dockerjava.core.async.ResultCallbackTemplate onError
          Error during callback
          com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://my-private-registry.com/v2/jenkins-slave/manifests/compose2: unauthorized: authentication required"}

          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:109)
          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
          at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
          at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
          at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
          at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
          at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
          at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
          at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
          at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
          at java.lang.Thread.run(Thread.java:745)

          Oct 11, 2017 8:14:34 AM SEVERE com.nirima.jenkins.plugins.docker.DockerCloud$1 call
          Error in provisioning; template='DockerTemplate{configVersion=2, labelString='docker', launcher=com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher@3fa145e6, remoteFsMapping='/var/jenkins_home', remoteFs='/home/jenkins', instanceCap=1, mode=EXCLUSIVE, retentionStrategy=com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy@18662289, numExecutors=1, dockerTemplateBase=DockerTemplateBase{image=my-private-registry.com/jenkins-slave:compose2}, removeVolumes=false, pullStrategy=PULL_LATEST, nodeProperties=[]}' for cloud='Docker'
          com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://my-private-registry.com/v2/jenkins-slave/manifests/compose2: unauthorized: authentication required"}

          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:109)
          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
          at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
          at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
          at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
          at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
          at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
          at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
          at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
          at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
          at java.lang.Thread.run(Thread.java:745)

          {code}

          This issue appeared after upgrading docker-plugin from 0.16.2 to 0.17 (this issue is there in 0.18).
          New: Docker agent template is configured in following way:
           !image-2017-10-11-11-18-35-295.png|thumbnail!

          During trying to create new slave - it fails.

          {code}Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision
          Asked to provision 20 slave(s) for: docker
          Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision
          Will provision 'my-private-registry.com/jenkins-slave:compose2', for label: 'docker', in cloud: 'Docker'
          Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud addProvisionedSlave
          Not Provisioning 'my-private-registry.com/jenkins-slave:compose2'. Instance limit of '1' reached on server 'Docker'
          Oct 11, 2017 8:14:34 AM INFO io.jenkins.docker.DockerSlaveProvisioner pullImage
          Pulling image 'my-private-registry.com/jenkins-slave:compose2'. This may take awhile...
          Oct 11, 2017 8:14:34 AM SEVERE com.github.dockerjava.core.async.ResultCallbackTemplate onError
          Error during callback
          com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://my-private-registry.com/v2/jenkins-slave/manifests/compose2: unauthorized: authentication required"}

          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:109)
          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
          at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
          at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
          at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
          at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
          at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
          at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
          at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
          at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
          at java.lang.Thread.run(Thread.java:745)

          Oct 11, 2017 8:14:34 AM SEVERE com.nirima.jenkins.plugins.docker.DockerCloud$1 call
          Error in provisioning; template='DockerTemplate{configVersion=2, labelString='docker', launcher=com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher@3fa145e6, remoteFsMapping='/var/jenkins_home', remoteFs='/home/jenkins', instanceCap=1, mode=EXCLUSIVE, retentionStrategy=com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy@18662289, numExecutors=1, dockerTemplateBase=DockerTemplateBase{image=my-private-registry.com/jenkins-slave:compose2}, removeVolumes=false, pullStrategy=PULL_LATEST, nodeProperties=[]}' for cloud='Docker'
          com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://my-private-registry.com/v2/jenkins-slave/manifests/compose2: unauthorized: authentication required"}

          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:109)
          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
          at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
          at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
          at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
          at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
          at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
          at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
          at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
          at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
          at java.lang.Thread.run(Thread.java:745)

          {code}

          This issue appeared after upgrading docker-plugin from 0.16.2 to 0.17 (this issue is there in 0.18).
          Ihor Sviziev made changes -
          Description Original: Docker agent template is configured in following way:
           !image-2017-10-11-11-18-35-295.png|thumbnail!

          During trying to create new slave - it fails.

          {code}Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision
          Asked to provision 20 slave(s) for: docker
          Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision
          Will provision 'my-private-registry.com/jenkins-slave:compose2', for label: 'docker', in cloud: 'Docker'
          Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud addProvisionedSlave
          Not Provisioning 'my-private-registry.com/jenkins-slave:compose2'. Instance limit of '1' reached on server 'Docker'
          Oct 11, 2017 8:14:34 AM INFO io.jenkins.docker.DockerSlaveProvisioner pullImage
          Pulling image 'my-private-registry.com/jenkins-slave:compose2'. This may take awhile...
          Oct 11, 2017 8:14:34 AM SEVERE com.github.dockerjava.core.async.ResultCallbackTemplate onError
          Error during callback
          com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://my-private-registry.com/v2/jenkins-slave/manifests/compose2: unauthorized: authentication required"}

          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:109)
          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
          at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
          at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
          at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
          at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
          at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
          at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
          at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
          at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
          at java.lang.Thread.run(Thread.java:745)

          Oct 11, 2017 8:14:34 AM SEVERE com.nirima.jenkins.plugins.docker.DockerCloud$1 call
          Error in provisioning; template='DockerTemplate{configVersion=2, labelString='docker', launcher=com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher@3fa145e6, remoteFsMapping='/var/jenkins_home', remoteFs='/home/jenkins', instanceCap=1, mode=EXCLUSIVE, retentionStrategy=com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy@18662289, numExecutors=1, dockerTemplateBase=DockerTemplateBase{image=my-private-registry.com/jenkins-slave:compose2}, removeVolumes=false, pullStrategy=PULL_LATEST, nodeProperties=[]}' for cloud='Docker'
          com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://my-private-registry.com/v2/jenkins-slave/manifests/compose2: unauthorized: authentication required"}

          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:109)
          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
          at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
          at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
          at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
          at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
          at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
          at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
          at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
          at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
          at java.lang.Thread.run(Thread.java:745)

          {code}

          This issue appeared after upgrading docker-plugin from 0.16.2 to 0.17 (this issue is there in 0.18).
          New: Docker agent template is configured in following way:
           !image-2017-10-11-11-18-35-295.png|thumbnail!

          During trying to create new slave - it fails.

          {code}Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision
          Asked to provision 20 slave(s) for: docker
          Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision
          Will provision 'my-private-registry.com/jenkins-slave:compose2', for label: 'docker', in cloud: 'Docker'
          Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud addProvisionedSlave
          Not Provisioning 'my-private-registry.com/jenkins-slave:compose2'. Instance limit of '1' reached on server 'Docker'
          Oct 11, 2017 8:14:34 AM INFO io.jenkins.docker.DockerSlaveProvisioner pullImage
          Pulling image 'my-private-registry.com/jenkins-slave:compose2'. This may take awhile...
          Oct 11, 2017 8:14:34 AM SEVERE com.github.dockerjava.core.async.ResultCallbackTemplate onError
          Error during callback
          com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://my-private-registry.com/v2/jenkins-slave/manifests/compose2: unauthorized: authentication required"}

          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:109)
          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
          at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
          at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
          at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
          at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
          at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
          at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
          at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
          at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
          at java.lang.Thread.run(Thread.java:745)

          Oct 11, 2017 8:14:34 AM SEVERE com.nirima.jenkins.plugins.docker.DockerCloud$1 call
          Error in provisioning; template='DockerTemplate{configVersion=2, labelString='docker', launcher=com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher@3fa145e6, remoteFsMapping='/var/jenkins_home', remoteFs='/home/jenkins', instanceCap=1, mode=EXCLUSIVE, retentionStrategy=com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy@18662289, numExecutors=1, dockerTemplateBase=DockerTemplateBase{image=my-private-registry.com/jenkins-slave:compose2}, removeVolumes=false, pullStrategy=PULL_LATEST, nodeProperties=[]}' for cloud='Docker'
          com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://my-private-registry.com/v2/jenkins-slave/manifests/compose2: unauthorized: authentication required"}

          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:109)
          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
          at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
          at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
          at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
          at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
          at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
          at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
          at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
          at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
          at java.lang.Thread.run(Thread.java:745)

          {code}

          This issue appeared after upgrading docker-plugin from 0.16.2 to 0.17 (this issue is there in 0.18). After downgrading to 0.16.2 - this issue is gone.
          Ihor Sviziev made changes -
          Description Original: Docker agent template is configured in following way:
           !image-2017-10-11-11-18-35-295.png|thumbnail!

          During trying to create new slave - it fails.

          {code}Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision
          Asked to provision 20 slave(s) for: docker
          Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision
          Will provision 'my-private-registry.com/jenkins-slave:compose2', for label: 'docker', in cloud: 'Docker'
          Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud addProvisionedSlave
          Not Provisioning 'my-private-registry.com/jenkins-slave:compose2'. Instance limit of '1' reached on server 'Docker'
          Oct 11, 2017 8:14:34 AM INFO io.jenkins.docker.DockerSlaveProvisioner pullImage
          Pulling image 'my-private-registry.com/jenkins-slave:compose2'. This may take awhile...
          Oct 11, 2017 8:14:34 AM SEVERE com.github.dockerjava.core.async.ResultCallbackTemplate onError
          Error during callback
          com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://my-private-registry.com/v2/jenkins-slave/manifests/compose2: unauthorized: authentication required"}

          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:109)
          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
          at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
          at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
          at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
          at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
          at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
          at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
          at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
          at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
          at java.lang.Thread.run(Thread.java:745)

          Oct 11, 2017 8:14:34 AM SEVERE com.nirima.jenkins.plugins.docker.DockerCloud$1 call
          Error in provisioning; template='DockerTemplate{configVersion=2, labelString='docker', launcher=com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher@3fa145e6, remoteFsMapping='/var/jenkins_home', remoteFs='/home/jenkins', instanceCap=1, mode=EXCLUSIVE, retentionStrategy=com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy@18662289, numExecutors=1, dockerTemplateBase=DockerTemplateBase{image=my-private-registry.com/jenkins-slave:compose2}, removeVolumes=false, pullStrategy=PULL_LATEST, nodeProperties=[]}' for cloud='Docker'
          com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://my-private-registry.com/v2/jenkins-slave/manifests/compose2: unauthorized: authentication required"}

          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:109)
          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
          at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
          at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
          at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
          at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
          at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
          at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
          at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
          at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
          at java.lang.Thread.run(Thread.java:745)

          {code}

          This issue appeared after upgrading docker-plugin from 0.16.2 to 0.17 (this issue is there in 0.18). After downgrading to 0.16.2 - this issue is gone.
          New: Docker agent template is configured in following way:
           !image-2017-10-11-11-18-35-295.png|thumbnail!

          During trying to create new slave - it fails.

          {code}Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision
          Asked to provision 20 slave(s) for: docker
          Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision
          Will provision 'my-private-registry.com/jenkins-slave:compose2', for label: 'docker', in cloud: 'Docker'
          Oct 11, 2017 8:14:34 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud addProvisionedSlave
          Not Provisioning 'my-private-registry.com/jenkins-slave:compose2'. Instance limit of '1' reached on server 'Docker'
          Oct 11, 2017 8:14:34 AM INFO io.jenkins.docker.DockerSlaveProvisioner pullImage
          Pulling image 'my-private-registry.com/jenkins-slave:compose2'. This may take awhile...
          Oct 11, 2017 8:14:34 AM SEVERE com.github.dockerjava.core.async.ResultCallbackTemplate onError
          Error during callback
          com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://my-private-registry.com/v2/jenkins-slave/manifests/compose2: unauthorized: authentication required"}

          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:109)
          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
          at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
          at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
          at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
          at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
          at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
          at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
          at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
          at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
          at java.lang.Thread.run(Thread.java:745)

          Oct 11, 2017 8:14:34 AM SEVERE com.nirima.jenkins.plugins.docker.DockerCloud$1 call
          Error in provisioning; template='DockerTemplate{configVersion=2, labelString='docker', launcher=com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher@3fa145e6, remoteFsMapping='/var/jenkins_home', remoteFs='/home/jenkins', instanceCap=1, mode=EXCLUSIVE, retentionStrategy=com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy@18662289, numExecutors=1, dockerTemplateBase=DockerTemplateBase{image=my-private-registry.com/jenkins-slave:compose2}, removeVolumes=false, pullStrategy=PULL_LATEST, nodeProperties=[]}' for cloud='Docker'
          com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://my-private-registry.com/v2/jenkins-slave/manifests/compose2: unauthorized: authentication required"}

          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:109)
          at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
          at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
          at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
          at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
          at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
          at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
          at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
          at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
          at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
          at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
          at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
          at java.lang.Thread.run(Thread.java:745)

          {code}

          This issue appeared after upgrading docker-plugin from 0.16.2 to 0.17 (this issue is there in 0.18). After downgrading to 0.16.2 - this issue is gone.

          If you need any additional info - let me know
          Alon Bar-Lev made changes -
          Priority Original: Major [ 3 ] New: Critical [ 2 ]
          Alon Bar-Lev made changes -
          Labels New: credentials docker-slaves regression
          Nicolas De Loof made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            ndeloof Nicolas De Loof
            ihor_sviziev Ihor Sviziev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: