I ran:
docker run -d --name=jenkins -p 8080:8080 -p 50000:50000 -v ~/jenkins:/var/jenkins_home jenkins
I got as far as the plugin config screen. Clicked on "Install selected plugins", got this error:
An error occurred during installation: No such plugin: cloudbees-folder
Only worked when I manually configured and deselected them all.
Docker version:
Client:
Version: 1.13.0
API version: 1.25
Go version: go1.7.3
Git commit: 49bf474
Built: Tue Jan 17 09:58:26 2017
OS/Arch: linux/amd64
Server:
Version: 1.13.0
API version: 1.25 (minimum version 1.12)
Go version: go1.7.3
Git commit: 49bf474
Built: Tue Jan 17 09:58:26 2017
OS/Arch: linux/amd64
Experimental: false
Update: I removed the -v ~/jenkins:/var/jenkins_home and didn't run into any problems. Seems to be a problem with mounting the jenkins_home as a volume.
I verified that ~/jenkins exists in my home directory, and it does.
well, it depends on what you have in ~/jenkins that is breaking the installation
@carlossg There's nothing in it, it's a new folder created for the purpose of starting the container. It should not be erroring.
I ran into the same problem after installing Jenkins in Windows (not in Docker), and in my case I got the same error with another plugin after I deselected cloudbees. Shutting down Jenkins and restarting it fixed the issue and plugins installed fine.
I ran into this error as well with jenkins:2.32.3-alpine and without mounting any volume on Linux.
In my case the issue was the http proxy was not set.
I could see the following warning:
ci_1 | Mar 21, 2017 11:54:14 AM hudson.model.UpdateCenter updateDefaultSite
ci_1 | WARNING: Upgrading Jenkins. Failed to update the default Update Site 'default'. Plugin upgrades may fail.
ci_1 | net.sf.json.JSONException: Unquotted string 'h1'
ci_1 | at net.sf.json.util.JSONTokener.nextValue(JSONTokener.java:432)
ci_1 | at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:955)
ci_1 | at net.sf.json.JSONObject._fromString(JSONObject.java:1145)
ci_1 | at net.sf.json.JSONObject.fromObject(JSONObject.java:162)
ci_1 | at net.sf.json.JSONObject.fromObject(JSONObject.java:132)
ci_1 | at hudson.model.UpdateSite.updateData(UpdateSite.java:206)
ci_1 | at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:190)
ci_1 | at hudson.model.UpdateCenter.updateDefaultSite(UpdateCenter.java:2193)
ci_1 | at jenkins.install.SetupWizard.init(SetupWizard.java:168)
ci_1 | at jenkins.install.InstallState$3.initializeState(InstallState.java:105)
ci_1 | at jenkins.model.Jenkins.setInstallState(Jenkins.java:1057)
ci_1 | at jenkins.install.InstallUtil.proceedToNextStateFrom(InstallUtil.java:96)
ci_1 | at jenkins.model.Jenkins.<init>(Jenkins.java:947)
ci_1 | at hudson.model.Hudson.<init>(Hudson.java:85)
ci_1 | at hudson.model.Hudson.<init>(Hudson.java:81)
ci_1 | at hudson.WebAppMain$3.run(WebAppMain.java:231)
The solution was to set the proxy in JAVA_OPTS:
JAVA_OPTS=-Dhttp.proxyHost=${proxy_host} -Dhttp.proxyPort=${proxy_port} -Dhttps.proxyHost=${proxy_host} -Dhttps.proxyPort=${proxy_port}
I had the same error.
The origin of the problem was the JVM (java -version was java 7).
Once switched to Java 8 (.bash_profile), everything was resolved.
@wheelerlaw if you are saying that this command fails
docker run -d --name=jenkins -p 8080:8080 -p 50000:50000 -v ~/jenkins:/var/jenkins_home jenkins
and this command succeeds
docker run -d --name=jenkins -p 8080:8080 -p 50000:50000 jenkins
then it boils down to what permissions or content your ~/jenkins dir has. Have you checked the logs of jenkins for errors ?
This work for me:
http://localhost:8080/restart
OR
service jenkins restart on Ubuntu 16.04
@techyaura : thanks, restart works for me.
Restart worked here as well (in osx)
http://localhost:8080/restart worked on blueocean running in docker container running on Mac ...
Restart jenkins worked!
http://localhost:8080/restart Mac not working!
Changing this line
JAVA_CMD="$JENKINS_JAVA_CMD $JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -jar $JENKINS_WAR"
to
JAVA_CMD="$JENKINS_JAVA_CMD -Dhudson.model.DownloadService.noSignatureCheck=true $JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -jar $JENKINS_WAR"
in /etc/init.d/jenkins
should fix the problem...
worked on fedora 28
Same problem with Mac
Please check the NTP. If the system runs with incorrect time, this error could occur.
I met the config error after I ran the command docker run -u root --restart always -d -p 8090:8080 --name jenkins -p 50000:50000 -v jenkins-data:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock jenkinsci/blueocean serveral times when I was fixing docker network problem. I think there's must be something wrong with the directries in the volume.
So I delete volume jenkins-data through docker. And the error disappeared.
Changing this line
JAVA_CMD="$JENKINS_JAVA_CMD $JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -jar $JENKINS_WAR"
to
JAVA_CMD="$JENKINS_JAVA_CMD -Dhudson.model.DownloadService.noSignatureCheck=true $JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -jar $JENKINS_WAR"in /etc/init.d/jenkins
should fix the problem...
worked on fedora 28
This did the trick for me, ty!
Update: I removed the
-v ~/jenkins:/var/jenkins_homeand didn't run into any problems. Seems to be a problem with mounting thejenkins_homeas a volume.I verified that
~/jenkinsexists in my home directory, and it does.
it works for me
I set the JAVA_HOME in ~/.bash_profile like export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home works
I faced the same issue while installing plugins in my docker container, it turned out to be a proxy issue. Changed proxy settings on my docker and it worked
restart worked for me.
restart is not work in mac.
Restart is not working on window 10...what should I do??
was the http proxy was not set.
modify /var/lib/docker/volumes/jenkins-data/_data/hudson.model.UpdateCenter.xml from https->http fix the problem
Most helpful comment
This work for me:
http://localhost:8080/restart
OR
service jenkins restart on Ubuntu 16.04