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

NullPointerException starting Xvfb on remote slave

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • xvfb-plugin
    • None
    • Fedora 16 master and RHEL5 slave

      I enabled Xvfb in a job, configured both the master and the slave to create a default Xvfb config and properly locate the binary on the slave. Every time I run the job the result is the following backtrace:

      Xvfb startingFATAL: null
      java.lang.NullPointerException
      at com.cloudbees.jenkins.plugins.customtools.CustomToolInstallWrapper$2.toEnvVars(CustomToolInstallWrapper.java:142)
      at com.cloudbees.jenkins.plugins.customtools.CustomToolInstallWrapper$2.launch(CustomToolInstallWrapper.java:131)
      at hudson.Launcher$ProcStarter.start(Launcher.java:338)
      at org.jenkinsci.plugins.xvfb.XvfbBuildWrapper.decorateLauncher(XvfbBuildWrapper.java:191)
      at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:549)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:475)
      at hudson.model.Run.execute(Run.java:1502)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:236)

          [JENKINS-14790] NullPointerException starting Xvfb on remote slave

          Julien R. added a comment -

          Hum actually can't reproduce on centos5:

          Name: Xvfb

          Directory in which to find Xvfb executable: '/usr/bin/'

          Slave was able to start without NPE

          Julien R. added a comment - Hum actually can't reproduce on centos5: Name: Xvfb Directory in which to find Xvfb executable: '/usr/bin/' Slave was able to start without NPE

          Code changed in jenkins
          User: Zoran Regvart
          Path:
          src/main/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper.java
          src/main/resources/org/jenkinsci/plugins/xvfb/Messages.properties
          http://jenkins-ci.org/commit/xvfb-plugin/40e566d37f2cafb78b659693fcc416d79fe7dfa6
          Log:
          JENKINS-14790 NullPointerException starting Xvfb on remote slave

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Zoran Regvart Path: src/main/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper.java src/main/resources/org/jenkinsci/plugins/xvfb/Messages.properties http://jenkins-ci.org/commit/xvfb-plugin/40e566d37f2cafb78b659693fcc416d79fe7dfa6 Log: JENKINS-14790 NullPointerException starting Xvfb on remote slave

          zregvart added a comment -

          Yes I found a similar issue when Xvfb plugin is enabled on the job before tool installation/configuration in the jenkins (master/slave) configuration. You seem to have customtools-plugin installed which clouded this issue. And I'm unable to reproduce your exact issue with customtools-plugin installed (environment having null value).

          Unfortunately the Xvfb plugin, currently at least, does not offer automatic tool installation, and you have to install Xvfb on your master/slave machines and configure the path in the jenkins configuration.

          I've made a small fix so that now if no installation is configured in jenkins a warning message is placed in the console of the build.

          Is it alright with you that I close this issue?

          zregvart added a comment - Yes I found a similar issue when Xvfb plugin is enabled on the job before tool installation/configuration in the jenkins (master/slave) configuration. You seem to have customtools-plugin installed which clouded this issue. And I'm unable to reproduce your exact issue with customtools-plugin installed (environment having null value). Unfortunately the Xvfb plugin, currently at least, does not offer automatic tool installation, and you have to install Xvfb on your master/slave machines and configure the path in the jenkins configuration. I've made a small fix so that now if no installation is configured in jenkins a warning message is placed in the console of the build. Is it alright with you that I close this issue?

          Brian Sipos added a comment -

          My failing setup defined a default path for Xvfb, but did not define the same path for each slave (all the slaves would have path /usr/bin) so I expected that the default path would be used.

          At least having an error message with instructions (as you have changed) instead of a generic null exception is definite improvement. I am okay with closing the issue as-is.

          Brian Sipos added a comment - My failing setup defined a default path for Xvfb, but did not define the same path for each slave (all the slaves would have path /usr/bin) so I expected that the default path would be used. At least having an error message with instructions (as you have changed) instead of a generic null exception is definite improvement. I am okay with closing the issue as-is.

          zregvart added a comment -

          Making as fixed, the warning message is present from 1.0.3 onward.

          zregvart added a comment - Making as fixed, the warning message is present from 1.0.3 onward.

            zregvart zregvart
            bsipos Brian Sipos
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: