Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 500 with EOF when pushing docker image via remote api #9315

Closed
VRanga000 opened this issue Nov 24, 2014 · 16 comments · Fixed by #11859
Closed

HTTP 500 with EOF when pushing docker image via remote api #9315

VRanga000 opened this issue Nov 24, 2014 · 16 comments · Fixed by #11859
Assignees

Comments

@VRanga000
Copy link

Steps to reproduce:

vikas@vikas-Latitude-E6420:~$ wget -O- --post-data='' 'http://localhost:2375/images/docreg.myserver.net/myapp/push?tag=1.0'
--2014-11-24 12:28:09-- http://localhost:2375/images/docreg.myserver.net/myapp/push?tag=1.0
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:2375... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2014-11-24 12:28:09 ERROR 500: Internal Server Error.

[debug] server.go:1181 Calling POST /images/{name:.}/push
[info] POST /images/docreg.myserver.net/myapp/push?tag=1.0
[error] server.go:1207 Handler for POST /images/{name:.
}/push returned error: EOF

My environment:
vikas@vikas-Latitude-E6420:$ uname -a
Linux vikas-Latitude-E6420 3.8.0-44-generic #66
precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

vikas@vikas-Latitude-E6420:~$ sudo docker version
Client version: 1.3.1
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): 4e9bbfa
OS/Arch (client): linux/amd64
[debug] server.go:1181 Calling GET /version
[info] GET /v1.15/version
[4b4b0524] +job version()
[4b4b0524] -job version() = OK (0)
Server version: 1.3.1
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): 4e9bbfa

vikas@vikas-Latitude-E6420:~$ sudo docker -D info
[debug] server.go:1181 Calling GET /info
[info] GET /v1.15/info
[4b4b0524] +job info()
[4b4b0524] +job subscribers_count()
[4b4b0524] -job subscribers_count() = OK (0)
[4b4b0524] -job info() = OK (0)
Containers: 347
Images: 948
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Dirs: 1642
Execution Driver: native-0.2
Kernel Version: 3.8.0-44-generic
Operating System: Ubuntu precise (12.04.5 LTS)
Debug mode (server): true
Debug mode (client): true
Fds: 11
Goroutines: 11
EventsListeners: 0
Init Path: /usr/bin/docker
Username: vranga000
Registry: [https://index.docker.io/v1/]
WARNING: No swap limit support

@kuhnroyal
Copy link

I am having the same problem, any ideas?

@dmp42
Copy link
Contributor

dmp42 commented Dec 3, 2014

Hi, can you copy your docker daemon logs? Preferably, running docker in debug mode (-D)

@kuhnroyal
Copy link

Added -D to the upstart script and restarted, not sure if that is enough.

[info] POST /v1.10/images/docker.example.com%2my-image/push?tag=1.0.0-SNAPSHOT
[error] server.go:1207 Handler for POST /images/{name:.*}/push returned error: EOF
[error] server.go:110 HTTP Error: statusCode=500 EOF

@chungfai
Copy link

chungfai commented Dec 8, 2014

same here ,
bash-3.2$ docker version
Client version: 1.3.0
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): c78088f
OS/Arch (client): darwin/amd64
Server version: 1.3.0
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): c78088f

[debug] server.go:1181 Calling POST /images/{name:.}/push
[info] POST /images/localhost:5000/test/push
[error] server.go:1207 Handler for POST /images/{name:.
}/push returned error: EOF
[error] server.go:110 HTTP Error: statusCode=500 EOF

@m-barthelemy
Copy link

I had the same issue when pushing via API to a private registry (didn't test with public Docker registry/index). I don't think it happened with previous (<= 1.2) versions of Docker.

Don't know if it really was the same problem, but I had to add an X-Registry-Auth header token to my push request to get rid of this 500 error.

@kuhnroyal
Copy link

This was an authentication issue indeed, the 500 error is kind of confusing here.
Thanks @m-barthelemy

@ghost
Copy link

ghost commented Feb 26, 2015

This is especially problematic for our usage: we're pushing images to a private registry that's un-authenticated using a maven plugin that communicates to the daemon over tcp. Right now we're having to setup bogus authentication information to push.

@thaJeztah
Copy link
Member

(slightly) related issues, but for better handling of errors in docker CLI, not API; #11016, #9120

@jessfraz
Copy link
Contributor

jessfraz commented Mar 2, 2015

has anyone tried with docker 1.5

@mohamedhaleem
Copy link

have not seen this issue with the following version

Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 5bc2ff8/1.4.1
OS/Arch (client): linux/amd64
Server version: 1.4.1
Server API version: 1.16
Go version (server): go1.3.3
Git commit (server): 5bc2ff8/1.4.1

@dmp42
Copy link
Contributor

dmp42 commented Mar 7, 2015

@kuhnroyal can you clarify what you did to solve the authentication issue?

@dmp42 dmp42 self-assigned this Mar 7, 2015
@kuhnroyal
Copy link

@dmp42 I was experiencing this issue when using a docker-maven-plugin. The registry was secured with BASIC auth and some request to the registry did not add the authentication information.
Like I said, the error did not make it clear that it was an authentication problem but in the end it was.

@jgangemi
Copy link

i see this in docker 1.5 as well and opened this issue: #10983.

i resolved it (i also use the docker-maven-plugin) by encoding an empty username and password and sending that w/ the X-Registry-Auth header.

@asssaf
Copy link

asssaf commented Apr 15, 2015

@jgangemi how did you tell maven-docker-plugin to send the X-Registry-Auth header?

@VRanga000
Copy link
Author

I was able to get past it by just adding a dummy auth section to the plugin config:

On 04/15/2015 01:10 PM, asssaf wrote:

@jgangemihttps://github.com/jgangemi how did you tell maven-docker-plugin to send the X-Registry-Auth header?


Reply to this email directly or view it on GitHubhttps://github.com//issues/9315#issuecomment-93508139.

@jgangemi
Copy link

yep. what @VRanga000 said is how you currently get things to work.

given no one has come back and told me it's not ok to do, i think we are going to solve the problem by doing the equivalent of setting the dummy section when pushing to a private registry and no auth information has been specified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants