mark1234
mark1234

Reputation: 1121

Jenkins re-run setup wizard

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

Answers (2)

Jeff Diederiks
Jeff Diederiks

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

VonC
VonC

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

Related Questions