Bug 1330472 - Jenkins returns HTTP/1.1 503 Service Unavailable
Jenkins returns HTTP/1.1 503 Service Unavailable
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: jenkins (Show other bugs)
24
x86_64 Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Michal Srb
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-26 06:08 EDT by Jonny Heggheim
Modified: 2017-02-21 03:01 EST (History)
5 users (show)

See Also:
Fixed In Version: jenkins-1.651.1-1.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-17 11:13:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/var/log/jenkins/jenkins.log (2.21 KB, text/plain)
2016-04-26 06:08 EDT, Jonny Heggheim
no flags Details

  None (edit)
Description Jonny Heggheim 2016-04-26 06:08:51 EDT
Created attachment 1150831 [details]
/var/log/jenkins/jenkins.log

Description of problem:
When accessing the user interface by http://localhost:8080 I get this error:

HTTP ERROR: 503

Problem accessing /. Reason:

    Service Unavailable

Powered by Jetty://
 

Version-Release number of selected component (if applicable):
$ rpm -qa|grep jenkins
jenkins-json-lib-2.4-10.fc24.noarch
jenkins-mailer-plugin-1.16-2.fc24.noarch
jenkins-1.642.2-2.fc24.noarch
jenkins-extras-memory-monitor-1.9-3.fc24.noarch
jenkins-ldap-plugin-1.11-3.fc24.noarch
jenkins-xstream-1.4.7-8.jenkins1.fc24.noarch
jenkins-pam-auth-plugin-1.2-3.fc24.noarch
jenkins-junit-plugin-1.11-1.fc24.noarch
jenkins-ssh-slaves-plugin-1.10-3.fc24.noarch
jenkins-matrix-auth-plugin-1.2-3.fc24.noarch
js-yui2-jenkins-2.9.0-10.fc24.noarch
jenkins-executable-war-webroot-1.29-6.fc24.noarch
jenkins-instance-identity-1.4-5.fc24.noarch
jenkins-jexl-1.1-5.20111212.fc24.noarch
jenkins-ssh-credentials-plugin-1.11-4.fc24.noarch
jenkins-external-monitor-job-plugin-1.4-4.fc24.noarch
jenkins-commons-jelly-1.1.20120928-10.fc24.noarch
jenkins-core-1.642.2-2.fc24.noarch
jenkins-remoting-2.55-1.fc24.noarch
jenkins-ssh-cli-auth-1.2-8.fc24.noarch
trilead-ssh2-217-7.jenkins8.fc24.noarch
jenkins-icon-shim-1.0.4-4.fc24.noarch
jenkins-credentials-plugin-1.24-3.fc24.noarch
jenkins-sshd-1.6-7.fc24.noarch
jenkins-winstone-2.8-5.fc24.noarch
jenkins-script-security-plugin-1.15-2.fc24.noarch
jenkins-crypto-util-1.4-6.fc24.noarch
jenkins-version-number-1.1-6.fc24.noarch
jenkins-remoting-webapp-2.55-1.fc24.noarch
jenkins-ant-plugin-1.2-6.fc24.noarch
jenkins-cli-1.642.2-2.fc24.noarch
jenkins-antisamy-markup-formatter-plugin-1.3-2.fc24.noarch
jenkins-matrix-project-plugin-1.6-2.fc24.noarch
jenkins-task-reactor-1.4-4.fc24.noarch
jenkins-webapp-1.642.2-2.fc24.noarch
jenkins-javadoc-plugin-1.3-4.fc24.noarch


How reproducible:


Steps to Reproduce:
1. # rm -rf /var/lib/jenkins 
2. # dnf install jenkins -y
3. # systemctl start jenkins.service
4. $ curl localhost:8080

Actual results:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 503 Service Unavailable</title>
</head>
<body>
<h2>HTTP ERROR: 503</h2>
<p>Problem accessing /. Reason:
<pre>    Service Unavailable</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>


Expected results:
HTTP 200 OK

Additional info:
# systemctl status jenkins.service 
● jenkins.service - Jenkins continuous build server
   Loaded: loaded (/usr/lib/systemd/system/jenkins.service; disabled; vendor preset: disabled)
   Active: active (running) since Tue 2016-04-26 11:03:25 WEST; 2min 39s ago
  Process: 10247 ExecStop=/usr/libexec/jenkins/jenkins stop (code=exited, status=0/SUCCESS)
  Process: 10299 ExecStart=/usr/libexec/jenkins/jenkins start (code=exited, status=0/SUCCESS)
 Main PID: 10364 (java)
    Tasks: 36 (limit: 512)
   CGroup: /system.slice/jenkins.service
           └─10364 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -cp /usr/share/jenkins/

