如何手动重启Jenkins?

在遇到Jenkins安装插件后需要重启但无法自动重启的问题时,可以通过手动方式解决。在Ubuntu或Debian系统中,可以使用特定命令重启;在Windows上,若以服务形式安装,则需在服务管理中重启或通过任务管理器结束进程后再启动;命令行界面同样提供重启选项。有时可能需要先结束所有 Jenkins 进程以确保干净重启。
摘要由CSDN通过智能技术生成

本文翻译自: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 ( StartRun : 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>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值