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

When starting a node with dockerNode(), the error "uri was not specified" is thrown

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • docker-plugin
    • None
    • Docker Images:
      jenkins/jenkins:lts -> 2.89.1
      jenkins/jenkins -> 2.93

      Plugins:
      Docker API Plugin 3.0.14
      Docker Common Plugin 1.9
      Docker Pipeline 1.1.4
      Docker Slave Plugin 1.0.7
      docker build-step 1.43

      after the update of some plugins and the lts version comes the following error:

      java.lang.NullPointerException: uri was not specified
      	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
      	at com.github.dockerjava.core.DefaultDockerClientConfig$Builder.withDockerHost(DefaultDockerClientConfig.java:368)
      	at io.jenkins.docker.client.DockerAPI.getClient(DockerAPI.java:113)
      	at com.nirima.jenkins.plugins.docker.DockerTemplate.provisionNode(DockerTemplate.java:443)
      	at io.jenkins.docker.pipeline.DockerNodeStepExecution.createNode(DockerNodeStepExecution.java:71)
      	at io.jenkins.docker.pipeline.DockerNodeStepExecution.lambda$start$0(DockerNodeStepExecution.java:48)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	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:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Finished: FAILURE

      if I downgrade Docker Commons Plugin to v1.8 it works.

          [JENKINS-48460] When starting a node with dockerNode(), the error "uri was not specified" is thrown

          Volker Schukai created issue -
          Nicolas De Loof made changes -
          Component/s New: docker-plugin [ 18724 ]
          Component/s Original: docker-slaves-plugin [ 20839 ]
          Nicolas De Loof made changes -
          Priority Original: Critical [ 2 ] New: Minor [ 4 ]
          Nicolas De Loof made changes -
          Priority Original: Minor [ 4 ] New: Critical [ 2 ]

          dockerNode require you to configure 'dockerHost' uri for the docker node you want this agent to run on. Please ensure your pipeline script is set with one (would help you attached sample script to demonstrate this issue in this ticket)

          I don't understand how downgrading docker-commons to 1.8 has any impact here.

          Nicolas De Loof added a comment - dockerNode require you to configure 'dockerHost' uri for the docker node you want this agent to run on. Please ensure your pipeline script is set with one (would help you attached sample script to demonstrate this issue in this ticket) I don't understand how downgrading docker-commons to 1.8 has any impact here.
          Volker Schukai made changes -
          Attachment New: image-2017-12-09-10-26-37-729.png [ 40629 ]
          Volker Schukai made changes -
          Attachment New: image-2017-12-09-10-31-40-547.png [ 40630 ]

          Thanks for the answer.

           

           

          The job ran before the last update without problems  for months.  

           

          jenkinsfile

          dockerNode(image: "myimage") {
          
          

           

          config:

           

           

           

           

           

           

          1.8 works, 1.9 not.

          when i update the exeption is thrown

           

           

           

          Volker Schukai added a comment - Thanks for the answer.     The job ran before the last update without problems  for months.     jenkinsfile dockerNode(image: "myimage" ) {   config :             1.8 works, 1.9 not. when i update the exeption is thrown      

          this works with 1.8:

          #!/usr/bin/env groovy
          
          dockerNode(image: mysqlWorkerImage) {
                stage("test") {
                   sh "ls"
                }
          }
          
          
          

          this works with 1.8 and 1.9:

           

          node {
              docker.withServer() {
                   docker.image(mysqlWorkerImage).inside() {
                   ....
          

          Volker Schukai added a comment - this works with 1.8: #!/usr/bin/env groovy dockerNode(image: mysqlWorkerImage) {  stage( "test" ) { sh "ls" } } this works with 1.8 and 1.9:   node { docker.withServer() { docker.image(mysqlWorkerImage).inside() { ....

          Oh, this is docker-slaves-plugin.

          Do ou have both plugin installed ? This introduce a pipeline DSL conflicts. 

          Nicolas De Loof added a comment - Oh, this is docker-slaves-plugin. Do ou have both plugin installed ? This introduce a pipeline DSL conflicts. 

            Unassigned Unassigned
            schukai Volker Schukai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: