重新启动后,詹金斯·乔布(Jenkins Job)消失了 [英] Jenkins Job disappeared after restart

查看:1688
本文介绍了重新启动后,詹金斯·乔布(Jenkins Job)消失了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在詹金斯1.5.31中遇到了一个奇怪的问题.

我已经配置了Maven作业,但仍在Jenkins_Home目录中看到.即使我仍然可以在默认端口8080上访问Jenkins,我的Jenkins Windows服务也无法启动. 当我在事件查看器中发现该服务正在尝试使用发现的8080时,因此我使用8080端口进程进行了taskkilPID的操作,并成功重新启动了Windows Jenkins服务.

但是,当我打开Jenkins URL时,我只看到其中的两个工作,其余的就消失了.

有人遇到这个问题吗?

我检查了插件,发现安装的Maven项目插件为1.5.3.1和2.1可用,但消息为-Warning: This plugin is built for Jenkins 1.538 or newer. It may or may not work in your Jenkins.

我在config.xml和旧副本备份中都看不到那些作业.

解决方案

Jenkins重新启动后,如果config.xml中的语法包含错误,则会出现缺少某些作业的情况.

  1. 检查Jenkins日志中的错误(管理Jenkins/系统日志)
  2. 修复每个作业的config.xml中的错误. (路径:JENKINS_HOME/jobs//config.xml)
  3. 重新启动jenkins或选择从磁盘重新加载选项(从磁盘管理Jenkins/重新加载配置).

修复所有错误后,应显示作业.您可以使用一些在线工具来验证您的配置,例如: https://www.xmlvalidation.com/

另一种情况是缺少所有Jenkins作业,并且加载了空白的仪表板.这表明Jenkins主目录错误,因此请确保正确指定JENKINS_HOME并重新启动Jenkins.

I have this strange problem in Jenkins 1.5.31 .

I had configured Maven jobs which I still see in Jenkins_Home directory. My Jenkins Windows service was not getting started even though I could still access the Jenkins on default port 8080. When I found in event viewer found that service is trying for 8080 which it found to be in use, so I did taskkilPID using the 8080 port process and it successfully restarted the Windows Jenkins service.

However, when I opened the Jenkins URL, I saw only two of my jobs were there and rest disappeared.

Has any one faced this issue?

I checked plugins and found that Maven project plugin installed is 1.5.3.1 and 2.1 is available but it has message -Warning: This plugin is built for Jenkins 1.538 or newer. It may or may not work in your Jenkins.

I don't see those jobs in config.xml and nor in its old copy backup.

解决方案

After Jenkins restarts, there is the case when some jobs are missing if the syntax in their config.xml contains errors.

  1. Check Jenkins logs for errors (Manage Jenkins/System Log)
  2. Fix the errors in config.xml of each job. ( path: JENKINS_HOME/jobs//config.xml)
  3. Restart jenkins or choose option reload configurations from disk (Manage Jenkins/Reload Configuration from Disk).

When all errors are fixed the job should appear. You can validate your configurations against some online tool, f.e.: https://www.xmlvalidation.com/

Another case is when all Jenkins jobs are missing and an empty dashboard is loaded. This indicates that Jenkins home directory is wrong, so make sure to specify JENKINS_HOME correctly and restart Jenkins.

这篇关于重新启动后,詹金斯·乔布(Jenkins Job)消失了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