Jenkins Job disappeared after restart

后端 未结 2 372
一生所求
一生所求 2021-01-18 01:44

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 s

相关标签:
2条回答
  • 2021-01-18 02:19

    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.

    0 讨论(0)
  • 2021-01-18 02:24

    This happened to me too after a restart. But it was not because of errors in the config.xml, but because another containing folder with the same name but in different case existed on the server.

    I don't know how this happened, but after copying over the jobs from the second folder and reloading the folder the job came back up again.

    For e.g: the job that went missing was FOLDER-NAME/jobs/job-name

    On the Jenkins server, on disk, there was both

    FOLDER-NAME/jobs/job-name

    folder-name/jobs/job-name

    After copying the folder FOLDER-NAME/jobs/job-name to folder-name/jobs/ and reloading the folder (https://<jenkins-host>/jobs/FOLDER-NAME/reload) the job came back up.

    0 讨论(0)
提交回复
热议问题