我们的Jenkins服务器有一个已经运行了三天的作业,但是没有做任何事情。单击角落里的小X没有任何作用,控制台输出日志也没有显示任何内容。我在我们的构建服务器上检查过,该作业实际上似乎根本没有在运行。

有没有办法告诉jenkins工作已经“完成”了,比如编辑一些文件或锁之类的?因为我们有很多任务,所以我们并不想重新启动服务器。


当前回答

我想现在回答已经太迟了,但我帮助了一些人。

安装监控插件。(http://wiki.jenkins-ci.org/display/JENKINS/Monitoring) 进入jenkinsUrl/monitoring/nodes 转到底部的Threads部分 点击主界面左侧的详细信息按钮 按用户时间排序(ms) 然后查看线程的名称,您将获得构建的名称和编号 杀了它

对不起,我没有足够的声誉来发布图片。

希望能有所帮助

其他回答

你可以复制作业,然后删除旧的。如果你丢失了旧的构建日志没有关系的话。

这些方法对我来说都没用。我不得不重新启动安装服务器的机器。这种杀不死的工作现在已经没有了。

构建超时插件在这种情况下可以派上用场。如果花费太长时间,它会自动终止工作。

非常简单的解决方案

我看到这个问题的原因是页面上不正确的http链接,而不是应该停止工作的https。所有你需要做的是编辑onclick属性在html页面,通过以下

Open up a console log of the job (pipeline) that got hang Click whatever is available to kill the job (x icon, "Click here to forcibly terminate running steps" etc) to get "Click here to forcibly kill entire build" link visible (it's NOT gonna be clickable at the moment) Open the browser's console (use any one of three for chrome: F12; ctrl + shift + i; menu->more tools->developer tools) Locate "Click here to forcibly kill entire build" link manually or using "select an element in the page" button of the console Double click on onclick attribute to edit its value Append s to http to have https Press enter to submit the changes Click "Click here to forcibly kill entire build" link

使用截图作为参考

有一次我遇到了一个无法通过“脚本控制台”停止的构建。最后我通过以下步骤解决了这个问题:

ssh onto the jenkins server
cd to .jenkins/jobs/<job-name>/builds/
rm -rf <build-number>
restart jenkins