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

NullPointerException in winstone Launcher

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Blocker
    • Resolution: Fixed
    • core
    • Debian 6.0
      Jenkins v. 1.451 (installed using apt-get)
      RAM: 512 MB
      java version "1.6.0_18"
      OpenJDK Runtime Environment (IcedTea6 1.8.10) (6b18-1.8.10-0+squeeze2)
      OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)

    Description

      After a few seconds after sending the start request to Jenkins.

      In my log file:
      Running from: /usr/share/jenkins/jenkins.war
      Feb 22, 2012 10:32:47 PM winstone.Logger logInternal
      SEVERE: Container startup failed
      java.lang.NullPointerException
      at winstone.Launcher.shutdown(Launcher.java:333)
      at winstone.Launcher.<init>(Launcher.java:199)
      at winstone.Launcher.main(Launcher.java:384)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at Main._main(Main.java:273)
      at Main.main(Main.java:98)

      I have tried to make a fresh install of Jenkins, but with same result.

      Attachments

        Activity

          When I tried to run directly by java, I was using the jenkins user

          tat Thomas Andresen added a comment - When I tried to run directly by java, I was using the jenkins user

          Can you explicitly set $JENKINS_HOME?

          kukido Andrey Myatlyuk added a comment - Can you explicitly set $JENKINS_HOME?

          Thomas,
          Is the issue persists?
          Andrey

          kukido Andrey Myatlyuk added a comment - Thomas, Is the issue persists? Andrey
          darthsteven Steven Jones added a comment -

          I also have this issue.

          Here's the command that the init.d script is trying to execute:

          /bin/su -l jenkins --shell=/bin/bash -c "/usr/bin/daemon --name=jenkins --inherit --env=JENKINS_HOME=/var/lib/jenkins --output=/var/log/jenkins/jenkins.log --pidfile=/var/run/jenkins/jenkins.pid -- /usr/bin/java  -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080 --ajp13Port=-1"
          

          If I execute the following as the Jenkins user:

          /usr/bin/java  -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080 --ajp13Port=-1
          

          Then Jenkins starts up happily.

          Indeed if I execute the following as the jenkins user:

          /usr/bin/daemon --foreground --name=jenkins --inherit --env=JENKINS_HOME=/var/lib/jenkins --output=/var/log/jenkins/jenkins.log --pidfile=/var/run/jenkins/jenkins.pid -- /usr/bin/java  -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080 --ajp13Port=-1
          

          Then Jenkins also starts up, so I think it must be something to do with the way that Jenkins is being put into the background or something?

          Is there anything else I can try?

          darthsteven Steven Jones added a comment - I also have this issue. Here's the command that the init.d script is trying to execute: /bin/su -l jenkins --shell=/bin/bash -c "/usr/bin/daemon --name=jenkins --inherit --env=JENKINS_HOME=/ var /lib/jenkins --output=/ var /log/jenkins/jenkins.log --pidfile=/ var /run/jenkins/jenkins.pid -- /usr/bin/java -jar /usr/share/jenkins/jenkins.war --webroot=/ var /cache/jenkins/war --httpPort=8080 --ajp13Port=-1" If I execute the following as the Jenkins user: /usr/bin/java -jar /usr/share/jenkins/jenkins.war --webroot=/ var /cache/jenkins/war --httpPort=8080 --ajp13Port=-1 Then Jenkins starts up happily. Indeed if I execute the following as the jenkins user: /usr/bin/daemon --foreground --name=jenkins --inherit --env=JENKINS_HOME=/ var /lib/jenkins --output=/ var /log/jenkins/jenkins.log --pidfile=/ var /run/jenkins/jenkins.pid -- /usr/bin/java -jar /usr/share/jenkins/jenkins.war --webroot=/ var /cache/jenkins/war --httpPort=8080 --ajp13Port=-1 Then Jenkins also starts up, so I think it must be something to do with the way that Jenkins is being put into the background or something? Is there anything else I can try?

          1.535 switches embedded container to Jetty. Because of this change, I'm closing bugs reported on HTTP handling of Winstone. If the problem persists after 1.535, please reopen a separate issue.

          kohsuke Kohsuke Kawaguchi added a comment - 1.535 switches embedded container to Jetty. Because of this change, I'm closing bugs reported on HTTP handling of Winstone. If the problem persists after 1.535, please reopen a separate issue.

          People

            kohsuke Kohsuke Kawaguchi
            tat Thomas Andresen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: