Reputation: 1121
Just installed latest Jenkins on Windows server.
Changed it to run as a service and my login no longer works. No problems, disable security for now.
But found out all my plug-ins are missing.
How can I have it rerun the setup wizard?
Upvotes: 5
Views: 7428
Reputation: 1380
I installed Jenkins through apt and my solution was a little different.
For Jenkins v2.140 I had to edit /var/lib/jenkins/config.xml
and change the following line:
<installStateName>NEW</installStateName>
to
<installStateName>RUNNING</installStateName>
then restart Jenkins:
sudo service jenkins restart
Here is everything above in a script:
#! /bin/bash
sudo sed -i 's#<installStateName>NEW.*#<installStateName>RUNNING<\/installStateName>#g' /var/lib/jenkins/config.xml
sudo service jenkins restart
Please note you will have to install all plugins and create users manually. I used the Jenkins CLI
Upvotes: 2
Reputation: 1326554
As seen in issue 310, you need on the server side to remove:
/usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state
/usr/share/jenkins/ref/jenkins.install.InstallUtil.lastExecVersion
(Search those files on your Windows Jenkins installation folder, to adapt those paths accordingly)
And you would relaunch Jenkins with -Djenkins.install.runSetupWizard=true
Upvotes: 2