Apr 26 11:03:25 jonny-dell systemd[1]: Starting Jenkins continuous build server...
Apr 26 11:03:25 jonny-dell runuser[10345]: pam_unix(runuser:session): session opened for user jenkins by (uid=0)
Apr 26 11:03:25 jonny-dell runuser[10345]: pam_unix(runuser:session): session closed for user jenkins
Apr 26 11:03:25 jonny-dell jenkins[10299]: Starting Jenkins [  OK  ]
Apr 26 11:03:25 jonny-dell systemd[1]: Started Jenkins continuous build server.
Comment 1 Michal Srb 2016-04-26 06:14:20 EDT
Thanks for the bug report Jonny, investigating.
Comment 2 Fedora Update System 2016-04-27 14:04:41 EDT
jenkins-mailer-plugin-1.17-1.fc24 jenkins-credentials-plugin-1.27-1.fc24 jenkins-script-security-plugin-1.18.1-1.fc24 jenkins-junit-plugin-1.12-1.fc24 jenkins-1.651.1-1.fc24 stapler-1.242-1.fc24 tiger-types-2.2-1.fc24 owasp-java-html-sanitizer-20160422.1-1.fc24 jenkins-remoting-2.57-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f3b40fcbc3
Comment 3 Fedora Update System 2016-04-28 12:26:12 EDT
jenkins-1.651.1-1.fc24, jenkins-credentials-plugin-1.27-1.fc24, jenkins-junit-plugin-1.12-1.fc24, jenkins-mailer-plugin-1.17-1.fc24, jenkins-remoting-2.57-1.fc24, jenkins-script-security-plugin-1.18.1-1.fc24, owasp-java-html-sanitizer-20160422.1-1.fc24, stapler-1.242-1.fc24, tiger-types-2.2-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f3b40fcbc3
Comment 4 Fedora Update System 2016-05-17 11:13:38 EDT
jenkins-1.651.1-1.fc24, jenkins-credentials-plugin-1.27-1.fc24, jenkins-junit-plugin-1.12-1.fc24, jenkins-mailer-plugin-1.17-1.fc24, jenkins-remoting-2.57-1.fc24, jenkins-script-security-plugin-1.18.1-1.fc24, owasp-java-html-sanitizer-20160422.1-1.fc24, stapler-1.242-1.fc24, tiger-types-2.2-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
Comment 5 Suhan Andrei 2017-01-20 10:07:54 EST
I can still see it in fedora 25 . 

cat /var/log/jenkins/jenkins.log 
Jan 20, 2017 4:30:03 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: jetty-8.1.17.v20150415
Jan 20, 2017 4:30:03 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Failed startup of context w.{,file:/usr/share/jenkins/webroot/},/usr/share/jenkins/webroot
java.io.FileNotFoundException: /usr/share/jenkins/webroot/WEB-INF/lib/mina-core.jar (Too many levels of symbolic links)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at org.eclipse.jetty.util.resource.FileResource.getInputStream(FileResource.java:286)
        at org.eclipse.jetty.webapp.JarScanner.matched(JarScanner.java:151)
        at org.eclipse.jetty.util.PatternMatcher.matchPatterns(PatternMatcher.java:100)
        at org.eclipse.jetty.util.PatternMatcher.match(PatternMatcher.java:82)
        at org.eclipse.jetty.webapp.JarScanner.scan(JarScanner.java:84)
        at org.eclipse.jetty.webapp.MetaInfConfiguration.preConfigure(MetaInfConfiguration.java:84)
        at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:457)
        at winstone.HostConfiguration$1.preConfigure(HostConfiguration.java:166)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:493)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
        at org.eclipse.jetty.server.Server.doStart(Server.java:282)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at winstone.Launcher.<init>(Launcher.java:152)
        at winstone.Launcher.main(Launcher.java:352)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at Main._main(Main.java:290)
        at Main.main(Main.java:104)

Jan 20, 2017 4:30:03 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started SelectChannelConnector@0.0.0.0:8080
Jan 20, 2017 4:30:03 PM winstone.Logger logInternal
INFO: Winstone Servlet Engine v2.0 running: controlPort=disabled

cat /usr/share/jenkins/webroot/META-INF/MANIFEST.MF 
Manifest-Version: 1.0
Hudson-Version: 1.395
Implementation-Version: 1.651.3
Built-By: mockbuild
Jenkins-Version: 1.651.3
Created-By: Apache Maven 3.3.9
Build-Jdk: 1.8.0_111
Main-Class: Main

probably a packaging error .
Comment 6 Stefan 2017-02-21 03:01:30 EST
Hello,
I've been experienced same problems(503 Service Unavailable caused by java.io.FileNotFoundException: /usr/share/jenkins/webroot/WEB-INF/lib/mina-core.jar (Too many levels of symbolic links) in /var/log/jenkins/jenkins/log).

In my case, the following symlinks were using relative paths instead of absolute paths:
/usr/share/jenkins/webroot/WEB-INF/lib/mine-core.jar -> mine-core.jar
/usr/share/jenkins/webroot/WEB-INF/lib/jtidy.jar -> jtidy.jar

As of Fedora 25 Server, I found mine-core.jar at /usr/share/java/apache-mina/mina-core.jar and jtidy.jar at /usr/share/java/jtidy.jar.

ln -s /usr/share/java/apache-mina/mina-core.jar /usr/share/jenkins/webroot/WEB-INF/lib/mina-core.jar
ln -s /usr/share/java/jtidy.jar /usr/share/jenkins/webroot/WEB-INF/lib/jtidy.jar

Note You need to log in before you can comment on or make changes to this bug.