Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot start Jenkins

After downloading a plugin, the Jenkins server cannot be accessed. I am using windows 7. I tried to start windows Jenkins service manually, but I get the following message:

"Windows could not start the Jenkins service on Local COmputer. Error 1067: The process terminated unexpectedly"

I also tried to run the jenkins.exe from the installation directory, but with no success. In the error logs I see the following:

INFO: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
Ιουν 06, 2014 11:31:46 ΠΜ hudson.model.DownloadService$Downloadable doPostBack
INFO: Obtained the updated data file for hudson.tools.JDKInstaller
Ιουν 06, 2014 11:32:18 ΠΜ hudson.model.UpdateCenter doSafeRestart
INFO: Scheduling Jenkins reboot
Ιουν 06, 2014 11:33:00 ΠΜ hudson.model.UpdateCenter$DownloadJob run
INFO: Starting the installation of FTP-Publisher Plugin on behalf of anonymous
Ιουν 06, 2014 11:33:15 ΠΜ hudson.model.UpdateCenter doRestart
INFO: Scheduling the core downgrade
Ιουν 06, 2014 11:33:25 ΠΜ hudson.model.UpdateCenter$UpdateCenterConfiguration download
INFO: Downloading FTP-Publisher Plugin
Ιουν 06, 2014 11:33:26 ΠΜ hudson.model.UpdateCenter$HudsonDowngradeJob run
INFO: Starting the downgrade of jenkins.war on behalf of anonymous
Ιουν 06, 2014 11:33:26 ΠΜ jenkins.model.Jenkins$24 run
INFO: Restart in 10 seconds
Ιουν 06, 2014 11:33:26 ΠΜ hudson.model.UpdateCenter$HudsonDowngradeJob run
INFO: Downgrading successful: jenkins.war
Ιουν 06, 2014 11:33:36 ΠΜ jenkins.model.Jenkins$24 run
SEVERE: Restarting VM as requested by anonymous
Error: Unable to access jarfile D:\Program Files (x86)\Jenkins\jenkins.war
Error: Unable to access jarfile D:\Program Files (x86)\Jenkins\jenkins.war
Error: Unable to access jarfile D:\Program Files (x86)\Jenkins\jenkins.war

Can anyone help? We are at release point, and I have nowhere to run my tests..

like image 418
gandalf_the_cool Avatar asked Jun 06 '14 08:06

gandalf_the_cool


3 Answers

Rather than guess which answer might be appropriate, you can check the jenkins.err.log file in the installation directory.

In my case, Jenkins complained about an unsupported JRE after an update. The fix was to download the required JRE, and tell jenkins.exe to use it by configuring the path in the jenkins.xml file.

like image 51
Andreas Haferburg Avatar answered Nov 01 '22 06:11

Andreas Haferburg


Check the jenkins.xml there should be something wrong in config. In my case changing -Xmx2048m to -Xmx1024m fixed. Since it is not supported the 2m heap size.

<arguments>-Xrs -Xmx1024m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=9090</arguments>
like image 4
Mesut GUNES Avatar answered Nov 01 '22 05:11

Mesut GUNES


thanks a lot for your comments. Apparently the configuration was corrupted (missing war file) because a restart was made, while a plugin was being installed. For my good luck, when i tried to uninstall jenkins (to install it again), i hit the repair button, and all the missing files and configuration was restored. I have to give this point to windows OS :)

like image 3
gandalf_the_cool Avatar answered Nov 01 '22 07:11

gandalf_the_cool