本文翻译自:How to restart Jenkins manually?
I've just started working with Jenkins and have run into a problem. 我刚刚开始与詹金斯一起工作,遇到了一个问题。 After installing several plugins it said it needs to be restarted and went into a "shutting down" mode, but never restarts. 在安装了几个插件之后,它表示需要重新启动并进入“关闭”模式,但是从不重新启动。
How do I do a manual restart? 如何手动重启?
#1楼
参考:https://stackoom.com/question/Xs4q/如何手动重启Jenkins
#2楼
On Ubuntu or Debian, when installed through apt-get
/ dpkg
: 在Ubuntu或Debian上,通过apt-get
/ dpkg
安装时:
$ sudo /etc/init.d/jenkins restart
Usage: /etc/init.d/jenkins {start|stop|status|restart|force-reload}
#3楼
如果您运行FreeBSD:
/usr/local/etc/rc.d/jenkins restart
#4楼
On Windows, if you installed it as a service, go to Services ( Start → Run : services.msc
), find Jenkins, right click → Restart . 在Windows上,如果将其作为服务安装,请转到服务( 开始 → 运行 : services.msc
),找到Jenkins,右键单击→ 重新启动 。
If it does not help (UI is not responding) open the Windows Task Manager → Processes , kill the java.exe
process, and restart the service once again. 如果没有帮助(UI没有响应),请打开Windows任务管理器→ 进程 ,杀死java.exe
进程,然后再次重新启动服务。
#5楼
使用命令行界面 :
java -jar jenkins-cli.jar -s http://jenkins.example.com:8080/ -i /root/.ssh/id_rsa safe-restart
#6楼
Sometimes there will be some stale Jenkins processes, so ps -ef | grep jenkins
有时会有一些过时的Jenkins进程,因此ps -ef | grep jenkins
ps -ef | grep jenkins
kill all of them. ps -ef | grep jenkins
杀死了所有人。 Restart as described in previous answers, and it will be clean. 在以前的答案中描述重新启动,这将是干净的。
ps -ef | grep jenkins
sudo kill -kill <pid>