{"action":"created","issue":{"url":"https://api.github.com/repos/docker/distribution/issues/1196","labels_url":"https://api.github.com/repos/docker/distribution/issues/1196/labels{/name}","comments_url":"https://api.github.com/repos/docker/distribution/issues/1196/comments","events_url":"https://api.github.com/repos/docker/distribution/issues/1196/events","html_url":"https://github.com/docker/distribution/issues/1196","id":118105217,"number":1196,"title":"/v2/_catalog throw 405 error (v2.2.0) ?","user":{"login":"remoe","id":804941,"avatar_url":"https://avatars.githubusercontent.com/u/804941?v=3","gravatar_id":"","url":"https://api.github.com/users/remoe","html_url":"https://github.com/remoe","followers_url":"https://api.github.com/users/remoe/followers","following_url":"https://api.github.com/users/remoe/following{/other_user}","gists_url":"https://api.github.com/users/remoe/gists{/gist_id}","starred_url":"https://api.github.com/users/remoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remoe/subscriptions","organizations_url":"https://api.github.com/users/remoe/orgs","repos_url":"https://api.github.com/users/remoe/repos","events_url":"https://api.github.com/users/remoe/events{/privacy}","received_events_url":"https://api.github.com/users/remoe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-20T19:02:01Z","updated_at":"2015-11-25T21:47:25Z","closed_at":null,"body":"I try to debug why docker-registry get a 405 error after \"/v2/_catalog\". But I didn't find the reason:\r\n\r\n```\r\ncore # curl -I http://172.18.8.1:5000/v2/\r\nHTTP/1.1 200 OK\r\nContent-Length: 2\r\nContent-Type: application/json; charset=utf-8\r\nDocker-Distribution-Api-Version: registry/2.0\r\nX-Content-Type-Options: nosniff\r\n```\r\n\r\n```\r\ncore # curl -I http://172.18.8.1:5000/v2/_catalog\r\nHTTP/1.1 405 Method Not Allowed\r\nAllow: GET\r\nContent-Type: text/plain; charset=utf-8\r\nDocker-Distribution-Api-Version: registry/2.0\r\nX-Content-Type-Options: nosniff\r\nContent-Length: 19\r\n```\r\n\r\nlog:\r\n\r\n```\r\nNov 21 10:34:58 server docker[845]: time=\"2015-11-21T10:34:58.59033859Z\" level=debug msg=\"authorizing request\" go.version=go1.4.3 http.request.host=\"172.18.8.1:5000\" http.request.id=c9d4abf2-8ee2-4e32-a4b2-7f3f23418a0e http.request.method=HEAD http.request.remoteaddr=\"172.18.8.1:45304\" http.request.uri=\"/v2/_catalog\" http.request.useragent=\"curl/7.42.1\" instance.id=33ffd4a9-1bde-4bf2-a6d4-1ad7466d6241 service=registry version=v2.2.0\r\nNov 21 10:34:58 server docker[845]: 172.18.8.1 - - [21/Nov/2015:10:34:58 +0000] \"HEAD /v2/_catalog HTTP/1.1\" 405 19 \"\" \"curl/7.42.1\"\r\n```\r\n\r\nI run the registry as follow:\r\n\r\n```\r\n/usr/bin/docker run --rm --net host --privileged --name docker-registry \\\r\n          -v /data/registry:/var/lib/registry \\\r\n          -e REGISTRY_LOG_LEVEL=debug \\\r\n          -e REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io \\\r\n          registry:2.2.0\r\n```\r\n\r\n```bash\r\n> docker version\r\nClient:\r\n Version:      1.8.3\r\n API version:  1.20\r\n Go version:   go1.4.3\r\n Git commit:   cedd534-dirty\r\n Built:        Thu Nov 19 23:12:57 UTC 2015\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.8.3\r\n API version:  1.20\r\n Go version:   go1.4.3\r\n Git commit:   cedd534-dirty\r\n Built:        Thu Nov 19 23:12:57 UTC 2015\r\n OS/Arch:      linux/amd64\r\n```\r\n\r\nI don't find any help here: https://docs.docker.com/registry/spec/api/#get-catalog"},"comment":{"url":"https://api.github.com/repos/docker/distribution/issues/comments/159738494","html_url":"https://github.com/docker/distribution/issues/1196#issuecomment-159738494","issue_url":"https://api.github.com/repos/docker/distribution/issues/1196","id":159738494,"user":{"login":"RRAlex","id":3272818,"avatar_url":"https://avatars.githubusercontent.com/u/3272818?v=3","gravatar_id":"","url":"https://api.github.com/users/RRAlex","html_url":"https://github.com/RRAlex","followers_url":"https://api.github.com/users/RRAlex/followers","following_url":"https://api.github.com/users/RRAlex/following{/other_user}","gists_url":"https://api.github.com/users/RRAlex/gists{/gist_id}","starred_url":"https://api.github.com/users/RRAlex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RRAlex/subscriptions","organizations_url":"https://api.github.com/users/RRAlex/orgs","repos_url":"https://api.github.com/users/RRAlex/repos","events_url":"https://api.github.com/users/RRAlex/events{/privacy}","received_events_url":"https://api.github.com/users/RRAlex/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T21:47:25Z","updated_at":"2015-11-25T21:47:25Z","body":"I had the same error until I tried with -X GET instead of HEAD (-I).\r\n(docker 1.9.1 and registry 2.2)"}}