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

Nullpointer exception while connecting to a docker container

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • docker-plugin
    • None
    • Linux, Docker plugin, docker 1.8.1

      Jenkins ver. 1.626
      Docker plugin version: 0.12.1

      Container settings:
      Docker command: /sbin/init 3 (without custom command also crashes)
      Hostname: debian8_32bit_32bit_INIT3_CONTAINER
      DNS: <Some ip address>
      Volumes: /sys/fs/cgroup:/sys/fs/cgroup:ro
      Environment: container=docker
      Privileged : true
      Remote filing root: /home/jenkins
      labels: debian8_32bit_32bit_INIT3_CONTAINER

      Port: 22

      Problem:
      Crash when running a job. The container is started within docker server but jenkins cannot see it. Jenkins logs state:

      Aug 28, 2015 2:29:20 PM com.nirima.jenkins.plugins.docker.DockerCloud provision
      INFORMATION: Asked to provision 1 slave(s) for: debian8_32bit_32bit_INIT3_CONTAINER
      Aug 28, 2015 2:29:20 PM com.nirima.jenkins.plugins.docker.DockerCloud provision
      INFORMATION: Will provision 'debian8_32bit_32bit', for label: 'debian8_32bit_32bit_INIT3_CONTAINER', in cloud: 'docker-main'
      Aug 28, 2015 2:29:20 PM com.nirima.jenkins.plugins.docker.DockerCloud addProvisionedSlave
      INFORMATION: Provisioning 'debian8_32bit_32bit' number '0' on 'docker-main'; Total containers: '0'
      Aug 28, 2015 2:29:20 PM hudson.slaves.NodeProvisioner$StandardStrategyImpl apply
      INFORMATION: Started provisioning Image of debian8_32bit_32bit from docker-main with 1 executors. Remaining excess workload: 0
      Aug 28, 2015 2:29:20 PM com.nirima.jenkins.plugins.docker.DockerCloud provisionWithWait
      INFORMATION: Trying to run container for debian8_32bit_32bit
      Aug 28, 2015 2:29:21 PM com.nirima.jenkins.plugins.docker.DockerCloud$1 call
      SCHWERWIEGEND: Error in provisioning; template='DockerTemplate{configVersion=2, labelString='debian8_32bit_32bit_INIT3_CONTAINER', launcher=com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher@1cc6aff2, remoteFsMapping='', remoteFs='/home/jenkins', instanceCap=1, mode=NORMAL, retentionStrategy=com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy@52fd763e, numExecutors=1, dockerTemplateBase=DockerTemplateBase

      {image=debian8_32bit_32bit}

      , removeVolumes=false, pullStrategy=PULL_LATEST}' for cloud='docker-main'
      java.lang.NullPointerException
      at com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher.getPortUtils(DockerComputerSSHLauncher.java:118)
      at com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher.waitUp(DockerComputerSSHLauncher.java:77)
      at com.nirima.jenkins.plugins.docker.DockerCloud.provisionWithWait(DockerCloud.java:364)
      at com.nirima.jenkins.plugins.docker.DockerCloud.access$000(DockerCloud.java:55)
      at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:219)
      at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:216)
      at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)

      Aug 28, 2015 2:29:30 PM hudson.slaves.NodeProvisioner$2 run
      WARNUNG: Provisioned slave Image of debian8_32bit_32bit failed to launch
      java.lang.NullPointerException
      at com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher.getPortUtils(DockerComputerSSHLauncher.java:118)
      at com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher.waitUp(DockerComputerSSHLauncher.java:77)
      at com.nirima.jenkins.plugins.docker.DockerCloud.provisionWithWait(DockerCloud.java:364)
      at com.nirima.jenkins.plugins.docker.DockerCloud.access$000(DockerCloud.java:55)
      at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:219)
      at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:216)
      at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)

      Aug 28, 2015 2:29:30 PM com.nirima.jenkins.plugins.docker.DockerCloud provision
      INFORMATION: Asked to provision 1 slave(s) for: debian8_32bit_32bit_INIT3_CONTAINER
      Aug 28, 2015 2:29:30 PM com.nirima.jenkins.plugins.docker.DockerCloud provision
      INFORMATION: Will provision 'debian8_32bit_32bit', for label: 'debian8_32bit_32bit_INIT3_CONTAINER', in cloud: 'docker-main'
      Aug 28, 2015 2:29:30 PM com.nirima.jenkins.plugins.docker.DockerCloud addProvisionedSlave
      INFORMATION: Not Provisioning 'debian8_32bit_32bit'. Instance limit of '1' reached on server 'docker-main'
      Aug 28, 2015 2:29:40 PM com.nirima.jenkins.plugins.docker.DockerCloud provision
      INFORMATION: Asked to provision 1 slave(s) for: debian8_32bit_32bit_INIT3_CONTAINER
      Aug 28, 2015 2:29:40 PM com.nirima.jenkins.plugins.docker.DockerCloud provision
      INFORMATION: Will provision 'debian8_32bit_32bit', for label: 'debian8_32bit_32bit_INIT3_CONTAINER', in cloud: 'docker-main'
      Aug 28, 2015 2:29:40 PM com.nirima.jenkins.plugins.docker.DockerCloud addProvisionedSlave
      INFORMATION: Not Provisioning 'debian8_32bit_32bit'. Instance limit of '1' reached on server 'docker-main'
      Aug 28, 2015 2:29:50 PM com.nirima.jenkins.plugins.docker.DockerCloud provision
      INFORMATION: Asked to provision 1 slave(s) for: debian8_32bit_32bit_INIT3_CONTAINER
      Aug 28, 2015 2:29:50 PM com.nirima.jenkins.plugins.docker.DockerCloud provision
      INFORMATION: Will provision 'debian8_32bit_32bit', for label: 'debian8_32bit_32bit_INIT3_CONTAINER', in cloud: 'docker-main'
      Aug 28, 2015 2:29:50 PM com.nirima.jenkins.plugins.docker.DockerCloud addProvisionedSlave
      INFORMATION: Not Provisioning 'debian8_32bit_32bit'. Instance limit of '1' reached on server 'docker-main'

            magnayn magnayn
            ashish_behl Ashish Behl
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: