Jenkins fails to start after disabling the Jira plugin

Jenkins setup:

I can’t get jenkins script console at the moment so I’m unable to paste in the default info, but what happened is that I disabled “JIRA Integration for Jenkins” Version 3.1.4. from the UI and then used the ‘restart when no jobs are running’ button.

A bit later it restarted and I had the default placeholder page that jenkins was starting up and the page would refresh when ready, but it never does. After some time the page became an nginx error, then returned back to the startup page.

From the systemctl output, it appears that jenkins starts, tries to connect to some cloud hosts, fails, crashes then restarts.

  CGroup: /system.slice/jenkins.service
           ├─20100 /usr/bin/java -Xmx4096m -XX:MaxPermSize=512m -Djava.awt.headless=true -Dhudson.security.csrf.GlobalCrumbIssuerConfiguration.DISABLE_CSRF_PROTECTION=true -Dmail.smtp.starttls.enable=true -Dorg.csanchez.jenkins.plugins.kubernetes.clients.cacheExpiration=10 -Dappdynamics.agent.nodeName=master -Dappdynam...
           ├─22715 ssh -o StrictHostKeyChecking=no -i /tmp/ec2_9692264959613232079.pem ec2-user@10.14.28.194 -p 22 /usr/lib/jvm/jre-11/bin/java -jar /tmp/remoting.jar -workDir /home/ec2-user
           ├─22734 ssh -o StrictHostKeyChecking=no -i /tmp/ec2_11377882208164296396.pem ec2-user@10.14.7.221 -p 22 /usr/lib/jvm/jre-11/bin/java -jar /tmp/remoting.jar -workDir /home/ec2-user/
           ├─22760 ssh -o StrictHostKeyChecking=no -i /tmp/ec2_7033314754719421853.pem ec2-user@10.14.21.54 -p 22 /usr/lib/jvm/jre-11/bin/java -jar /tmp/remoting.jar -workDir /home/ec2-user
           ├─22777 ssh -o StrictHostKeyChecking=no -i /tmp/ec2_10919475967684602457.pem ec2-user@ip-10-14-7-206.ec2.internal -p 22 /usr/lib/jvm/jre-11/bin/java -jar /tmp/remoting.jar -workDir /home/ec2-user
           ├─22778 ssh -o StrictHostKeyChecking=no -i /tmp/ec2_12306122228990477035.pem ec2-user@10.14.4.123 -p 22 /usr/lib/jvm/jre-11/bin/java -jar /tmp/remoting.jar -workDir /home/ec2-user
           └─22780 ssh -o StrictHostKeyChecking=no -i /tmp/ec2_8043534708397216954.pem ec2-user@ip-10-14-2-115.ec2.internal -p 22 /usr/lib/jvm/jre-11/bin/java -jar /tmp/remoting.jar -workDir /home/ec2-user

From the log

Dec 19 19:27:45 ip-10-14-50-56 jenkins: 2024-12-19 19:27:45.097+0000 [id=83]#011INFO#011hudson.slaves.CommandLauncher#launch: agent launched for EC2 (AWS-cloud) - Ansible-8.7.0-controller (i-00148abd56b01fb39)
Dec 19 19:27:45 ip-10-14-50-56 jenkins: 2024-12-19 19:27:45.169+0000 [id=93]#011INFO#011hudson.slaves.CommandLauncher#launch: agent launched for EC2 (AWS-cloud) - Ansible-8.7.0-controller (i-051406c313a2b98bf)

I also get lots of messages about not finding the abstractfolder for a number of jobs

Dec 19 19:27:46 ip-10-14-50-56 jenkins: 2024-12-19 19:27:46.564+0000 [id=51]#011WARNING#011c.c.h.p.folder.AbstractFolder#loadChildren: could not find file /var/lib/jenkins/jobs/Sierra/jobs/Sierra/branches/feature%2FSIERRA-20858/config.xml

I’m at a loss on why it’s running into the problem after turning off a plugin that was broken and could use some suggestions.

I ended up getting past it by doing the following, which maybe isn’t the best way so leaving the question open just in case there is a better method.

I connected to the jenkins controller host and created $JENKINS_HOME/init.groovy.d/quiet.groovy

In that file I have

import jenkins.model.Jenkins;
Jenkins.instance.doQuietDown();

Then I restarted jenkins with systemctl with a stop && start

systemctl stop jenkins && systemctl start jenkins

That get jenkins to start the UI then once it seemed stable in the log I used

https://<jenkins.server>cancelQuietDown

To end the block on jobs and things went back to normal and builds were able to start running.

As I said, I don’t know if this is the recommended way to do it, but I needed to get builds going again and this ended up working.