Jenkins upgrade to 2.32.3 issue? - jenkins

Recently i have upgraded Jenkins from v1.596.2 to 2.32.3(LTS). But after upgradation i am getting following error but no clear how to rectify it.
=========================================================================
Tomcat Deploy v1.0.16
You must update Jenkins from v2.32.3 to v3.0.0 or later to run this plugin.

Ok so I had the same problem (but with others plugins).
To fix that:
Put Jenkins in "Prepare for Shutdown" mode and shutdown it
On the server HDD go to JENKINS_HOME/plugins and delete (or move elsewhere) the folder and hpi file corresponding to plugin which produce warnings. (The name of file/folder can be a little bit different than the plugin name displayed in Jenkins)
Restart Jenkins. Warning should be deleted

Related

Jenkins Error: org.xmlpull.v1.XmlPullParserException

I have installed successfully Jenkins after the next day, I have tried to reopen by restarting the Service:Jenkins and got this error.
Should I reinstall Jenkins ?
Thank you.
To get rid of the lockout follow these steps to manually change the version, which could just be back to your old working version.
Stop the Jenkins windows service
Rename war directory to war.bak
Rename jenkins.war to jenkins.war.bak
Get a new war file from https://updates.jenkins.io/download/war/
Copy new jenkins.war into jenkins directory
Start Jenkins windows service
Observe creation of war directory which will now contain contents of jenkins.war archive
Navigate to jenkins home page, at which point you will be informed
that Jenkins is preparing your installation
Once complete, test your
existing jobs to verify compatability
Navigate to 'Manage Jenkins'
via the menu and Action any notifications displayed - plugins, data
format conversions etc.
Delete jenkins.war.bak file and war.bak folder
After following those steps you will be able to get back into Jenkins, you might have other version issues with plug-ins but at least you can get back in and not lose everything. Also always put your pipeline scripts in source control and use a back up plug in for Jenkins.

Downgrade Jenkins

I updated Jenkins a few days ago. But in the current Jenkins version, there are some annoying bugs. Is it possible to downgrade the version of Jenkins and if this is possible, how is it possible to do it?
I have been struggling with downgrading Jenkins as well, lately because the latest version seems to have a problem handling JDK 5 code (which I am unfortunately tied to for a little while longer)
Here's how I did my downgrade:
Locate an earlier stable version at https://updates.jenkins-ci.org/
Download the war file
Stop the Jenkins service
Replace the jenkins.war with the new.
Restart the service.
I had an additional issue with the configuration file not being compatible. E.g. In my case I had to disable matrix to get the service running. Your case may be different, so I suggest another question.
I easily rolled back to the last working version bydoing below steps:
Go to the location where jenkins is installed.
Rename jenkins.war if it exists to jenkins.war.corrupted
You would find a file jenkins.war.bak in same direcotry. Rename it to 'jenkins.war'
Downgrading should be equivalent to the upgrading process:
To upgrade from earlier versions of Jenkins, simply redeploy the WAR
file. Read this document for more about container-specific
instructions on how to do this. See this document for automation.
In my case, I followed the process below -
Download the jenkins.war file from https://updates.jenkins-ci.org
Stop the Jenkins service
Replace the jenkins.war with the new.
Restart the service.
Done
If you have upgraded from front end (i.e. Manage Jenkins > Upgrade Jenkins) Then you will get an option to Downgrade also from there (under Manage Jenkins -- restore to previous version)

Jenkins Job disappeared after restart

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.
Check Jenkins logs for errors (Manage Jenkins/System Log)
Fix the errors in config.xml of each job. ( path: JENKINS_HOME/jobs//config.xml)
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.
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.
Upgrade Jenkins to the latest version.This will fix the problem

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:
half of the Jobs are now missing.
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
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 :
Using the reload configuration
Reinstalling the plugins
Reinstalling Jenkins with the same version once again
Still the jobs are missing
Any idea how to solve it?
Thanks,
Doron
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.
After I upgraded Jenkins, one of my jobs disappeared. I found out that although my job directory still existed, the config.xml file inside had somehow gone missing.
I restored this file from a backup, after updating all the plugins that needed updating, and reloaded the configuration, and the job reappeared in Jenkins.

Jenkins Update Loses Old Jobs

I am on a redhat linux box. I recently updated Jenkins to version 1.509 only to find that after doing so it has "forgotten" two of my jobs/projects. The jobs can still be found on my Jenkins machine under /var/lib/jenkins/jobs, but they no longer show up in the Jenkins GUI. I attempted to re-create them based off the configuration file I have, but I am not confident I have totally re-created the functionality they had.
I also tried to copy the job and or rename it hoping that would get jenkins to see it, but no luck. I had tried cp -r /var/lib/jenkins/jobs/JOB1 /var/lib/jenkins/jobs/JOB2. I also restarted the service a number of times. Finally I updated all of my plugins on the off chance that was somehow related.
So my question is "How can I get Jenkins to notice these jobs?" or failing that "can I run these jobs from in the terminal?"
NOTE: I am not discouraging others from upgrading Jenkins. After I upgraded Jenkins did complain about a number of things which I didn't pay enough attention to which I believe got me into this mess in the first place.
If I were you, I would try the Jenkins CLI (from $JENKINS_URL/cli) and use the create-job command and feed the job configuration file to the cli's stdin.
If that does not help, I would inspect Jenkins log files (you are saving stdout and stderr of Jenkins somewhere, right?) for any errors or clues. If the job failed to load because of some tag that you can guess is provided by a plugin, try to remove that part from the config file.
If that does not help, I would upgrade Jenkins. I think there might be some fixes related to this in the LTS version changelog since 1.509.
And above all... if I were you, I would start making backups of the job configuration files.
I regularly back up the global config.xml, all the job config.xml files and all the plugins. Using these I can set up my Jenkins from scratch. And I do that to set up a test instance where I try any plugin or Jenkins core upgrade. If I see no problems after running a few of the trickiest builds, I know I can upgrade the production instance with much more confidence.

Resources