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

Jetty exploding war to /tmp is a bad idea

    Details

    • Similar Issues:

      Description

      In Winstone 0.9.x we used to explode war under $JENKINS_HOME/war. When we moved to Jetty-based Winstone 2.0, this code was gone and now Jetty explodes war in /tmp/jetty-0.0.0.0-8080-jenkins.war-any.

      This tends to be problematic because various distros periodically clean up files under /tmp based on their modification dates. When exploded war files disappear from under us, all sorts of strange errors happen.

      We should resurrect the old behaviour and explode the war file under $JENKINS_HOME.

        Attachments

          Issue Links

            Activity

            kohsuke Kohsuke Kawaguchi created issue -
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            src/java/winstone/HostConfiguration.java
            http://jenkins-ci.org/commit/winstone/ec38d13bcacb4007a797771188360d8a33c9c9fc
            Log:
            [FIXED JENKINS-22442]

            Jetty doesn't let us control where the files are to be exploded, so do
            the extraction by ourselves.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: src/java/winstone/HostConfiguration.java http://jenkins-ci.org/commit/winstone/ec38d13bcacb4007a797771188360d8a33c9c9fc Log: [FIXED JENKINS-22442] Jetty doesn't let us control where the files are to be exploded, so do the extraction by ourselves.
            scm_issue_link SCM/JIRA link daemon made changes -
            Field Original Value New Value
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            I thought I've filed this somewhere but can't find it, so here it is again.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - I thought I've filed this somewhere but can't find it, so here it is again.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            changelog.html
            war/pom.xml
            http://jenkins-ci.org/commit/jenkins/d927a0c8bea678eb6d179edd786b004bb47a18c5
            Log:
            [FIXED JENKINS-22442]

            Avoid extracting war file under /tmp. When jar files and resource files disappear from under
            us, all sorts of strange errors happen.

            Compare: https://github.com/jenkinsci/jenkins/compare/1b65fbb502c9...d927a0c8bea6

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html war/pom.xml http://jenkins-ci.org/commit/jenkins/d927a0c8bea678eb6d179edd786b004bb47a18c5 Log: [FIXED JENKINS-22442] Avoid extracting war file under /tmp. When jar files and resource files disappear from under us, all sorts of strange errors happen. Compare: https://github.com/jenkinsci/jenkins/compare/1b65fbb502c9...d927a0c8bea6
            kohsuke Kohsuke Kawaguchi made changes -
            Link This issue is duplicated by JENKINS-21018 [ JENKINS-21018 ]
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3270
            [FIXED JENKINS-22442] (Revision d927a0c8bea678eb6d179edd786b004bb47a18c5)

            Result = SUCCESS
            kohsuke : d927a0c8bea678eb6d179edd786b004bb47a18c5
            Files :

            • changelog.html
            • war/pom.xml
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3270 [FIXED JENKINS-22442] (Revision d927a0c8bea678eb6d179edd786b004bb47a18c5) Result = SUCCESS kohsuke : d927a0c8bea678eb6d179edd786b004bb47a18c5 Files : changelog.html war/pom.xml
            danielbeck Daniel Beck made changes -
            Labels lts-candidate
            Hide
            oldelvet Richard Mortimer added a comment -

            The fix went into 1.558. I have that running here and it is now unpacking the WAR file into /var/cache/jenkins/war as per the --webroot setting.

            Show
            oldelvet Richard Mortimer added a comment - The fix went into 1.558. I have that running here and it is now unpacking the WAR file into /var/cache/jenkins/war as per the --webroot setting.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            war/pom.xml
            http://jenkins-ci.org/commit/jenkins/f01a7c2c0ef3cc41ac9513dfbf77c67e65e039be
            Log:
            [FIXED JENKINS-22442]

            Avoid extracting war file under /tmp. When jar files and resource files disappear from under
            us, all sorts of strange errors happen.

            (cherry picked from commit d927a0c8bea678eb6d179edd786b004bb47a18c5)

            Conflicts:
            changelog.html

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: war/pom.xml http://jenkins-ci.org/commit/jenkins/f01a7c2c0ef3cc41ac9513dfbf77c67e65e039be Log: [FIXED JENKINS-22442] Avoid extracting war file under /tmp. When jar files and resource files disappear from under us, all sorts of strange errors happen. (cherry picked from commit d927a0c8bea678eb6d179edd786b004bb47a18c5) Conflicts: changelog.html
            olivergondza Oliver Gond┼ża made changes -
            Labels lts-candidate 1.554.1-fixed
            danielbeck Daniel Beck made changes -
            Link This issue is duplicated by JENKINS-20858 [ JENKINS-20858 ]
            danielbeck Daniel Beck made changes -
            Link This issue is duplicated by JENKINS-17526 [ JENKINS-17526 ]
            Hide
            bhagyesh12 Bhagyesh Shah added a comment -

            whats the resolution of this issue? I tried with 1.558 too, please help with steps to do

            Show
            bhagyesh12 Bhagyesh Shah added a comment - whats the resolution of this issue? I tried with 1.558 too, please help with steps to do
            Hide
            danielbeck Daniel Beck added a comment -

            Bhagyesh Shah: You need to pass the option --webroot=path/to/where/to/extract to the java -jar jenkins.war call as already explained by Richard Mortimer two comments above yours.

            Show
            danielbeck Daniel Beck added a comment - Bhagyesh Shah : You need to pass the option --webroot=path/to/where/to/extract to the java -jar jenkins.war call as already explained by Richard Mortimer two comments above yours.
            bhagyesh12 Bhagyesh Shah made changes -
            Link This issue is related to JENKINS-24357 [ JENKINS-24357 ]
            Hide
            bhagyesh12 Bhagyesh Shah added a comment -

            @Daniel, I tried doing that already, it did not help me. Can you please tell me whats the ideal directory for webroot .. is it <user-home>/.jenkins/war ? I am using Solaris 10 and Java version is 1.6.0_65

            Show
            bhagyesh12 Bhagyesh Shah added a comment - @Daniel, I tried doing that already, it did not help me. Can you please tell me whats the ideal directory for webroot .. is it <user-home>/.jenkins/war ? I am using Solaris 10 and Java version is 1.6.0_65
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 154543 ] JNJira + In-Review [ 194940 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                kohsuke Kohsuke Kawaguchi
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: