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

Debian package fails to start when JAVA_ARGS contains spaces

    • 2.334

      If /etc/default/jenkins contains something like

      JAVA_ARGS="-Djava.awt.headless=true -Dhudson.model.DirectoryBrowserSupport.CSP=\"sandbox; default-src 'self';\""
      

      then as of 2.333 startup will fail with:

      $ cat /var/log/jenkins/jenkins.log 
      Error: Could not find or load main class 'self';"
      Caused by: java.lang.ClassNotFoundException: 'self';"
      

          [JENKINS-67724] Debian package fails to start when JAVA_ARGS contains spaces

          Basil Crow added a comment - - edited

          This will be fixed in 2.334. Affected users can work around the issue by applying this patch to /etc/init.d/jenkins:

          diff --git a/deb/build/debian/jenkins.init b/deb/build/debian/jenkins.init
          index fa1aa49..5a94204 100644
          --- a/deb/build/debian/jenkins.init
          +++ b/deb/build/debian/jenkins.init
          @@ -130,6 +130,7 @@ do_start_cmd_override() {
                          LOGNAME="${JENKINS_USER}" \
                          USERNAME="${JENKINS_USER}" \
                          PWD="${JENKINS_HOME}" \
          +               eval \
                          start-stop-daemon \
                          --start \
                          --quiet \
          

          Basil Crow added a comment - - edited This will be fixed in 2.334. Affected users can work around the issue by applying this patch to /etc/init.d/jenkins : diff --git a/deb/build/debian/jenkins.init b/deb/build/debian/jenkins.init index fa1aa49..5a94204 100644 --- a/deb/build/debian/jenkins.init +++ b/deb/build/debian/jenkins.init @@ -130,6 +130,7 @@ do_start_cmd_override() { LOGNAME="${JENKINS_USER}" \ USERNAME="${JENKINS_USER}" \ PWD="${JENKINS_HOME}" \ + eval \ start-stop-daemon \ --start \ --quiet \

            basil Basil Crow
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: