After Harbor(0.3.0) installed successfully, then logon UI to set the default project library to private, and then push image to library failed, the detailed steps as below:
# docker tag nginx:1.7.9 gradyhost2.eng.platformlab.ibm.com:80/library/nginx
# docker -D login gradyhost2.eng.platformlab.ibm.com:80
Username (admin): admin
Password:
Login Succeeded
# docker push gradyhost2.eng.platformlab.ibm.com:80/library/nginx
The push refers to a repository [gradyhost2.eng.platformlab.ibm.com:80/library/nginx]
5f70bf18a086: Pushing 1.024 kB
4b26ab29a475: Pushing [==================================================>] 3.072 kB
ccb1d68e3fb7: Pushing [==================================================>] 3.072 kB
e387107e2065: Pushing [========> ] 1.183 MB/6.591 MB
63bf84221cce: Pushing [==================================================>] 3.072 kB
e02dce553481: Waiting
dea2e4984e29: Waiting
unauthorized: authentication required
My docker and docker-compose version as below:
# docker version
Client:
Version: 1.11.1
API version: 1.23
Go version: go1.5.4
Git commit: 5604cbe
Built: Tue Apr 26 23:30:23 2016
OS/Arch: linux/amd64
Server:
Version: 1.11.1
API version: 1.23
Go version: go1.5.4
Git commit: 5604cbe
Built: Tue Apr 26 23:30:23 2016
OS/Arch: linux/amd64
# docker-compose version
docker-compose version 1.8.0, build f3628c7
docker-py version: 1.9.0
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013
I found that after removing the port _80_ from the push url, then push can be successfully.
# docker login gradyhost2.eng.platformlab.ibm.com
Username (admin): admin
Password:
Login Succeeded
root@gradyhost1:/opt# docker push gradyhost2.eng.platformlab.ibm.com/library/nginx
The push refers to a repository [gradyhost2.eng.platformlab.ibm.com/library/nginx]
5f70bf18a086: Pushed
4b26ab29a475: Pushed
ccb1d68e3fb7: Pushed
e387107e2065: Pushed
63bf84221cce: Pushed
e02dce553481: Pushed
dea2e4984e29: Pushed
latest: digest: sha256:2204e6cc1bbcc3c5587aaada2c59819599847f1dbe5876dc21eba6764aa795ef size: 3012
for the faiied case, how long did it take? are you pushing to a remote server?
@reasonerjt, my harbor server and docker client are two VMs on my laptop, push is pretty fast. The failed case and successful case are use the same environment.
@gradywang
I can not reproduce such issue on my unbuntu box. Not sure if it's again due to ubuntu vs centos.
I know you have successfully work around, but are you interested to re-produce the issue and attach the packaged logs??
环境:
harbor ip: 10.211.55.3
client: 10.211.55.4
问题如下:
[root@bogon data]# docker login 10.211.55.3
Username: jiangleiyu
Password:
Login Succeeded
[root@bogon data]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
10.211.55.3/library/gitlab 8.8.5 ca4e3d2cd195 9 weeks ago 747.2 MB
[root@bogon data]# docker push 10.211.55.3/library/gitlab:8.8.5
The push refers to a repository [10.211.55.3/library/gitlab]
4e9d75f900f9: Preparing
a237cdd43f01: Preparing
2b3543a0b69b: Preparing
00f859d9f787: Preparing
2298f48fe36e: Preparing
8e4bca0a275f: Waiting
5f70bf18a086: Waiting
6f8be37bd578: Waiting
9f7ab087e6e6: Waiting
dc109d4b4ccf: Waiting
a7e1c363defb: Waiting
unauthorized: authentication required
我也遇到一样的问提,请问端口加上和去掉都用过了,docker login都显示正常,但在docker push的时候还是出现unauthorized: authentication required,有解决这个问提的吗?
I meet the same question, I use nginx for load balance. May nginx change my url with :80, so push failed.
The same meet me with version 0.5.0, success to login and failed to push.
# docker login 192.168.6.36
Username (admin): admin
Password:
Login Succeeded
# docker push 192.168.6.36/test/nginx:1.11.5
The push refers to a repository [192.168.6.36/test/nginx]
3f117c44afbb: Pushing 3.584 kB
c4a8b7411af4: Preparing
fe4c16cbf7a4: Pushing [==================================================>] 123 MB
unauthorized: authentication required
log for ui
Jan 5 11:30:01 172.18.0.1 ui[20904]: 2017-01-05T03:30:01Z [DEBUG] [authutils.go:49]: scopes: [repository:test/nginx:push,pull]
Jan 5 11:30:01 172.18.0.1 ui[20904]: 2017-01-05T03:30:01Z [INFO] request url: /service/token?account=admin&scope=repository%3Atest%2Fnginx%3Apush%2Cpull&service=token-service
Jan 5 11:30:01 172.18.0.1 ui[20904]: 2017-01-05T03:30:01Z [WARNING] Failed to get secret cookie, error: http: named cookie not present
Jan 5 11:30:01 172.18.0.1 ui[20904]: 2017-01-05T03:30:01Z [DEBUG] [token.go:53]: uid for logging: admin
Jan 5 11:30:01 172.18.0.1 ui[20904]: 2017-01-05T03:30:01Z [DEBUG] [authenticator.go:57]: Current AUTH_MODE is db_auth
Jan 5 11:30:01 172.18.0.1 ui[20904]: 2017-01-05T03:30:01Z [DEBUG] [token.go:63]: username for filtering access: admin.
Jan 5 11:30:01 172.18.0.1 ui[20904]: 2017-01-05T03:30:01Z [INFO] current access, type: repository, name:test/nginx, actions:[push * pull]
Jan 5 11:30:01 172.18.0.1 ui[20904]: 2017/01/05 03:30:01 #033[1;34m[router.go:829][D] | GET | /service/token | 46.541652ms | match | /service/token | #033[0m
Jan 5 11:34:19 172.18.0.1 ui[20904]: 2017-01-05T03:34:19Z [DEBUG] [authutils.go:49]: scopes: []
Jan 5 11:34:19 172.18.0.1 ui[20904]: 2017-01-05T03:34:19Z [INFO] request url: /service/token?account=admin&client_id=docker&offline_token=true&service=token-service
Jan 5 11:34:19 172.18.0.1 ui[20904]: 2017-01-05T03:34:19Z [WARNING] Failed to get secret cookie, error: http: named cookie not present
Jan 5 11:34:19 172.18.0.1 ui[20904]: 2017-01-05T03:34:19Z [DEBUG] [token.go:53]: uid for logging: admin
Jan 5 11:34:19 172.18.0.1 ui[20904]: 2017-01-05T03:34:19Z [DEBUG] [authenticator.go:57]: Current AUTH_MODE is db_auth
Jan 5 11:34:19 172.18.0.1 ui[20904]: 2017-01-05T03:34:19Z [DEBUG] [token.go:63]: username for filtering access: admin.
Jan 5 11:34:19 172.18.0.1 ui[20904]: 2017/01/05 03:34:19 #033[1;34m[router.go:829][D] | GET | /service/token | 48.441942ms | match | /service/token | #033[0m
Jan 5 11:34:23 172.18.0.1 ui[20904]: 2017-01-05T03:34:23Z [DEBUG] [authutils.go:49]: scopes: [repository:test/nginx:push,pull]
Jan 5 11:34:23 172.18.0.1 ui[20904]: 2017-01-05T03:34:23Z [INFO] request url: /service/token?account=admin&scope=repository%3Atest%2Fnginx%3Apush%2Cpull&service=token-service
Jan 5 11:34:23 172.18.0.1 ui[20904]: 2017-01-05T03:34:23Z [WARNING] Failed to get secret cookie, error: http: named cookie not present
Jan 5 11:34:23 172.18.0.1 ui[20904]: 2017-01-05T03:34:23Z [DEBUG] [token.go:53]: uid for logging: admin
Jan 5 11:34:23 172.18.0.1 ui[20904]: 2017-01-05T03:34:23Z [DEBUG] [authenticator.go:57]: Current AUTH_MODE is db_auth
Jan 5 11:34:23 172.18.0.1 ui[20904]: 2017-01-05T03:34:23Z [DEBUG] [token.go:63]: username for filtering access: admin.
Jan 5 11:34:23 172.18.0.1 ui[20904]: 2017-01-05T03:34:23Z [INFO] current access, type: repository, name:test/nginx, actions:[push * pull]
Jan 5 11:34:23 172.18.0.1 ui[20904]: 2017/01/05 03:34:23 #033[1;34m[router.go:829][D] | GET | /service/token | 46.195483ms | match | /service/token | #033[0m
the log for registry
Jan 5 11:34:19 172.18.0.1 registry[20904]: time="2017-01-05T03:34:19.112991284Z" level=debug msg="authorizing request" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=2c3617fc-d686-4aa5-804d-31481ebc5dcc http.request.method=GET http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry version=v2.5.0
Jan 5 11:34:19 172.18.0.1 registry[20904]: time="2017-01-05T03:34:19.113117201Z" level=warning msg="error authorizing context: authorization token required" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=2c3617fc-d686-4aa5-804d-31481ebc5dcc http.request.method=GET http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry version=v2.5.0
Jan 5 11:34:19 172.18.0.1 registry[20904]: 172.18.0.7 - - [05/Jan/2017:03:34:19 +0000] "GET /v2/ HTTP/1.1" 401 87 "" "docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))"
Jan 5 11:34:19 172.18.0.1 registry[20904]: time="2017-01-05T03:34:19.184666323Z" level=debug msg="authorizing request" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=2399de3a-6e80-4836-bf27-56470caa77a4 http.request.method=GET http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry version=v2.5.0
Jan 5 11:34:19 172.18.0.1 registry[20904]: time="2017-01-05T03:34:19.185364177Z" level=info msg="response completed" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=2399de3a-6e80-4836-bf27-56470caa77a4 http.request.method=GET http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=2.308288ms http.response.status=200 http.response.written=2 instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry version=v2.5.0
Jan 5 11:34:19 172.18.0.1 registry[20904]: 172.18.0.7 - - [05/Jan/2017:03:34:19 +0000] "GET /v2/ HTTP/1.1" 200 2 "" "docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))"
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.256031106Z" level=debug msg="authorizing request" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=d7cfe75f-7dcb-42bf-998d-e5892d1bf56e http.request.method=GET http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.256154662Z" level=warning msg="error authorizing context: authorization token required" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=d7cfe75f-7dcb-42bf-998d-e5892d1bf56e http.request.method=GET http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: 172.18.0.7 - - [05/Jan/2017:03:34:23 +0000] "GET /v2/ HTTP/1.1" 401 87 "" "docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))"
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.33019607Z" level=debug msg="authorizing request" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=9b142347-4a0d-43ca-a96b-e5e348f1f23b http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry vars.name="test/nginx" version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.331880073Z" level=debug msg="(*linkedBlobStore).Writer" auth.user.name=admin go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=9b142347-4a0d-43ca-a96b-e5e348f1f23b http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry vars.name="test/nginx" version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.334256535Z" level=debug msg="authorizing request" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=1e300355-e651-4e9c-ad50-95c97b569477 http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry vars.name="test/nginx" version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.33497118Z" level=debug msg="authorizing request" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=dde57148-4d75-4a30-8fd0-7910e09f3cfb http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry vars.name="test/nginx" version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.335125518Z" level=debug msg="(*linkedBlobStore).Writer" auth.user.name=admin go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=1e300355-e651-4e9c-ad50-95c97b569477 http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry vars.name="test/nginx" version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.335652755Z" level=debug msg="(*linkedBlobStore).Writer" auth.user.name=admin go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=dde57148-4d75-4a30-8fd0-7910e09f3cfb http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry vars.name="test/nginx" version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.336635511Z" level=debug msg="filesystem.PutContent(\"/docker/registry/v2/repositories/test/nginx/_uploads/bd923a63-cd43-4347-8c93-3b8ff14b6034/startedat\")" auth.user.name=admin go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=1e300355-e651-4e9c-ad50-95c97b569477 http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry trace.duration=1.375682ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).PutContent" trace.id=b43e1134-58a6-4558-af15-10bb7441db02 trace.line=95 vars.name="test/nginx" version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.336829851Z" level=debug msg="filesystem.Writer(\"/docker/registry/v2/repositories/test/nginx/_uploads/bd923a63-cd43-4347-8c93-3b8ff14b6034/data\", false)" auth.user.name=admin go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=1e300355-e651-4e9c-ad50-95c97b569477 http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry trace.duration=72.161µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Writer" trace.id=51c2ebd9-f688-4db2-b8d0-a1dbc9392b86 trace.line=124 vars.name="test/nginx" version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.337916281Z" level=debug msg="filesystem.PutContent(\"/docker/registry/v2/repositories/test/nginx/_uploads/7cec6f63-d822-4659-98d8-1d97b1ae4946/startedat\")" auth.user.name=admin go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=dde57148-4d75-4a30-8fd0-7910e09f3cfb http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry trace.duration=2.134704ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).PutContent" trace.id=bda9a568-0e77-4460-b7f0-cb0365d84c88 trace.line=95 vars.name="test/nginx" version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.338137239Z" level=debug msg="filesystem.Writer(\"/docker/registry/v2/repositories/test/nginx/_uploads/7cec6f63-d822-4659-98d8-1d97b1ae4946/data\", false)" auth.user.name=admin go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=dde57148-4d75-4a30-8fd0-7910e09f3cfb http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry trace.duration=81.495µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Writer" trace.id=5b8ff43b-3815-4b8a-989f-2911c37d7bad trace.line=124 vars.name="test/nginx" version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.338188886Z" level=debug msg="filesystem.PutContent(\"/docker/registry/v2/repositories/test/nginx/_uploads/75d9591e-7b0b-44e1-ab7e-b9ab29722639/startedat\")" auth.user.name=admin go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=9b142347-4a0d-43ca-a96b-e5e348f1f23b http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry trace.duration=6.120361ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).PutContent" trace.id=6db05717-923f-4461-8faf-bcfc0de38675 trace.line=95 vars.name="test/nginx" version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.338247212Z" level=debug msg="filesystem.PutContent(\"/docker/registry/v2/repositories/test/nginx/_uploads/bd923a63-cd43-4347-8c93-3b8ff14b6034/hashstates/sha256/0\")" auth.user.name=admin go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=1e300355-e651-4e9c-ad50-95c97b569477 http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry trace.duration=1.220878ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).PutContent" trace.id=6a10684a-7556-43e3-a789-58c9af6d682e trace.line=95 vars.name="test/nginx" version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.338423721Z" level=debug msg="filesystem.Writer(\"/docker/registry/v2/repositories/test/nginx/_uploads/75d9591e-7b0b-44e1-ab7e-b9ab29722639/data\", false)" auth.user.name=admin go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=9b142347-4a0d-43ca-a96b-e5e348f1f23b http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry trace.duration=99.515µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Writer" trace.id=65c6794c-a9fc-4b0b-b5d5-0053dff44f23 trace.line=124 vars.name="test/nginx" version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.339017286Z" level=info msg="response completed" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=1e300355-e651-4e9c-ad50-95c97b569477 http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" http.response.duration=7.255533ms http.response.status=202 http.response.written=0 instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: 172.18.0.7 - - [05/Jan/2017:03:34:23 +0000] "POST /v2/test/nginx/blobs/uploads/ HTTP/1.1" 202 0 "" "docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))"
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.339505412Z" level=debug msg="filesystem.PutContent(\"/docker/registry/v2/repositories/test/nginx/_uploads/7cec6f63-d822-4659-98d8-1d97b1ae4946/hashstates/sha256/0\")" auth.user.name=admin go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=dde57148-4d75-4a30-8fd0-7910e09f3cfb http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry trace.duration=1.192404ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).PutContent" trace.id=aef2ce21-f4b7-472e-bd77-5aac88b9c5b1 trace.line=95 vars.name="test/nginx" version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.340125458Z" level=info msg="response completed" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=dde57148-4d75-4a30-8fd0-7910e09f3cfb http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" http.response.duration=7.429304ms http.response.status=202 http.response.written=0 instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: 172.18.0.7 - - [05/Jan/2017:03:34:23 +0000] "POST /v2/test/nginx/blobs/uploads/ HTTP/1.1" 202 0 "" "docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))"
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.340133386Z" level=debug msg="filesystem.PutContent(\"/docker/registry/v2/repositories/test/nginx/_uploads/75d9591e-7b0b-44e1-ab7e-b9ab29722639/hashstates/sha256/0\")" auth.user.name=admin go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=9b142347-4a0d-43ca-a96b-e5e348f1f23b http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry trace.duration=1.547527ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).PutContent" trace.id=fb80d996-3f12-4761-8b3d-12d57f31cd9c trace.line=95 vars.name="test/nginx" version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.340730653Z" level=info msg="response completed" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=9b142347-4a0d-43ca-a96b-e5e348f1f23b http.request.method=POST http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" http.response.duration=13.572266ms http.response.status=202 http.response.written=0 instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: 172.18.0.7 - - [05/Jan/2017:03:34:23 +0000] "POST /v2/test/nginx/blobs/uploads/ HTTP/1.1" 202 0 "" "docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))"
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.413006467Z" level=debug msg="authorizing request" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=f0291a70-dcde-4ae0-a4ff-95d791c4d6b2 http.request.method=PATCH http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/bd923a63-cd43-4347-8c93-3b8ff14b6034?_state=fOnYo5FON-WfaZWvfHahGv3WgtXvmI5Ke5bZgWuargt7Ik5hbWUiOiJ0ZXN0L25naW54IiwiVVVJRCI6ImJkOTIzYTYzLWNkNDMtNDM0Ny04YzkzLTNiOGZmMTRiNjAzNCIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNy0wMS0wNVQwMzozNDoyMy4zMzUyMTExNjNaIn0%3D" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry vars.name="test/nginx" vars.uuid=bd923a63-cd43-4347-8c93-3b8ff14b6034 version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.413436572Z" level=warning msg="error authorizing context: authorization token required" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=f0291a70-dcde-4ae0-a4ff-95d791c4d6b2 http.request.method=PATCH http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/bd923a63-cd43-4347-8c93-3b8ff14b6034?_state=fOnYo5FON-WfaZWvfHahGv3WgtXvmI5Ke5bZgWuargt7Ik5hbWUiOiJ0ZXN0L25naW54IiwiVVVJRCI6ImJkOTIzYTYzLWNkNDMtNDM0Ny04YzkzLTNiOGZmMTRiNjAzNCIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNy0wMS0wNVQwMzozNDoyMy4zMzUyMTExNjNaIn0%3D" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry vars.name="test/nginx" vars.uuid=bd923a63-cd43-4347-8c93-3b8ff14b6034 version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: 172.18.0.7 - - [05/Jan/2017:03:34:23 +0000] "PATCH /v2/test/nginx/blobs/uploads/bd923a63-cd43-4347-8c93-3b8ff14b6034?_state=fOnYo5FON-WfaZWvfHahGv3WgtXvmI5Ke5bZgWuargt7Ik5hbWUiOiJ0ZXN0L25naW54IiwiVVVJRCI6ImJkOTIzYTYzLWNkNDMtNDM0Ny04YzkzLTNiOGZmMTRiNjAzNCIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNy0wMS0wNVQwMzozNDoyMy4zMzUyMTExNjNaIn0%3D HTTP/1.1" 401 200 "" "docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))"
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.594624206Z" level=debug msg="authorizing request" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=3d27a278-08b5-4eb3-a8a7-28ccabaab085 http.request.method=PATCH http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/7cec6f63-d822-4659-98d8-1d97b1ae4946?_state=Vbh6I6ZPHg7N08mGY5FUz64U-vRzl83sl14XxJ9_kYl7Ik5hbWUiOiJ0ZXN0L25naW54IiwiVVVJRCI6IjdjZWM2ZjYzLWQ4MjItNDY1OS05OGQ4LTFkOTdiMWFlNDk0NiIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNy0wMS0wNVQwMzozNDoyMy4zMzU3MzcxNTFaIn0%3D" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry vars.name="test/nginx" vars.uuid=7cec6f63-d822-4659-98d8-1d97b1ae4946 version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: time="2017-01-05T03:34:23.594889994Z" level=warning msg="error authorizing context: authorization token required" go.version=go1.6.3 http.request.host=192.168.6.36 http.request.id=3d27a278-08b5-4eb3-a8a7-28ccabaab085 http.request.method=PATCH http.request.remoteaddr=192.168.6.36 http.request.uri="/v2/test/nginx/blobs/uploads/7cec6f63-d822-4659-98d8-1d97b1ae4946?_state=Vbh6I6ZPHg7N08mGY5FUz64U-vRzl83sl14XxJ9_kYl7Ik5hbWUiOiJ0ZXN0L25naW54IiwiVVVJRCI6IjdjZWM2ZjYzLWQ4MjItNDY1OS05OGQ4LTFkOTdiMWFlNDk0NiIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNy0wMS0wNVQwMzozNDoyMy4zMzU3MzcxNTFaIn0%3D" http.request.useragent="docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))" instance.id=e35d5794-929f-43bc-8891-700102e053d6 service=registry vars.name="test/nginx" vars.uuid=7cec6f63-d822-4659-98d8-1d97b1ae4946 version=v2.5.0
Jan 5 11:34:23 172.18.0.1 registry[20904]: 172.18.0.7 - - [05/Jan/2017:03:34:23 +0000] "PATCH /v2/test/nginx/blobs/uploads/7cec6f63-d822-4659-98d8-1d97b1ae4946?_state=Vbh6I6ZPHg7N08mGY5FUz64U-vRzl83sl14XxJ9_kYl7Ik5hbWUiOiJ0ZXN0L25naW54IiwiVVVJRCI6IjdjZWM2ZjYzLWQ4MjItNDY1OS05OGQ4LTFkOTdiMWFlNDk0NiIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNy0wMS0wNVQwMzozNDoyMy4zMzU3MzcxNTFaIn0%3D HTTP/1.1" 401 200 "" "docker/1.12.5 go/go1.6.4 git-commit/7392c3b kernel/3.10.0-229.14.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.5 \\(linux\\))"
偶尔会出这个错误
the same to me.
the harbor version is 0.5.0
I use my own nginx for proxy, not the the harbor's.
my own nginx sets the https rule, it will pass to the http port which harbor has setted.
I can login, but can not push images.
the nginx settings:
server {
listen 80;
server_name dockerhub.hldh.net;
return 301 https://$host$request_uri;
}
server {
client_max_body_size 0;
listen 443;
server_name dockerhub.hldh.net;
ssl on;
ssl_certificate /mnt/cert/213973052060136.pem;
ssl_certificate_key /mnt/cert/213973052060136.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8888;
}
}
the port 8888 is the harbor's http port.
i currently have the same problem with 0.5:
$ docker login ---
Username (f4n):
Password:
Login Succeeded
$ docker push ---/devel/test
The push refers to a repository [---/devel/test]
d87e8c0e1a63: Pushing [==================================================>] 4.096 kB
a0dead54fa1e: Pushing [===> ] 1.287 MB/16.87 MB
60ab55d3379d: Pushing [===========> ] 951.3 kB/3.984 MB
unauthorized: authentication required
$
my setup is like: harbor in http mode and using cloudflare transparent ssl to avoid cert problems. does the problems come from the cloudflare ssl proxy?
ok, for me it seems to be a cloudflare problem.
@f4n Can you give the details of how did you solve the problem? What settings did you change in Cloudflare?
Same issue here
Most helpful comment
@f4n Can you give the details of how did you solve the problem? What settings did you change in Cloudflare?