Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jenkins missing jobs after removal of plugins

I have a Jenkins Server (1.510) on Win 2008 with ~100 jobs. After installing and then uninstalling the CloudBees (Plugin_1, Plugin_2) set of plugins + restart I have the following issues:

  1. half of the Jobs are now missing.
  2. many plugins are not functioning well, for example the green-balls plugin is not working and also the entry to launch the backup plugin is missing
  3. many built in Jenkins buttons such the new "Credentials" is missing from the "Jenkins Configure" Menu.

Looking at the FS, i still see all the jobs.

I already tried :

  1. Using the reload configuration
  2. Reinstalling the plugins
  3. Reinstalling Jenkins with the same version once again

Still the jobs are missing

Any idea how to solve it?

Thanks,

Doron

like image 766
Doron Shai Avatar asked Apr 15 '13 05:04

Doron Shai


People also ask

Do we need to restart Jenkins after installing plugins?

If you're asking about how to install a plugin you personally developed without restarting, not a plugin from the plugins repo, you can do so by going to: Jenkins>Plugin Manager, click the Advanced tab. There you'll see "Upload Plugin". Upload the hpi file for the plugin. You don't need to restart the Jenkins.

Where are unused Jenkins plugins?

Some plugins only affect the Jenkins system configuration, rather than individual jobs; you should be able to find those by changing the find method in your code to include /home/user/. jenkins/config. xml. Many plugins have their own configuration files in $JENKINS_HOME, e.g. $JENKINS_HOME/org.

How do I see my Jenkins employment history?

To use the Job Configuration History plugin:Log in to the Jenkins web UI as an administrator using the FQDN of your cloud endpoint and port 8081. For example, https://cloud.example.com:8081. Navigate to Job Config History > Show job configs only. Click the required job and review the list of recorded changes.


1 Answers

When job is loaded, many of the related Java classes get instantiated. If instantiation fails, usually because some plugin has been removed and that class is no longer available at all, then the job is hidden.

I suspect you have accidentally removed some other plugin too.

Note: Before actually doing anything, take full backup! Easiest is to backup entire Jenkins folder, where the jobs, configuration etc reside.

Easiest solution might be to just install Jenkins from scratch, install the plugins you do need (see below for troubleshooting if you're missing some), then copy the jobs subfolder to the new Jenkins. It might be best to do any configuration under Manage Jenkins by hand, but you can also just try copying the related XML config files.

If you are missing a plugin and can't figure out which one, you should look at jenkins.out.log and jenkins.err.log log files and search for exceptions happening after Jenkins is started. That may give you a clue on what plugin you are missing.

You can also try editing the job XML files to remove build steps you identified from the exceptions (remember to take backups first!), then restart Jenkins or select Reload configuration from disk from Manage Jenkins page.

If not solved, but you find relevant-looking exceptions or something else interesting, please update the question with details.

like image 169
hyde Avatar answered Sep 28 '22 00:09

hyde