在 Windows 上重新启动 Hudson

发布于 2024-09-24 00:20:45 字数 268 浏览 2 评论 0原文

我在 Windows 上遇到了 Hudson 的问题。

每当我更新 Hudson 或插件时,我都会选择在没有作业运行时重新启动。
如果我单击此按钮,Hudson 将挂起并且不会重新启动。我尝试重新启动 Hudson 服务,但这没有帮助,因此最终不得不重新启动机器才能使 Hudson 重新上线。

我刚刚更新到最新版本,但没有单击重新启动按钮,它现在消失了。

有没有在 Windows 上重新启动 Hudson 的正确方法?

干杯

汤姆

I've been having an issue with Hudson on windows.

Whenever I update Hudson or a plugin I get the option to restart when no jobs are running.
If I click this button Hudson hangs and doesn't restart. I've tried restarting the Hudson service but this doesn't help, so end up having to reboot the box to bring Hudson back online.

I've just updated to the most recent version, but didn't click the restart button and it's now vanished.

Is there a correct way to restart Hudson on windows?

Cheers

Tom

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

人间不值得 2024-10-01 00:20:45

我也偶尔遇到这个问题。由于某种原因,Hudson 服务器没有完全关闭,并且启动的服务器无法使用该端口。为了解决这个问题,我运行“netstat -n -o”。这样我就可以找到持有该端口的进程 ID,并通过任务管理器杀死该应用程序。现在我可以重新启动服务,Hudson 运行正常。

在过去的几周里,我遇到了类似的问题。描述说,当没有进程运行时,它会重新启动应用程序。我错过了构建队列中的一项作业,并且由于错误的配置从未真正构建,因此阻止了 Hudson 重新启动。

所有作业完成后,服务器不会重新启动。只需再次访问重启页面 http://server:port/restart 并尝试再次重启即可。如果这不起作用,请停止该服务并重新启动。


更新:

由于我厌倦了物理登录 Hudson/Jenkins 服务器,我现在使用以下命令远程运行终止。这些命令假设您使用专用用户(例如 JenkinsUser)运行服务。如果另一个进程使用与该服务相同的凭据运行并且可能启动 java.exe,则您需要运行 netstat,该 netstat 需要在 Jenkins 服务器上本地执行或使用 rexec (这对我来说不是一个选项)。

:: get the pid of jenkins java.exe
tasklist /S %JENKINSSERVER% /FI "IMAGENAME eq java.exe" /FI "USERNAME eq %DOMAIN\USERNAME%"

:: terminate process use pid from previous command (instead of 1234)
taskkill /S %JENKINSSERVER% /F /T /PID 1234

:: stop the Jenkins service (just in case the service is hanging)
sc \\%JENKINSSERVER% stop Jenkins

:: start the Jenkins service again
sc \\%JENKINSSERVER% start Jenkins

如果我有很多时间,我可能会用它创建一个脚本。

I have a this problem once in a while too. For some reason the Hudson server does not shut down completely and the server that starts up, can not use the port. To fix that problem, I run `netstat -n -o'. This way I can find out the process ID that holds the port and kill that app through taskmanager. Now I can restart the service and Hudson comes up fine.

For the last few weeks I had a similar problem. The description says, that it restarts the app, when no processes are running. I missed out on one job that was hold in the build queue and because of a faulty configuration never actually build, therefore preventing Hudson from restarting.

After all of your jobs are finished and your server does not restart. Just visit the restart page again http://server:port/restart and try to restart again. If that doesn't work stop the service and start it again.


UPDATE:

Since I grew tired of physically logging into the Hudson/Jenkins server, I now use following commands to run the kill remotely. These commands assume that you run the service with a dedicated user (e.g. JenkinsUser). If another process running with the same credentials than the service does and might start java.exe, you need to run the netstat which needs to be executed locally on the Jenkins server or by using rexec (this was not an option for me).

:: get the pid of jenkins java.exe
tasklist /S %JENKINSSERVER% /FI "IMAGENAME eq java.exe" /FI "USERNAME eq %DOMAIN\USERNAME%"

:: terminate process use pid from previous command (instead of 1234)
taskkill /S %JENKINSSERVER% /F /T /PID 1234

:: stop the Jenkins service (just in case the service is hanging)
sc \\%JENKINSSERVER% stop Jenkins

:: start the Jenkins service again
sc \\%JENKINSSERVER% start Jenkins

If I have to much time, I might create a script out of it.

凉宸 2024-10-01 00:20:45

如果从节点将 slave.jar 用作 Windows 服务,则该服务被定义为“自动”。
这意味着如果连接被切断,它将尝试定期联系主站。

您不应该单击服务器端(在节点定义中)上的任何内容来重新启动所述节点:它应该自动重新联机。

If the Slave node has the slave.jar used as a windows service, that service is defined as "Automatic".
It means it will try to contact the master periodically if the connection has been severed.

You shouldn't click on anything on the server side (in the Node definition) to restart said Node: it should be back online automatically.

萌面超妹 2024-10-01 00:20:45

如果您已在 TomCat 服务器上安装了 Jenkins,一种替代解决方案是重新启动 Apache TomCat 服务。

If you've installed Jenkins on a TomCat server, one alternative solution is to simply restart your Apache TomCat service.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文