docker-archive / docker-registry

This is **DEPRECATED**! Please go to https://github.com/docker/distribution
Apache License 2.0
2.88k stars 877 forks source link

Error on push images to private registry: HTTP Error 500 HELP PLZ #996

Open bengong2015 opened 9 years ago

bengong2015 commented 9 years ago

I've tried to push an image from 'master' to local private registry.

docker push 202.120.11.59:5000/kubernetes/pause

The push refers to a repository [202.120.11.59:5000/kubernetes/pause](len: 1) Sending image list FATA[0004]

The system log on master: May 6 11:20:47 localhost docker: time="2015-05-06T11:20:47+08:00" level="info" msg="POST /v1.18/images/202.120.11.59:5000/kubernetes/pause/push?tag="

May 6 11:20:47 localhost docker: time="2015-05-06T11:20:47+08:00" level="info" msg="+job push(202.120.11.59:5000/kubernetes/pause)"

May 6 11:20:47 localhost docker: time="2015-05-06T11:20:47+08:00" level="info" msg="+job resolve_repository(202.120.11.59:5000/kubernetes/pause)"

May 6 11:20:47 localhost docker: time="2015-05-06T11:20:47+08:00" level="info" msg="-job resolve_repository(202.120.11.59:5000/kubernetes/pause) = OK (0)"

May 6 11:20:51 localhost docker: time="2015-05-06T11:20:51+08:00" level="info" msg="authConfig does not conform to given endpoint ( != 202.120.11.59:5000)"

May 6 11:20:51 localhost docker: Error: Status 500 trying to push repository kubernetes/pause: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

May 6 11:20:51 localhost docker: 500 Internal Server Error

May 6 11:20:51 localhost docker:

Internal Server Error

May 6 11:20:51 localhost docker:

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

May 6 11:20:51 localhost docker: time="2015-05-06T11:20:51+08:00" level="info" msg="-job push(202.120.11.59:5000/kubernetes/pause) = ERR (1)"

Help plz.

bengong2015 commented 9 years ago

I've checked the docker-registry's logs and find an error

IntegrityError: (IntegrityError) UNIQUE constraint failed: repository.name u'INSERT INTO repository (name, description) VALUES (?, ?)' ('kubernetes/pause', '')

dmp42 commented 9 years ago

Your search index is somehow corrupted. I would recommend deleting the index.

griddle81 commented 9 years ago

I'm having this same issue. How do you delete and rebuild the search index?

bydga commented 9 years ago

This usually happenes when you delete the tag (from some docker registry ui). Seems like docker-registry is not updating its search index. Im digging into it and i will submit a inssu there

bengong2015 commented 9 years ago

It caused by the SELinux, the docker daemon run with SELinux in default ('--selinux-enabled'), It would be fine if adding '--privileged=true' when running docker-registry container.

javasparkle commented 9 years ago

Just open the the registry db in SQLite browser and delete the entry that is causing the problem. This will ensure that the next subsequent push will be successful.

driv commented 8 years ago

How can I connect to the database? Or how do I delete the index?

sjfloat commented 8 years ago

Having similar trouble. I'd also like to know.

thanks