Cannot start Jenkins

亡梦爱人 提交于 2019-12-10 13:16:34

问题


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..


回答1:


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>



回答2:


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 :)




回答3:


Execute this by providing absolute path of the war file java -jar




回答4:


download jenkins.war at https://updates.jenkins-ci.org/download/war/

put jenkins.war to

restart jenkins service




回答5:


This error usually shows, when you don't have Java on your machine. Jenkins relay on Java.

Follow these steps to fix the issue:

sudo yum install java-1.8.0-openjdk
systemctl enable jenkins
systemctl start jenkins
systemctl status jenkins

Hopefully it will help.




回答6:


If you have installed jenkins with msi (jenkins.msi), run the repair. That is run the file jenkins.msi again and choose to repair.

After the repair completes successfully it will start the service automatically.

Worked in my case! Had the same problem.




回答7:


Rather than guessing which answer might be appropriate, you could also 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.




回答8:


I has a similar challenge today, on inspection of the Jenkins installation directory, I discovered a backup copy jenkins.war.bak. Therefore, I simply copied the file and renamed it to jenkins.war, and started jenkins and voila, everything worked normally.




回答9:


Please take a look of jenkins.err text file from the .jenkins folder for the actual error.

For me it was related to JVM. i had to change value from JAVA_OPTIONS, previous it was jdk path so i changed it to value -Xmx512M.




回答10:


Open your c and users and PC name. Delete the .jerkins folder and Restart the CMD Action again. IT will be work Dont worry.

Note : Suppose if you are work in IT Company, there is some port specialities were removed. So use the port number which is permit your office. For Example : java -jar jerkins.war --httpPort=3000

Enjoy...............



来源:https://stackoverflow.com/questions/24077903/cannot-start-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!