Jenkins not starting in open suse
I have followed this blog (Install Jenkins in Suse) to install Jenkins in Suse box.
After following all the required steps, I was unable to start jenkins.
Whenever I tried to Jenkins it says "done"
# sudo /etc/init.d/jenkins start
Starting Jenkins done
But whenever I checked the status it says "dead"
# sudo /etc/init.d/jenkins status
Checking for service Jenkins dead
Then I tried to run Jenkins through the built in Jetty servlet container.
# cd /usr/lib/jenkins/
# ll
total 61732
-rw-r--r-- 1 root root 63209930 Sep 27 21:30 jenkins.war
java -jar jenkins.war
Jenkins requires Java7 or later, but you are running pxa6460sr16fp7-20150708_01 (SR16 FP7) from /usr/lib64/jvm/java-1.6.0-ibm-1.6.0/jre
java.lang.UnsupportedClassVersionError: 50.0
at Main.main(Main.java:90)
Which is clearly saying that Jenkins requires Java7 . . . So here is the nest step :-
# zypper se java
It will list all the available Java packages.
Select the suitable Java package.
# zypper in java-1_7_0-ibm
Refreshing service 'spacewalk'.
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW package is going to be installed:
java-1_7_0-ibm
1 new package to install.
Overall download size: 76.0 MiB. After the operation, additional 143.0 MiB will be used.
Continue? [y/n/? shows all options] (y): y
Retrieving package java-1_7_0-ibm-1.7.0_sr9.10-9.1.x86_64 (1/1), 76.0 MiB (143.0 MiB unpacked)
Retrieving: java-1_7_0-ibm-1.7.0_sr9.10-9.1.x86_64.rpm [done (27.7 MiB/s)]
Installing: java-1_7_0-ibm-1.7.0_sr9.10-9.1 [done]
Now run Jenkins through the built in Jetty servlet container again.
java -jar jenkins.war
Running from: /usr/lib/jenkins/jenkins.war
webroot: $user.home/.jenkins
Oct 08, 2015 10:39:33 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
Oct 08, 2015 10:39:38 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: jetty-winstone-2.8
Oct 08, 2015 10:39:41 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: NO JSP Support for , did not find org.apache.jasper.servlet.JspServlet
Jenkins home directory: /root/.jenkins found at: $user.home/.jenkins
Oct 08, 2015 10:39:42 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started SelectChannelConnector@0.0.0.0:8080
And it worked . . . Now let start Jenkins as service.
# sudo service jenkins start
Starting Jenkins dirname: extra operand `/proc/6383/exe'
Try `dirname --help' for more information.
basename: missing operand
Try `basename --help' for more information.
Boooommmm . . .
Then I googled about this error and came across to this link http://www.4byte.cn/question/590967/jenkins-restart-error-starting-jenkins-dirname-extra-operand-proc.html
:-)
After following all the required steps, I was unable to start jenkins.
Whenever I tried to Jenkins it says "done"
# sudo /etc/init.d/jenkins start
Starting Jenkins done
But whenever I checked the status it says "dead"
# sudo /etc/init.d/jenkins status
Checking for service Jenkins dead
Then I tried to run Jenkins through the built in Jetty servlet container.
# cd /usr/lib/jenkins/
# ll
total 61732
-rw-r--r-- 1 root root 63209930 Sep 27 21:30 jenkins.war
java -jar jenkins.war
Jenkins requires Java7 or later, but you are running pxa6460sr16fp7-20150708_01 (SR16 FP7) from /usr/lib64/jvm/java-1.6.0-ibm-1.6.0/jre
java.lang.UnsupportedClassVersionError: 50.0
at Main.main(Main.java:90)
Which is clearly saying that Jenkins requires Java7 . . . So here is the nest step :-
# zypper se java
It will list all the available Java packages.
Select the suitable Java package.
# zypper in java-1_7_0-ibm
Refreshing service 'spacewalk'.
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW package is going to be installed:
java-1_7_0-ibm
1 new package to install.
Overall download size: 76.0 MiB. After the operation, additional 143.0 MiB will be used.
Continue? [y/n/? shows all options] (y): y
Retrieving package java-1_7_0-ibm-1.7.0_sr9.10-9.1.x86_64 (1/1), 76.0 MiB (143.0 MiB unpacked)
Retrieving: java-1_7_0-ibm-1.7.0_sr9.10-9.1.x86_64.rpm [done (27.7 MiB/s)]
Installing: java-1_7_0-ibm-1.7.0_sr9.10-9.1 [done]
Now run Jenkins through the built in Jetty servlet container again.
java -jar jenkins.war
Running from: /usr/lib/jenkins/jenkins.war
webroot: $user.home/.jenkins
Oct 08, 2015 10:39:33 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
Oct 08, 2015 10:39:38 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: jetty-winstone-2.8
Oct 08, 2015 10:39:41 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: NO JSP Support for , did not find org.apache.jasper.servlet.JspServlet
Jenkins home directory: /root/.jenkins found at: $user.home/.jenkins
Oct 08, 2015 10:39:42 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started SelectChannelConnector@0.0.0.0:8080
And it worked . . . Now let start Jenkins as service.
# sudo service jenkins start
Starting Jenkins dirname: extra operand `/proc/6383/exe'
Try `dirname --help' for more information.
basename: missing operand
Try `basename --help' for more information.
Boooommmm . . .
Then I googled about this error and came across to this link http://www.4byte.cn/question/590967/jenkins-restart-error-starting-jenkins-dirname-extra-operand-proc.html
Modify the file /etc/init.d/jenkis, find the line that has this code:
JPROC=$( find /proc -maxdepth 2 -user $JENKINS_USER -name exe -lname "*/bin/java" )
and replace it for this one:
JPROC=$( find /proc -maxdepth 2 -user $JENKINS_USER -name exe -lname "*/bin/java" | tail -1 )
Then run again . . .
# sudo /etc/init.d/jenkins start
Starting Jenkins
And it worked . . . Go and access Jenkins.
Jenkins will now be running on the default port of 8080 (http://localhost:8080/):-)
Leave a Comment