Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins stop serving static files after a couple of days

I run Jenkins for my continuous integration and I have the following problem. After a couple of days Jenkins is running totally fine, the URL for static files stop being served and the CSS, JavaScript and global look of Jenkins looks broken when it actually runs the jobs as expected.

Any idea why?

Example of an URL:

http://myserver:8181/static/70f4ebef/css/style.css

Response:

HTTP ERROR 404

Problem accessing /static/70f4ebef/css/style.css. Reason:

    Not Found
Powered by Jetty://

Calling http://myserver:8181/safeRestart fixes the problem so I'm wondering if it's a Jenkins issue or a Jetty/Jenkins cache conflict.

I run Jenkins 1.537.

like image 779
Dirty Henry Avatar asked Dec 02 '13 18:12

Dirty Henry


1 Answers

It's happening because the static resources are unpacked in your /tmp directory and something else is cleaning up files older than x number of days old in there.

Refer to Jenkins issue 17526 for more info.

like image 95
Chris Heller Avatar answered Nov 13 '22 07:11

Chris Heller