[JIRA] (JENKINS-37854) Docker Build and Publish not building

9 views
Skip to first unread message

evanilsonbraulio@gmail.com (JIRA)

unread,
Aug 31, 2016, 10:00:02 AM8/31/16
to jenkinsc...@googlegroups.com
Evanilson Abril created an issue
 
Jenkins / Bug JENKINS-37854
Docker Build and Publish not building
Issue Type: Bug Bug
Assignee: Carlos Sanchez
Components: docker-build-publish-plugin
Created: 2016/Aug/31 1:59 PM
Priority: Critical Critical
Reporter: Evanilson Abril

Trying to build my docker image into a docker registry and I get this

net.sf.json.JSONException: A JSONObject text must begin with '{' at character 0 of
at net.sf.json.util.JSONTokener.syntaxError(JSONTokener.java:499)
at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:919)
at net.sf.json.JSONObject._fromString(JSONObject.java:1145)
at net.sf.json.JSONObject.fromObject(JSONObject.java:162)
at net.sf.json.JSONObject.fromObject(JSONObject.java:132)
at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryToken$1.call(DockerRegistryToken.java:91)
at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryToken$1.call(DockerRegistryToken.java:71)
at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryToken.newKeyMaterialFactory(DockerRegistryToken.java:71)
at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.newKeyMaterialFactory(DockerRegistryEndpoint.java:204)
at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.newKeyMaterialFactory(DockerRegistryEndpoint.java:193)
at com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:458)
at com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:434)
at com.cloudbees.dockerpublish.DockerBuilder$Perform.buildAndTag(DockerBuilder.java:376)
at com.cloudbees.dockerpublish.DockerBuilder$Perform.exec(DockerBuilder.java:311)
at com.cloudbees.dockerpublish.DockerBuilder$Perform.access$100(DockerBuilder.java:291)
at com.cloudbees.dockerpublish.DockerBuilder.perform(DockerBuilder.java:262)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1720)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Build step 'Docker Build and Publish' marked build as failure

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

jenkins-ci@carlossanchez.eu (JIRA)

unread,
Aug 31, 2016, 10:05:05 AM8/31/16
to jenkinsc...@googlegroups.com
Carlos Sanchez commented on Bug JENKINS-37854
 
Re: Docker Build and Publish not building

Please don't open duplicate issues.
What version of Docker, registry, jenkins,... are you using?

evanilsonbraulio@gmail.com (JIRA)

unread,
Aug 31, 2016, 10:17:02 AM8/31/16
to jenkinsc...@googlegroups.com

Docker version 1.12.1
Jenkins version 2.7.2 LTS

evanilsonbraulio@gmail.com (JIRA)

unread,
Aug 31, 2016, 12:47:01 PM8/31/16
to jenkinsc...@googlegroups.com

Docker Commons Plugin 1.4.0
CloudBees Docker Build and Publish plugin 1.3.1

evanilsonbraulio@gmail.com (JIRA)

unread,
Sep 2, 2016, 8:16:03 AM9/2/16
to jenkinsc...@googlegroups.com

Are u able to help or not ? I need to update my products

a.rauch@verband.creditreform.de (JIRA)

unread,
Oct 20, 2016, 6:34:01 AM10/20/16
to jenkinsc...@googlegroups.com

I got the same helpfull error message. Turns out that the user lost the login information to my private registry. After manually doing a docker login for that user everything started working again.

lucaschigami@gmail.com (JIRA)

unread,
Jan 5, 2017, 9:14:01 AM1/5/17
to jenkinsc...@googlegroups.com

I'm having the same problem with my Jenkins server.

lucaschigami@gmail.com (JIRA)

unread,
Jan 12, 2017, 6:20:01 AM1/12/17
to jenkinsc...@googlegroups.com
Lucas Chigami edited a comment on Bug JENKINS-37854
I'm having the same problem with my Jenkins server. Running the WAR inside a Tomcat8 server.

UPDATE: In my case, the problem was an archive located at /usr/share/tomcat8 named .dockercfg
I don't know why, but when the credentials were inserted in the job at Jenkins to upload the docker image to my self-hosted Registry service, this file was always blank. So I deleted this file, ran again the Jenkins job, and voila, success!

Ben.Harack@gmail.com (JIRA)

unread,
Mar 28, 2018, 3:37:02 PM3/28/18
to jenkinsc...@googlegroups.com

In addition to the step described above, I also had to re-login to my container repository. So for me that took the following form:

aws ecr get-login

Where I then had to actually log in with the provided command. After that login, the next build worked.

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages