我刚开始和詹金斯合作,遇到了一个问题。安装了几个插件后,它表示需要重新启动并进入“关闭”模式,但从未重新启动。

如何手动重新启动?


当前回答

这取决于詹金斯是如何开始的。

作为服务:sudo服务jenkins restart、sudo/etc/init.d/jenkins restart等。作为Tomcat安装中的web应用程序:重新启动Tomcat,或者只需在Tomcat中重新启动应用程序。转到http://<tomcat服务器>:8080/manager/list或在身份验证命中http://<tomcat-server>:8080/2manager/stop后?path=/myapp+http://<tomcat服务器>:8080/manager/start?path=/myapp。只使用java-jar启动:杀死它(kill-9<pid>),然后重新启动它。使用java-jar启动,但来自监督者:supervisorctl restart jenkins

其他回答

CentOS:

sudo systemctl restart jenkins

sudo systemctl status Jenkins

詹金斯将活跃起来,并在一些PID上运行。

在Ubuntu或Debian上,通过apt-get/dpkg安装时:

$ sudo /etc/init.d/jenkins restart
Usage: /etc/init.d/jenkins {start|stop|status|restart|force-reload}

如果您在FreeBSD(OS)中运行Jenkins:

/usr/local/etc/rc.d/jenkins restart

这取决于詹金斯是如何开始的。

作为服务:sudo服务jenkins restart、sudo/etc/init.d/jenkins restart等。作为Tomcat安装中的web应用程序:重新启动Tomcat,或者只需在Tomcat中重新启动应用程序。转到http://<tomcat服务器>:8080/manager/list或在身份验证命中http://<tomcat-server>:8080/2manager/stop后?path=/myapp+http://<tomcat服务器>:8080/manager/start?path=/myapp。只使用java-jar启动:杀死它(kill-9<pid>),然后重新启动它。使用java-jar启动,但来自监督者:supervisorctl restart jenkins

如果您只想重新加载配置文件,可以执行以下操作

    <jenkins_url>/reload

如果您在配置文件中进行了一些小的更改,例如直接在文件系统中进行config.xml,或者通过文件系统(而不是通过浏览器)复制作业,则速度会更快。