Received unexpected http status 500 internal server error

Output of docker version: (paste your output here) ```Docker version 1.10.3, build 57bf6fd **Output of `docker info`:** (paste your output here) Running: 0 Paused: 0 Stopped: 3 Images: 6 Server Ver...
(paste your output here)
```Docker version 1.10.3, build 57bf6fd



**Output of `docker info`:**

 Running: 0
 Paused: 0
 Stopped: 3
Images: 6
Server Version: 1.10.3
Storage Driver: devicemapper
 Pool Name: docker-251:0-41156611-pool
 Pool Blocksize: 65.54 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 2.683 GB
 Data Space Total: 107.4 GB
 Data Space Available: 104.7 GB
 Metadata Space Used: 4.891 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.143 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Deferred Deletion Enabled: false
 Deferred Deleted Device Count: 0
 Data loop file: /scratch/docker/devicemapper/devicemapper/data
 WARNING: Usage of loopback devices is strongly discouraged for production use. Either use`--storage-opt dm.thinpooldev`or use`--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
 Metadata loop file: /scratch/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.107-RHEL7 (2015-10-14)
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
 Volume: local
 Network: host bridge null
Kernel Version: 4.1.12-32.2.3.el7uek.x86_64
Operating System: Oracle Linux Server 7.2
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 251.6 GiB
Name: xxxxxx..com
ID: DKRO:COZA:MLEU:PMNM:3RJZ:LYME:XC6R:ER4B:PZ7J:G5PB:2LEG:YSGN
Http Proxy: http://www-xxx.xxx.com:80/
Https Proxy: http://www-xxxx.xxx..com:80/

**Additional environment details (AWS, VirtualBox, physical, etc.):**
using object storage Swift

**Steps to reproduce the issue:**
1.Installed docker/distribution registry
distribution/registry                                   latest              6d263fc92047        7 months ago        666.4 MB
1. started private registry with SETTINGS_FLAVOR=swift
   3.docker push is failing

**Describe the results you received:**
# docker push xxxxxxx.com:5000/internal/oraclelinux:7u2

The push refers to a repository [xxxxxx.com:5000/internal/oraclelinux]
5f70bf18a086: Pushing 1.024 kB
472062da526a: Pushing [==================================================>] 276.1 MB/276.1 MB
Received unexpected HTTP status: 500 Internal Server Error

and docker logs show below error

time="2016-07-28T06:03:26.357702532Z" level=error msg="response completed with error" environment=development err.code=UNKNOWN err.detail="parsing time "Thu, 28 Jul 2016 06:02:20 UTC" as "Mon, 02 Jan 2006 15:04:05 GMT": cannot parse "UTC" as " GMT"" err.message="unknown error" 

**Describe the results you expected:**

**Additional information you deem important (e.g. issue happens only occasionally):**

Содержание

  1. Received unexpected HTTP status: 500 Internal Server Error #25166
  2. Comments
  3. swift list
  4. swift list REGISTRY
  5. docker images
  6. registry: received unexpected HTTP status: 500 Internal Server Error #89
  7. Comments

Received unexpected HTTP status: 500 Internal Server Error #25166

Output of docker version :

(paste your output here)

The text was updated successfully, but these errors were encountered:

Do you have logs from that registry as well? Looks like this may be an issue with docker/distribution, not docker (engine)

I have started container with the docker image «distribution/registry» . Do you need that logs from that container?

these logs I found in /var/log/messages

docker[18158]: time=»2016-07-28T05:44:41.380564107Z» level=info msg=»API listen on /var/run/docker.sock»
docker[18158]: time=»2016-07-28T05:45:17.968880651Z» level=error msg=»Upload failed: Error parsing HTTP response: invalid character ‘

Looks like it’s receiving a HTML page (but the logs are truncated); I suspect an issue with your proxy settings, causing some requests to be blocked, and returning a 403

but I can see some file under swift storage.

swift list

swift list REGISTRY

files/docker/registry/v2/repositories/oraclelinux/_uploads/010a09f7-68d5-4d7f-a769-c0f6b552b688/data
files/docker/registry/v2/repositories/oraclelinux/_uploads/010a09f7-68d5-4d7f-a769-c0f6b552b688/hashstates/sha256/0
files/docker/registry/v2/repositories/oraclelinux/_uploads/010a09f7-68d5-4d7f-a769-c0f6b552b688/hashstates/sha256/97837850
files/docker/registry/v2/repositories/oraclelinux/_uploads/010a09f7-68d5-4d7f-a769-c0f6b552b688/startedat
files/docker/registry/v2/repositories/oraclelinux/_uploads/174eb931-e7e7-42d5-b607-f6e9c4530f45/data
files/docker/registry/v2/repositories/oraclelinux/_uploads/174eb931-e7e7-42d5-b607-f6e9c4530f45/hashstates/sha256/0
files/docker/registry/v2/repositories/oraclelinux/_uploads/174eb931-e7e7-42d5-b607-f6e9c4530f45/hashstates/sha256/97837850
files/docker/registry/v2/repositories/oraclelinux/_uploads/174eb931-e7e7-42d5-b607-f6e9c4530f45/startedat
files/docker/registry/v2/repositories/oraclelinux/_uploads/22ec2a70-418d-4c6a-9127-ae7619584987/data
files/docker/registry/v2/repositories/oraclelinux/_uploads/22ec2a70-418d-4c6a-9127-ae7619584987/hashstates/sha256/0
files/docker/registry/v2/repositories/oraclelinux/_uploads/22ec2a70-418d-4c6a-9127-ae7619584987/hashstates/sha256/97837850
files/docker/registry/v2/repositories/oraclelinux/_uploads/22ec2a70-418d-4c6a-9127-ae7619584987/startedat
files/docker/registry/v2/repositories/oraclelinux/_uploads/d11f211c-e42c-4d62-9c10-18fc3d209338/data
files/docker/registry/v2/repositories/oraclelinux/_uploads/d11f211c-e42c-4d62-9c10-18fc3d209338/hashstates/sha256/0
files/docker/registry/v2/repositories/oraclelinux/_uploads/d11f211c-e42c-4d62-9c10-18fc3d209338/hashstates/sha256/97837850
files/docker/registry/v2/repositories/oraclelinux/_uploads/d11f211c-e42c-4d62-9c10-18fc3d209338/startedat
files/docker/registry/v2/repositories/oraclelinux/_uploads/d8721f47-4adf-4e67-be6b-862e4b02bbe9/data
files/docker/registry/v2/repositories/oraclelinux/_uploads/d8721f47-4adf-4e67-be6b-862e4b02bbe9/hashstates/sha256/0
files/docker/registry/v2/repositories/oraclelinux/_uploads/d8721f47-4adf-4e67-be6b-862e4b02bbe9/hashstates/sha256/97837850
files/docker/registry/v2/repositories/oraclelinux/_uploads/d8721f47-4adf-4e67-be6b-862e4b02bbe9/startedat

this is how .. I’m starting the docker registry container

docker run —restart=always —privileged=true -d —name pdit-registry1 -p 5000:5000 -e «REGISTRY_STORAGE=swift»
-e «REGISTRY_STORAGE_SWIFT_USERNAME=Storage-xxxxxx:xxxxx.Storageadmin» -e «REGISTRY_STORAGE_SWIFT_PASSWORD=xxxxxx»
-e «REGISTRY_STORAGE_SWIFT_AUTHURL=https://xxxxxxx.corp.com/auth/v1.0» -e «REGISTRY_STORAGE_SWIFT_CONTAINER=REGISTRY» distribution/registry

any help on this will be appreciated.

Perhaps @dmp42 has some suggestions, but this issue may be really specific to your setup; keep in mind that the GitHub issue tracker is not a general support forum; you can try forums.docker.com as well

First thing, please don’t use distribution/registry , just use the official image registry .

Also, like @thaJeztah pointed out, your logs contain html. The registry does not return html, so, it’s likely whatever proxy you have setup in between that’s causing the issue.

I would suggest you try again with:

  • the official image registry
  • no proxy in between

@dmp42 .. Appreciate for the inputs.

Even with offical image registry , Im getting the same error. I will check with proxy settings and see.

docker images

REPOSITORY TAG IMAGE ID CREATED SIZE
registry latest c6c14b3960bd 5 days ago 33.28 MB
registry 2 8ff6a4aae657 7 weeks ago 171.5 MB

Closing, because this is likely not a bug, but a configuration / network setup issue

Источник

registry: received unexpected HTTP status: 500 Internal Server Error #89

Running the registry container and try to upload an image to it results in a http 500.

Steps to reproduce:
Server 2019 install edge channel docker for windows, upgrade dockerd to nightly and set to experimental.
run: docker run -it -p 5000:5000 -e DEBUG=true —name registry registry:2

Run docker push on an client (dockerd get the server-host as unsecure registry) and get the error.

Docker Info
Client:
Debug Mode: false

Server:
Containers: 22
Running: 0
Paused: 0
Stopped: 22
Images: 24
Server Version: master-dockerproject-2019-03-12
Storage Driver: windowsfilter (windows) lcow (linux)
Windows:
LCOW:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics l2bridge l2tunnel nat null overlay transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)
Operating System: Windows Server 2019 Standard Evaluation Version 1809 (OS Build 17763.348)
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 32GiB
Name: SERVERHOST
ID: 3932400c-ee07-44d5-a769-922e15029e4b
Docker Root Dir: C:ProgramDataDocker
Debug Mode: true
File Descriptors: -1
Goroutines: 26
System Time: 2019-03-13T15:15:51.4471111+01:00
EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
SERVERHOST:5000
127.0.0.0/8
Live Restore Enabled: false

Docker Version

Client:
Version: master-dockerproject-2019-03-12
API version: 1.40
Go version: go1.11.5
Git commit: 81ac432c
Built: Tue Mar 12 23:51:56 2019
OS/Arch: windows/amd64
Experimental: false

Server:
Engine:
Version: master-dockerproject-2019-03-12
API version: 1.40 (minimum version 1.24)
Go version: go1.11.5
Git commit: 258edd7
Built: Tue Mar 12 23:59:36 2019
OS/Arch: windows/amd64
Experimental: true

Output

WARN[0000] No HTTP secret provided — generated random secret. This may cause problems with uploads if multiple registries are behind a load-balancer. To provide a shared secret, fill in http.secret in the configuration file or set the REGISTRY_HTTP_SECRET environment variable. go.version=go1.11.2 instance.id=4a203afe-2d78-42cd-8f46-e7094c70b9ea service=registry version=v2.7.1
INFO[0000] redis not configured go.version=go1.11.2 instance.id=4a203afe-2d78-42cd-8f46-e7094c70b9ea service=registry version=v2.7.1
INFO[0000] Starting upload purge in 31m0s go.version=go1.11.2 instance.id=4a203afe-2d78-42cd-8f46-e7094c70b9ea service=registry version=v2.7.1
INFO[0000] using inmemory blob descriptor cache go.version=go1.11.2 instance.id=4a203afe-2d78-42cd-8f46-e7094c70b9ea service=registry version=v2.7.1
INFO[0000] listening on [::]:5000 go.version=go1.11.2 instance.id=4a203afe-2d78-42cd-8f46-e7094c70b9ea service=registry version=v2.7.1
INFO[0022] response completed go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=3f7e45a6-53b2-46f0-85f8-198d9052bdc6 http.request.method=GET http.request.remoteaddr=»10.0.0.2:49695″ http.request.uri=»/v2/» http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.contenttype=»application/json; charset=utf-8″ http.response.duration=1.3286ms http.response.status=200 http.response.written=2
10.0.0.2 — — [13/Mar/2019:14:05:51 +0000] «GET /v2/ HTTP/1.1» 200 2 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
ERRO[0023] response completed with error err.code=»blob unknown» err.detail=sha256:d2dd05621072711d90e0ca1ae4bac0f201edcf4ed8c120d5e5d35d0de570c736 err.message=»blob unknown to registry» go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=f160a3a4-7043-427a-8677-edf7e3f66888 http.request.method=HEAD http.request.remoteaddr=»10.0.0.2:49698″ http.request.uri=»/v2/hello-world/blobs/sha256:d2dd05621072711d90e0ca1ae4bac0f201edcf4ed8c120d5e5d35d0de570c736″ http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.contenttype=»application/json; charset=utf-8″ http.response.duration=3.1626ms http.response.status=404 http.response.written=157 vars.digest=»sha256:d2dd05621072711d90e0ca1ae4bac0f201edcf4ed8c120d5e5d35d0de570c736″ vars.name=hello-world
10.0.0.2 — — [13/Mar/2019:14:05:51 +0000] «HEAD /v2/hello-world/blobs/sha256:d2dd05621072711d90e0ca1ae4bac0f201edcf4ed8c120d5e5d35d0de570c736 HTTP/1.1» 404 157 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
ERRO[0023] response completed with error err.code=»blob unknown» err.detail=sha256:bdcb489a87baede63d00535be023ca8ab2e4291d081e2d6cdd037d23cefbae89 err.message=»blob unknown to registry» go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=79a4c36a-2e21-4d5b-8ddb-09017f8ac030 http.request.method=HEAD http.request.remoteaddr=»10.0.0.2:49699″ http.request.uri=»/v2/hello-world/blobs/sha256:bdcb489a87baede63d00535be023ca8ab2e4291d081e2d6cdd037d23cefbae89″ http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.contenttype=»application/json; charset=utf-8″ http.response.duration=2.1262ms http.response.status=404 http.response.written=157 vars.digest=»sha256:bdcb489a87baede63d00535be023ca8ab2e4291d081e2d6cdd037d23cefbae89″ vars.name=hello-world
10.0.0.2 — — [13/Mar/2019:14:05:51 +0000] «HEAD /v2/hello-world/blobs/sha256:bdcb489a87baede63d00535be023ca8ab2e4291d081e2d6cdd037d23cefbae89 HTTP/1.1» 404 157 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
INFO[0023] response completed go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=a73d4dd4-d0a0-457f-ad21-9ff4fd722d29 http.request.method=POST http.request.remoteaddr=»10.0.0.2:49701″ http.request.uri=»/v2/hello-world/blobs/uploads/» http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.duration=107.7403ms http.response.status=202 http.response.written=0
10.0.0.2 — — [13/Mar/2019:14:05:52 +0000] «POST /v2/hello-world/blobs/uploads/ HTTP/1.1» 202 0 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
INFO[0023] response completed go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=3b405fd4-4cca-4a8d-9ffa-c08ee3f16399 http.request.method=POST http.request.remoteaddr=»10.0.0.2:49700″ http.request.uri=»/v2/hello-world/blobs/uploads/» http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.duration=132.6731ms http.response.status=202 http.response.written=0
10.0.0.2 — — [13/Mar/2019:14:05:51 +0000] «POST /v2/hello-world/blobs/uploads/ HTTP/1.1» 202 0 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
INFO[0023] response completed go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=c089075f-00e7-42f9-b2b2-61d3e43d0423 http.request.method=PATCH http.request.remoteaddr=»10.0.0.2:49704″ http.request.uri=»/v2/hello-world/blobs/uploads/ebd3d1f1-38b2-4d96-8f29-57b56662a45f?_state=5zXxtglENvUOxEAxHKC5kMZHEUhec7EsthL57wzkEhB7Ik5hbWUiOiJoZWxsby13b3JsZCIsIlVVSUQiOiJlYmQzZDFmMS0zOGIyLTRkOTYtOGYyOS01N2I1NjY2MmE0NWYiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMTktMDMtMTNUMTQ6MDU6NTIuMDAxNTExOFoifQ%3D%3D» http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.duration=87.1482ms http.response.status=202 http.response.written=0
10.0.0.2 — — [13/Mar/2019:14:05:52 +0000] «PATCH /v2/hello-world/blobs/uploads/ebd3d1f1-38b2-4d96-8f29-57b56662a45f?_state=5zXxtglENvUOxEAxHKC5kMZHEUhec7EsthL57wzkEhB7Ik5hbWUiOiJoZWxsby13b3JsZCIsIlVVSUQiOiJlYmQzZDFmMS0zOGIyLTRkOTYtOGYyOS01N2I1NjY2MmE0NWYiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMTktMDMtMTNUMTQ6MDU6NTIuMDAxNTExOFoifQ%3D%3D HTTP/1.1» 202 0 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
INFO[0023] response completed go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=eeb02b58-a0f3-45bf-958e-7a3970628a3a http.request.method=PATCH http.request.remoteaddr=»10.0.0.2:49703″ http.request.uri=»/v2/hello-world/blobs/uploads/bacf1302-cd28-46fd-8ae6-cd9473b0c63c?_state=hS1G5rgcI6OV-VPEZvHw7ZDSpU-1-k1zxRx3f12VGlZ7Ik5hbWUiOiJoZWxsby13b3JsZCIsIlVVSUQiOiJiYWNmMTMwMi1jZDI4LTQ2ZmQtOGFlNi1jZDk0NzNiMGM2M2MiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMTktMDMtMTNUMTQ6MDU6NTIuMDE0MDQ5OFoifQ%3D%3D» http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.duration=111.3323ms http.response.status=202 http.response.written=0
10.0.0.2 — — [13/Mar/2019:14:05:52 +0000] «PATCH /v2/hello-world/blobs/uploads/bacf1302-cd28-46fd-8ae6-cd9473b0c63c?_state=hS1G5rgcI6OV-VPEZvHw7ZDSpU-1-k1zxRx3f12VGlZ7Ik5hbWUiOiJoZWxsby13b3JsZCIsIlVVSUQiOiJiYWNmMTMwMi1jZDI4LTQ2ZmQtOGFlNi1jZDk0NzNiMGM2M2MiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMTktMDMtMTNUMTQ6MDU6NTIuMDE0MDQ5OFoifQ%3D%3D HTTP/1.1» 202 0 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
INFO[0023] response completed go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=96b945e7-97e5-43b3-9344-eccaac4f75f0 http.request.method=PUT http.request.remoteaddr=»10.0.0.2:49706″ http.request.uri=»/v2/hello-world/blobs/uploads/bacf1302-cd28-46fd-8ae6-cd9473b0c63c?_state=3cDeoFSdfi1eXd0_SrNuRJXN8u5uyUY-UG4oQbKImRt7Ik5hbWUiOiJoZWxsby13b3JsZCIsIlVVSUQiOiJiYWNmMTMwMi1jZDI4LTQ2ZmQtOGFlNi1jZDk0NzNiMGM2M2MiLCJPZmZzZXQiOjE2NTUsIlN0YXJ0ZWRBdCI6IjIwMTktMDMtMTNUMTQ6MDU6NTJaIn0%3D&digest=sha256%3Ad2dd05621072711d90e0ca1ae4bac0f201edcf4ed8c120d5e5d35d0de570c736″ http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.duration=374.032ms http.response.status=201 http.response.written=0
10.0.0.2 — — [13/Mar/2019:14:05:52 +0000] «PUT /v2/hello-world/blobs/uploads/bacf1302-cd28-46fd-8ae6-cd9473b0c63c?_state=3cDeoFSdfi1eXd0_SrNuRJXN8u5uyUY-UG4oQbKImRt7Ik5hbWUiOiJoZWxsby13b3JsZCIsIlVVSUQiOiJiYWNmMTMwMi1jZDI4LTQ2ZmQtOGFlNi1jZDk0NzNiMGM2M2MiLCJPZmZzZXQiOjE2NTUsIlN0YXJ0ZWRBdCI6IjIwMTktMDMtMTNUMTQ6MDU6NTJaIn0%3D&digest=sha256%3Ad2dd05621072711d90e0ca1ae4bac0f201edcf4ed8c120d5e5d35d0de570c736 HTTP/1.1» 201 0 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
INFO[0023] response completed go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=fe1ef99b-1092-4007-aaa8-e338a3fe6f43 http.request.method=PUT http.request.remoteaddr=»10.0.0.2:49705″ http.request.uri=»/v2/hello-world/blobs/uploads/ebd3d1f1-38b2-4d96-8f29-57b56662a45f?_state=3IRrXvgXWcoYXzap1fhNUBQNIEXeNB7YeBOE2alXzVF7Ik5hbWUiOiJoZWxsby13b3JsZCIsIlVVSUQiOiJlYmQzZDFmMS0zOGIyLTRkOTYtOGYyOS01N2I1NjY2MmE0NWYiLCJPZmZzZXQiOjkyNCwiU3RhcnRlZEF0IjoiMjAxOS0wMy0xM1QxNDowNTo1MloifQ%3D%3D&digest=sha256%3Abdcb489a87baede63d00535be023ca8ab2e4291d081e2d6cdd037d23cefbae89″ http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.duration=401.0992ms http.response.status=201 http.response.written=0
10.0.0.2 — — [13/Mar/2019:14:05:52 +0000] «PUT /v2/hello-world/blobs/uploads/ebd3d1f1-38b2-4d96-8f29-57b56662a45f?_state=3IRrXvgXWcoYXzap1fhNUBQNIEXeNB7YeBOE2alXzVF7Ik5hbWUiOiJoZWxsby13b3JsZCIsIlVVSUQiOiJlYmQzZDFmMS0zOGIyLTRkOTYtOGYyOS01N2I1NjY2MmE0NWYiLCJPZmZzZXQiOjkyNCwiU3RhcnRlZEF0IjoiMjAxOS0wMy0xM1QxNDowNTo1MloifQ%3D%3D&digest=sha256%3Abdcb489a87baede63d00535be023ca8ab2e4291d081e2d6cdd037d23cefbae89 HTTP/1.1» 201 0 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
INFO[0024] response completed go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=ca0623eb-b37e-4489-8354-73bfd7b08d72 http.request.method=HEAD http.request.remoteaddr=»10.0.0.2:49707″ http.request.uri=»/v2/hello-world/blobs/sha256:d2dd05621072711d90e0ca1ae4bac0f201edcf4ed8c120d5e5d35d0de570c736″ http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.contenttype=»application/octet-stream» http.response.duration=3.6585ms http.response.status=200 http.response.written=0
10.0.0.2 — — [13/Mar/2019:14:05:52 +0000] «HEAD /v2/hello-world/blobs/sha256:d2dd05621072711d90e0ca1ae4bac0f201edcf4ed8c120d5e5d35d0de570c736 HTTP/1.1» 200 0 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
INFO[0024] response completed go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=3a703d4c-3e97-4137-a86e-733c976db33f http.request.method=HEAD http.request.remoteaddr=»10.0.0.2:49708″ http.request.uri=»/v2/hello-world/blobs/sha256:bdcb489a87baede63d00535be023ca8ab2e4291d081e2d6cdd037d23cefbae89″ http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.contenttype=»application/octet-stream» http.response.duration=1.4183ms http.response.status=200 http.response.written=0
10.0.0.2 — — [13/Mar/2019:14:05:52 +0000] «HEAD /v2/hello-world/blobs/sha256:bdcb489a87baede63d00535be023ca8ab2e4291d081e2d6cdd037d23cefbae89 HTTP/1.1» 200 0 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
ERRO[0024] response completed with error err.code=»blob unknown» err.detail=sha256:eb68d2e2f59a9e5ea880ccc5715672ba5238c3f03d0ad596689564c675a986b4 err.message=»blob unknown to registry» go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=1da40815-757f-4050-b6b0-6897fb37d475 http.request.method=HEAD http.request.remoteaddr=»10.0.0.2:49710″ http.request.uri=»/v2/hello-world/blobs/sha256:eb68d2e2f59a9e5ea880ccc5715672ba5238c3f03d0ad596689564c675a986b4″ http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.contenttype=»application/json; charset=utf-8″ http.response.duration=19.452ms http.response.status=404 http.response.written=157 vars.digest=»sha256:eb68d2e2f59a9e5ea880ccc5715672ba5238c3f03d0ad596689564c675a986b4″ vars.name=hello-world
10.0.0.2 — — [13/Mar/2019:14:05:52 +0000] «HEAD /v2/hello-world/blobs/sha256:eb68d2e2f59a9e5ea880ccc5715672ba5238c3f03d0ad596689564c675a986b4 HTTP/1.1» 404 157 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
INFO[0024] response completed go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=22be23b5-e929-4fdd-ad52-727a6dafbf71 http.request.method=POST http.request.remoteaddr=»10.0.0.2:49711″ http.request.uri=»/v2/hello-world/blobs/uploads/» http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.duration=148.1601ms http.response.status=202 http.response.written=0
10.0.0.2 — — [13/Mar/2019:14:05:52 +0000] «POST /v2/hello-world/blobs/uploads/ HTTP/1.1» 202 0 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
INFO[0024] response completed go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=4070a50c-a1ac-4f02-bcca-9a0ac6cbfb5a http.request.method=PATCH http.request.remoteaddr=»10.0.0.2:49712″ http.request.uri=»/v2/hello-world/blobs/uploads/c8597299-fa71-4232-8536-f3f87d0d7190?_state=0Y58NYJuW_I_rdlkU19Y0PI5sBbZ8HRO53ShZKeCKTp7Ik5hbWUiOiJoZWxsby13b3JsZCIsIlVVSUQiOiJjODU5NzI5OS1mYTcxLTQyMzItODUzNi1mM2Y4N2QwZDcxOTAiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMTktMDMtMTNUMTQ6MDU6NTIuOTk3MjI4OFoifQ%3D%3D» http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.duration=145.3174ms http.response.status=202 http.response.written=0
10.0.0.2 — — [13/Mar/2019:14:05:53 +0000] «PATCH /v2/hello-world/blobs/uploads/c8597299-fa71-4232-8536-f3f87d0d7190?_state=0Y58NYJuW_I_rdlkU19Y0PI5sBbZ8HRO53ShZKeCKTp7Ik5hbWUiOiJoZWxsby13b3JsZCIsIlVVSUQiOiJjODU5NzI5OS1mYTcxLTQyMzItODUzNi1mM2Y4N2QwZDcxOTAiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMTktMDMtMTNUMTQ6MDU6NTIuOTk3MjI4OFoifQ%3D%3D HTTP/1.1» 202 0 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
INFO[0025] response completed go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=e44e753d-38d3-426c-992d-42e976cfa7f8 http.request.method=PUT http.request.remoteaddr=»10.0.0.2:49713″ http.request.uri=»/v2/hello-world/blobs/uploads/c8597299-fa71-4232-8536-f3f87d0d7190?_state=ymRwlR7joQYkZXGjGZCW64u9nzUqQnLv1GBddvczsFl7Ik5hbWUiOiJoZWxsby13b3JsZCIsIlVVSUQiOiJjODU5NzI5OS1mYTcxLTQyMzItODUzNi1mM2Y4N2QwZDcxOTAiLCJPZmZzZXQiOjE4ODUsIlN0YXJ0ZWRBdCI6IjIwMTktMDMtMTNUMTQ6MDU6NTJaIn0%3D&digest=sha256%3Aeb68d2e2f59a9e5ea880ccc5715672ba5238c3f03d0ad596689564c675a986b4″ http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.duration=826.3638ms http.response.status=201 http.response.written=0
10.0.0.2 — — [13/Mar/2019:14:05:53 +0000] «PUT /v2/hello-world/blobs/uploads/c8597299-fa71-4232-8536-f3f87d0d7190?_state=ymRwlR7joQYkZXGjGZCW64u9nzUqQnLv1GBddvczsFl7Ik5hbWUiOiJoZWxsby13b3JsZCIsIlVVSUQiOiJjODU5NzI5OS1mYTcxLTQyMzItODUzNi1mM2Y4N2QwZDcxOTAiLCJPZmZzZXQiOjE4ODUsIlN0YXJ0ZWRBdCI6IjIwMTktMDMtMTNUMTQ6MDU6NTJaIn0%3D&digest=sha256%3Aeb68d2e2f59a9e5ea880ccc5715672ba5238c3f03d0ad596689564c675a986b4 HTTP/1.1» 201 0 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
INFO[0025] response completed go.version=go1.11.2 http.request.host=»HOSTNAME:5000″ http.request.id=6b6a65e9-7b85-48f2-a014-daa3b162e2f9 http.request.method=HEAD http.request.remoteaddr=»10.0.0.2:49715″ http.request.uri=»/v2/hello-world/blobs/sha256:eb68d2e2f59a9e5ea880ccc5715672ba5238c3f03d0ad596689564c675a986b4″ http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.contenttype=»application/octet-stream» http.response.duration=1.7966ms http.response.status=200 http.response.written=0
10.0.0.2 — — [13/Mar/2019:14:05:54 +0000] «HEAD /v2/hello-world/blobs/sha256:eb68d2e2f59a9e5ea880ccc5715672ba5238c3f03d0ad596689564c675a986b4 HTTP/1.1» 200 0 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»
ERRO[0025] response completed with error err.code=unknown err.message=»unknown error» go.version=go1.11.2 http.request.contenttype=»application/vnd.docker.distribution.manifest.v2+json» http.request.host=»HOSTNAME:5000″ http.request.id=09c06ff1-dd51-48d0-9545-e7ca6a13a026 http.request.method=PUT http.request.remoteaddr=»10.0.0.2:49716″ http.request.uri=»/v2/hello-world/manifests/latest» http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.contenttype=»application/json; charset=utf-8″ http.response.duration=2.5447ms http.response.status=500 http.response.written=523 vars.name=hello-world vars.reference=latest
ERRO[0025] response completed with error err.code=unknown err.message=»invalid URL on layer» go.version=go1.11.2 http.request.contenttype=»application/vnd.docker.distribution.manifest.v2+json» http.request.host=»HOSTNAME:5000″ http.request.id=09c06ff1-dd51-48d0-9545-e7ca6a13a026 http.request.method=PUT http.request.remoteaddr=»10.0.0.2:49716″ http.request.uri=»/v2/hello-world/manifests/latest» http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.contenttype=»application/json; charset=utf-8″ http.response.duration=3.2014ms http.response.status=500 http.response.written=523 vars.name=hello-world vars.reference=latest
ERRO[0025] response completed with error err.code=»manifest blob unknown» err.detail=sha256:e46172273a4e4384e1eec7fb01091c828a256ea0f87b30f61381fba9bc511371 err.message=»blob unknown to registry» go.version=go1.11.2 http.request.contenttype=»application/vnd.docker.distribution.manifest.v2+json» http.request.host=»HOSTNAME:5000″ http.request.id=09c06ff1-dd51-48d0-9545-e7ca6a13a026 http.request.method=PUT http.request.remoteaddr=»10.0.0.2:49716″ http.request.uri=»/v2/hello-world/manifests/latest» http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.contenttype=»application/json; charset=utf-8″ http.response.duration=3.263ms http.response.status=500 http.response.written=523 vars.name=hello-world vars.reference=latest
ERRO[0025] response completed with error err.code=unknown err.message=»unknown error» go.version=go1.11.2 http.request.contenttype=»application/vnd.docker.distribution.manifest.v2+json» http.request.host=»HOSTNAME:5000″ http.request.id=09c06ff1-dd51-48d0-9545-e7ca6a13a026 http.request.method=PUT http.request.remoteaddr=»10.0.0.2:49716″ http.request.uri=»/v2/hello-world/manifests/latest» http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.contenttype=»application/json; charset=utf-8″ http.response.duration=3.314ms http.response.status=500 http.response.written=523 vars.name=hello-world vars.reference=latest
ERRO[0025] response completed with error err.code=unknown err.message=»invalid URL on layer» go.version=go1.11.2 http.request.contenttype=»application/vnd.docker.distribution.manifest.v2+json» http.request.host=»HOSTNAME:5000″ http.request.id=09c06ff1-dd51-48d0-9545-e7ca6a13a026 http.request.method=PUT http.request.remoteaddr=»10.0.0.2:49716″ http.request.uri=»/v2/hello-world/manifests/latest» http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.contenttype=»application/json; charset=utf-8″ http.response.duration=3.5069ms http.response.status=500 http.response.written=523 vars.name=hello-world vars.reference=latest
ERRO[0025] response completed with error err.code=»manifest blob unknown» err.detail=sha256:f493dc3e1d73855439ead197cc94d3bdac81372c5cb171f12b1f29ba58cdc9d9 err.message=»blob unknown to registry» go.version=go1.11.2 http.request.contenttype=»application/vnd.docker.distribution.manifest.v2+json» http.request.host=»HOSTNAME:5000″ http.request.id=09c06ff1-dd51-48d0-9545-e7ca6a13a026 http.request.method=PUT http.request.remoteaddr=»10.0.0.2:49716″ http.request.uri=»/v2/hello-world/manifests/latest» http.request.useragent=»docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))» http.response.contenttype=»application/json; charset=utf-8″ http.response.duration=3.5566ms http.response.status=500 http.response.written=523 vars.name=hello-world vars.reference=latest
10.0.0.2 — — [13/Mar/2019:14:05:54 +0000] «PUT /v2/hello-world/manifests/latest HTTP/1.1» 500 523 «» «docker/18.09.2 go/go1.10.6 git-commit/6247962 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.2 (windows))»

The text was updated successfully, but these errors were encountered:

Источник

Skip to content



Open


Issue created Dec 02, 2021 by Tim Rizzi@trizziDeveloper

Dependency Proxy fails with HTTP 500 since v 14.5.0

Summary

Since upgrading to version 14.5.0 (from 14.4.2) our pipelines using the dependency proxy are failing with 500 errors. Pulling of docker containers through the dependency proxy does not work, the only possible workaround would be to replace all dependency-proxy usage in the gitlab-ci.yml, but this would be enormous in my company. Also the pull-rate limit would be reached within an hour or so. So actually we are not able to run our pipelines.

A little excerpt from a job:

Using Docker executor with image <on-premise-gitlab>:5050/scrum-webservices/resources/custom-maven-openjdk:java11 ...
Starting service <on-premise-gitlab>/scrum-webservices/dependency_proxy/containers/postgres:9.6 ...
Authenticating with credentials from job payload (GitLab Registry)
Pulling docker image <on-premise-gitlab>:443/scrum-webservices/dependency_proxy/containers/postgres:9.6 ...
WARNING: Failed to pull image with policy "if-not-present": Error response from daemon: received unexpected HTTP status: 500 Internal Server Error (manager.go:203:3s)
ERROR: Job failed: failed to pull image "<on-premise-gitlab>:443/scrum-webservices/dependency_proxy/containers/postgres:9.6" with specified policies [if-not-present]: Error response from daemon: received unexpected HTTP status: 500 Internal Server Error (manager.go:203:3s)

So obviously the pull from the gitlab docker-registry works. only the dependency proxy won’t.
What I also found out is that the built-in templates like for terraform is not working for me anymore. I included the Terraform.latest.gitlab-ci.yml and extended these jobs. Now the pipeline will not even start and says:

Found errors in your .gitlab-ci.yml:  
init: unknown keys in 'extends' (.terraform:init)

Well, the «keys» are

extends:
    - .terraform:init

Steps to reproduce

start a pipeline which uses ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/ in docker-image

Example Project

What is the current bug behavior?

this is the current job-output:

Using Docker executor with image <on-premise-gitlab>:5050/scrum-webservices/resources/custom-maven-openjdk:java11 ...
Starting service <on-premise-gitlab>/scrum-webservices/dependency_proxy/containers/postgres:9.6 ...
Authenticating with credentials from job payload (GitLab Registry)
Pulling docker image <on-premise-gitlab>:443/scrum-webservices/dependency_proxy/containers/postgres:9.6 ...
WARNING: Failed to pull image with policy "if-not-present": Error response from daemon: received unexpected HTTP status: 500 Internal Server Error (manager.go:203:3s)
ERROR: Job failed: failed to pull image "<on-premise-gitlab>:443/scrum-webservices/dependency_proxy/containers/postgres:9.6" with specified policies [if-not-present]: Error response from daemon: received unexpected HTTP status: 500 Internal Server Error (manager.go:203:3s)

What is the expected correct behavior?

docker image would be pulled through gitlabs dependency proxy, image will be stored

Relevant logs and/or screenshots

which logfiles would be relevant?
Dependency proxy has currently images stored:
image

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: Debian 10 Proxy: http_proxy: http://internal-proxy:3128 https_proxy: http://internal-proxy:3128 NO_PROXY: internal-domain.privatelink.germanywestcentral.azmk8s.io,internal-domain,internal-domain,internal-domain no_proxy: internal-domain.privatelink.germanywestcentral.azmk8s.io,internal-domain,internal-domain,internal-domain Current User: git Using RVM: no Ruby Version: 2.7.4p191 Gem Version: 3.1.4 Bundler Version:2.1.4 Rake Version: 13.0.6 Redis Version: 6.0.16 Git Version: 2.33.1. Sidekiq Version:6.2.2 Go Version: unknown

GitLab information Version: 14.5.1-ee Revision: cd2049cb Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 12.7 URL: https://internal-domain HTTP Clone URL: https://internal-domain/some-group/some-project.git SSH Clone URL: git@internal-domain:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers:

GitLab Shell Version: 13.22.1 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check

Edited Dec 03, 2021 by Tim Rizzi

Summary

I have self-hosted gitlab, installed with apt. I don’t have git_data_dir in default location (see config). I can’t push docker image into docker registry, directory <shared_path>/registry does not exists. No migrations, no backup/restore procedure, last version.

Problem to solve

GitLab reject Docker image push from remote location with error 500. I’m not able to push image into my private docker registry. Have anyone idea why and how to solve it?

Pushing image from remote device

root@remote:cat Dockerfile
FROM alpine

root@remote:~/playground# docker login gitlab.mydomain.com:5050
Authenticating with existing credentials...
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
root@remote:~/playground# docker build -t gitlab.mydomain.com:5050/testing/registry .
Sending build context to Docker daemon  2.048kB
Step 1/1 : FROM alpine
 ---> e7d92cdc71fe
Successfully built e7d92cdc71fe
Successfully tagged gitlab.mydomain.com:5050/testing/registry:latest
root@remote:~/playground# docker push gitlab.mydomain.com:5050/testing/registry
The push refers to repository [gitlab.mydomain.com:5050/testing/registry]
5216338b40a7: Retrying in 1 second
received unexpected HTTP status: 500 Internal Server Error

Gitlab registry log

repo:/# tail /var/log/gitlab/registry/current
2020-01-21_13:46:16.49320 time="2020-01-21T14:46:16.493118369+01:00" level=warning msg="error authorizing context: authorization token required" go.version=go1.12.13 http.request.host="gitlab.mydomain.com:5050" http.request.id=fbe88f1e-ccf5-4fcd-8f3a-aa03d216388a http.request.method=GET http.request.remoteaddr=8.8.8.8 http.request.uri="/v2/" http.request.useragent="docker/19.03.5 go/go1.12.12 git-commit/633a0ea838 kernel/4.19.0-6-amd64 os/linux arch/amd64 UpstreamClient(Docker-Client/19.03.5 (linux))"
2020-01-21_13:46:16.49351 127.0.0.1 - - [21/Jan/2020:14:46:16 +0100] "GET /v2/ HTTP/1.1" 401 87 "" "docker/19.03.5 go/go1.12.12 git-commit/633a0ea838 kernel/4.19.0-6-amd64 os/linux arch/amd64 UpstreamClient(Docker-Client/19.03.5 \(linux\))"
2020-01-21_13:46:17.10631 time="2020-01-21T14:46:17.10627187+01:00" level=info msg="authorized request" go.version=go1.12.13 http.request.host="gitlab.mydomain.com:5050" http.request.id=7cc76f13-b5f3-4f4d-9309-d338b9c5c8b5 http.request.method=HEAD http.request.remoteaddr=8.8.8.8 http.request.uri="/v2/testing/registry/blobs/sha256:c9b1b535fdd91a9855fb7f82348177e5f019329a58c53c47272962dd60f71fc9" http.request.useragent="docker/19.03.5 go/go1.12.12 git-commit/633a0ea838 kernel/4.19.0-6-amd64 os/linux arch/amd64 UpstreamClient(Docker-Client/19.03.5 (linux))" vars.digest="sha256:c9b1b535fdd91a9855fb7f82348177e5f019329a58c53c47272962dd60f71fc9" vars.name="testing/registry"
2020-01-21_13:46:17.10687 time="2020-01-21T14:46:17.106817596+01:00" level=error msg="response completed with error" auth.user.name=myname err.code=unknown err.detail="filesystem: open /mnt/data/git-data/gitlab-rails/shared/registry/docker/registry/v2/repositories/testing/registry/_layers/sha256/c9b1b535fdd91a9855fb7f82348177e5f019329a58c53c47272962dd60f71fc9/link: permission denied" err.message="unknown error" go.version=go1.12.13 http.request.host="gitlab.mydomain.com:5050" http.request.id=7cc76f13-b5f3-4f4d-9309-d338b9c5c8b5 http.request.method=HEAD http.request.remoteaddr=8.8.8.8 http.request.uri="/v2/testing/registry/blobs/sha256:c9b1b535fdd91a9855fb7f82348177e5f019329a58c53c47272962dd60f71fc9" http.request.useragent="docker/19.03.5 go/go1.12.12 git-commit/633a0ea838 kernel/4.19.0-6-amd64 os/linux arch/amd64 UpstreamClient(Docker-Client/19.03.5 (linux))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=2.192904ms http.response.status=500 http.response.written=320 vars.digest="sha256:c9b1b535fdd91a9855fb7f82348177e5f019329a58c53c47272962dd60f71fc9" vars.name="testing/registry"
2020-01-21_13:46:17.10702 127.0.0.1 - - [21/Jan/2020:14:46:17 +0100] "HEAD /v2/testing/registry/blobs/sha256:c9b1b535fdd91a9855fb7f82348177e5f019329a58c53c47272962dd60f71fc9 HTTP/1.1" 500 320 "" "docker/19.03.5 go/go1.12.12 git-commit/633a0ea838 kernel/4.19.0-6-amd64 os/linux arch/amd64 UpstreamClient(Docker-Client/19.03.5 \(linux\))"
2020-01-21_13:46:17.16482 time="2020-01-21T14:46:17.164783711+01:00" level=info msg="authorized request" go.version=go1.12.13 http.request.host="gitlab.mydomain.com:5050" http.request.id=e3e752c1-442a-46b1-b7c4-3f997e6e97a6 http.request.method=POST http.request.remoteaddr=8.8.8.8 http.request.uri="/v2/testing/registry/blobs/uploads/" http.request.useragent="docker/19.03.5 go/go1.12.12 git-commit/633a0ea838 kernel/4.19.0-6-amd64 os/linux arch/amd64 UpstreamClient(Docker-Client/19.03.5 (linux))" vars.name="testing/registry"
2020-01-21_13:46:17.16537 time="2020-01-21T14:46:17.165324403+01:00" level=error msg="response completed with error" auth.user.name=myname err.code=unknown err.detail="filesystem: mkdir /mnt/data/git-data/gitlab-rails: permission denied" err.message="unknown error" go.version=go1.12.13 http.request.host="gitlab.mydomain.com:5050" http.request.id=e3e752c1-442a-46b1-b7c4-3f997e6e97a6 http.request.method=POST http.request.remoteaddr=8.8.8.8 http.request.uri="/v2/testing/registry/blobs/uploads/" http.request.useragent="docker/19.03.5 go/go1.12.12 git-commit/633a0ea838 kernel/4.19.0-6-amd64 os/linux arch/amd64 UpstreamClient(Docker-Client/19.03.5 (linux))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=2.673484ms http.response.status=500 http.response.written=171 vars.name="testing/registry"
2020-01-21_13:46:17.16554 127.0.0.1 - - [21/Jan/2020:14:46:17 +0100] "POST /v2/testing/registry/blobs/uploads/ HTTP/1.1" 500 171 "" "docker/19.03.5 go/go1.12.12 git-commit/633a0ea838 kernel/4.19.0-6-amd64 os/linux arch/amd64 UpstreamClient(Docker-Client/19.03.5 \(linux\))"

Biggest problem (if I understand it right) is:

filesystem: open /mnt/data/git-data/gitlab-rails/shared/registry/docker/registry/v2/repositories/testing/registry/_layers/sha256/c9b1b535fdd91a9855fb7f82348177e5f019329a58c53c47272962dd60f71fc9/link: permission denied
filesystem: mkdir /mnt/data/git-data/gitlab-rails: permission denied

Directory content

There is no registry dir on path

repo:/# ll /mnt/data/git-data/gitlab-rails/shared/
total 40
drwxr-x--x  10 git  gitlab-www 4096 Jan 21 14:11 .
drwxr-xr-x   3 root root       4096 Sep 24  2018 ..
drwx------  11 git  root       4096 Dec 10 08:21 artifacts
drwx------   3 git  root       4096 Oct 24  2018 cache
drwx------   2 git  root       4096 Jul 30 10:36 dependency_proxy
drwx------   2 git  root       4096 Jul 30 10:36 external-diffs
drwx------ 259 git  root       4096 Oct 25  2018 lfs-objects
drwx------   2 git  root       4096 Dec  3  2018 packages
drwxr-x---   9 git  gitlab-www 4096 Dec 10 09:12 pages
drwx------   3 git  root       4096 Sep 24  2018 tmp

Gitlab config

root@repo:gitlab-ctl show-config

Starting Chef Client, version 14.13.11
resolving cookbooks for run list: ["gitlab::show_config"]
Synchronizing Cookbooks:
  - redis (0.1.0)
  - registry (0.1.0)
  - gitaly (0.1.0)
  - letsencrypt (0.1.0)
  - gitlab (0.0.1)
  - runit (4.3.0)
  - crond (0.1.0)
  - package (0.1.0)
  - postgresql (0.1.0)
  - consul (0.1.0)
  - nginx (0.1.0)
  - mattermost (0.1.0)
  - acme (4.0.0)
  - praefect (0.1.0)
  - monitoring (0.1.0)
Installing Cookbook Gems:
Compiling Cookbooks...

{
  "gitlab": {
    "gitlab-shell": {
      "secret_token": "<some_hash>",
      "auth_file": "/var/opt/gitlab/.ssh/authorized_keys"
    },
    "gitlab-rails": {
      "lfs_enabled": true,
      "lfs_storage_path": "/mnt/data/git-data/gitlab-rails/shared/lfs-objects",
      "backup_path": "/mnt/data/gitlab-backup/",
      "backup_keep_time": 604800,
      "shared_path": "/mnt/data/git-data/gitlab-rails/shared",
      "secret_key_base": "<some_hash>",
      "db_key_base": "<some_hash>",
      "otp_key_base": "<some_hash>",
      "openid_connect_signing_key": "-----BEGIN RSA PRIVATE KEY-----n<some_hash>n-----END RSA PRIVATE KEY-----n",
      "gitlab_host": "gitlab.mydomain.com",
      "gitlab_email_from": "gitlab@gitlab.mydomain.com",
      "gitlab_https": true,
      "gitlab_port": 443,
      "artifacts_path": "/mnt/data/git-data/gitlab-rails/shared/artifacts",
      "external_diffs_storage_path": "/mnt/data/git-data/gitlab-rails/shared/external-diffs",
      "uploads_storage_path": "/opt/gitlab/embedded/service/gitlab-rails/public",
      "packages_storage_path": "/mnt/data/git-data/gitlab-rails/shared/packages",
      "dependency_proxy_storage_path": "/mnt/data/git-data/gitlab-rails/shared/dependency_proxy",
      "pages_path": "/mnt/data/git-data/gitlab-rails/shared/pages",
      "repositories_storages": {
        "default": {
          "path": "/mnt/data/git-data/repositories",
          "gitaly_address": "unix:/var/opt/gitlab/gitaly/gitaly.socket"
        }
      },
      "trusted_proxies": [

      ],
      "db_username": "gitlab",
      "db_host": null,
      "db_port": 5432
    },
    "gitlab-workhorse": {
      "secret_token": "<some_hash>",
      "auth_socket": "/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket"
    },
    "logging": {

    },
    "unicorn": {

    },
    "puma": {

    },
    "mailroom": {

    },
    "gitlab-pages": {
      "gitlab_secret": null,
      "gitlab_id": null,
      "auth_secret": "<some_hash>",
      "api_secret_key": "<some_hash>"
    },
    "external-url": "https://gitlab.mydomain.com",
    "registry-external-url": null,
    "mattermost-external-url": null,
    "pages-external-url": null,
    "runtime-dir": "/run",
    "git-data-dir": null,
    "bootstrap": {

    },
    "omnibus-gitconfig": {

    },
    "manage-accounts": {

    },
    "manage-storage-directories": {

    },
    "user": {
      "home": "/var/opt/gitlab",
      "git_user_email": "gitlab@gitlab.mydomain.com"
    },
    "gitlab-ci": {

    },
    "sidekiq": {

    },
    "mattermost-nginx": {
      "listen_port": null
    },
    "pages-nginx": {
      "listen_port": null
    },
    "registry-nginx": {

    },
    "remote-syslog": {

    },
    "logrotate": {

    },
    "high-availability": {

    },
    "web-server": {

    },
    "prometheus-monitoring": {

    },
    "pgbouncer": {

    },
    "pgbouncer-exporter": {

    },
    "storage-check": {
      "target": "unix:///var/opt/gitlab/gitlab-rails/sockets/gitlab.socket"
    },
    "nginx": {
      "redirect_http_to_https": true,
      "ssl_certificate": "/etc/gitlab/ssl/gitlab.mydomain.com.crt",
      "ssl_certificate_key": "/etc/gitlab/ssl/gitlab.mydomain.com.key",
      "proxy_set_headers": {
        "Host": "$http_host_with_default",
        "X-Real-IP": "$remote_addr",
        "X-Forwarded-For": "$proxy_add_x_forwarded_for",
        "Upgrade": "$http_upgrade",
        "Connection": "$connection_upgrade",
        "X-Forwarded-Proto": "https",
        "X-Forwarded-Ssl": "on"
      },
      "real_ip_trusted_addresses": [

      ],
      "listen_port": 443
    }
  },
  "roles": {
    "application": {

    },
    "redis-sentinel": {

    },
    "redis-master": {

    },
    "redis-slave": {

    },
    "geo-primary": {

    },
    "geo-secondary": {

    },
    "monitoring": {

    },
    "postgres": {

    },
    "pgbouncer": {

    },
    "consul": {

    }
  },
  "monitoring": {
    "prometheus": {
      "alertmanagers": [

      ],
      "flags": {
        "web.listen-address": "localhost:9090",
        "storage.tsdb.path": "/var/opt/gitlab/prometheus/data",
        "config.file": "/var/opt/gitlab/prometheus/prometheus.yml"
      }
    },
    "grafana": {
      "secret_key": "7dfc8ff446078cdabd489b77ec25fa37",
      "gitlab_secret": "<some_hash>",
      "gitlab_application_id": "<some_hash>",
      "admin_password": "<some_hash>",
      "metrics_basic_auth_password": null,
      "datasources": [
        {
          "name": "GitLab Omnibus",
          "type": "prometheus",
          "access": "proxy",
          "url": "http://localhost:9090",
          "isDefault": true
        }
      ]
    },
    "alertmanager": {
      "flags": {
        "web.listen-address": "localhost:9093",
        "storage.path": "/var/opt/gitlab/alertmanager/data",
        "config.file": "/var/opt/gitlab/alertmanager/alertmanager.yml"
      }
    },
    "node-exporter": {
      "flags": {
        "web.listen-address": "localhost:9100",
        "collector.mountstats": true,
        "collector.runit": true,
        "collector.runit.servicedir": "/opt/gitlab/sv",
        "collector.textfile.directory": "/var/opt/gitlab/node-exporter/textfile_collector"
      }
    },
    "redis-exporter": {
      "flags": {
        "web.listen-address": "localhost:9121",
        "redis.addr": "unix:///var/opt/gitlab/redis/redis.socket"
      }
    },
    "postgres-exporter": {
      "flags": {
        "web.listen-address": "localhost:9187",
        "extend.query-path": "/var/opt/gitlab/postgres-exporter/queries.yaml"
      }
    },
    "gitlab-exporter": {
      "probe_sidekiq": true
    },
    "gitlab-monitor": {

    }
  },
  "letsencrypt": {
    "auto_enabled": false,
    "enable": false
  },
  "package": {

  },
  "registry": {
    "health_storagedriver_enabled": false,
    "http_secret": "<some_hash>",
    "internal_certificate": "-----BEGIN CERTIFICATE-----<some_hash>n-----END CERTIFICATE-----n",
    "internal_key": "-----BEGIN RSA PRIVATE KEY-----n<some_hash>n-----END RSA PRIVATE KEY-----n"
  },
  "redis": {
    "rename_commands": {
      "KEYS": ""
    }
  },
  "postgresql": {
    "internal_certificate": "-----BEGIN CERTIFICATE-----n<some_hash>n-----END CERTIFICATE-----n",
    "internal_key": "-----BEGIN RSA PRIVATE KEY-----n<some_hash>n-----END RSA PRIVATE KEY-----n"
  },
  "repmgr": {

  },
  "repmgrd": {

  },
  "consul": {

  },
  "gitaly": {
    "storage": [
      {
        "name": "default",
        "path": "/mnt/data/git-data/repositories"
      }
    ]
  },
  "praefect": {

  },
  "crond": {

  },
  "mattermost": {
    "email_invite_salt": "<some_hash>",
    "file_public_link_salt": "<some_hash>",
    "sql_at_rest_encrypt_key": "<some_hash>",
    "sql_data_source": "user=gitlab_mattermost host=/var/opt/gitlab/postgresql port=5432 dbname=mattermost_production"
  }
}

Converging 0 resources

Running handlers:
Running handlers complete
Chef Client finished, 0/0 resources updated in 06 seconds

GitLab environment info

repo:/# gitlab-rake gitlab:env:info

System information
System:         Debian 8.11
Proxy:          no
Current User:   git
Using RVM:      no
Ruby Version:   2.6.3p62
Gem Version:    2.7.9
Bundler Version:1.17.3
Rake Version:   12.3.3
Redis Version:  3.2.12
Git Version:    2.24.1
Sidekiq Version:5.2.7
Go Version:     unknown

GitLab information
Version:        12.6.4-ee
Revision:       cc6b787e7b0
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     PostgreSQL
DB Version:     10.9
URL:            https://gitlab.mydomain.com
HTTP Clone URL: https://gitlab.mydomain.com/some-group/some-project.git
SSH Clone URL:  git@gitlab.mydomain.com:some-group/some-project.git
Elasticsearch:  no
Geo:            no
Using LDAP:     no
Using Omniauth: yes
Omniauth Providers:

GitLab Shell
Version:        10.3.0
Repository storage paths:
 - default:      /mnt/data/git-data/repositories
GitLab Shell path:              /opt/gitlab/embedded/service/gitlab-shell
Git:            /opt/gitlab/embedded/bin/git

Skip to navigation
Skip to main content

Red Hat Customer Portal

Infrastructure and Management

  • Red Hat Enterprise Linux

  • Red Hat Virtualization

  • Red Hat Identity Management

  • Red Hat Directory Server

  • Red Hat Certificate System

  • Red Hat Satellite

  • Red Hat Subscription Management

  • Red Hat Update Infrastructure

  • Red Hat Insights

  • Red Hat Ansible Automation Platform

Cloud Computing

  • Red Hat OpenShift

  • Red Hat CloudForms

  • Red Hat OpenStack Platform

  • Red Hat OpenShift Container Platform

  • Red Hat OpenShift Data Science

  • Red Hat OpenShift Online

  • Red Hat OpenShift Dedicated

  • Red Hat Advanced Cluster Security for Kubernetes

  • Red Hat Advanced Cluster Management for Kubernetes

  • Red Hat Quay

  • OpenShift Dev Spaces

  • Red Hat OpenShift Service on AWS

Storage

  • Red Hat Gluster Storage

  • Red Hat Hyperconverged Infrastructure

  • Red Hat Ceph Storage

  • Red Hat OpenShift Data Foundation

Runtimes

  • Red Hat Runtimes

  • Red Hat JBoss Enterprise Application Platform

  • Red Hat Data Grid

  • Red Hat JBoss Web Server

  • Red Hat Single Sign On

  • Red Hat support for Spring Boot

  • Red Hat build of Node.js

  • Red Hat build of Thorntail

  • Red Hat build of Eclipse Vert.x

  • Red Hat build of OpenJDK

  • Red Hat build of Quarkus

Integration and Automation

  • Red Hat Process Automation

  • Red Hat Process Automation Manager

  • Red Hat Decision Manager

All Products

Issue

These errors are being spotted while uploading an image to the internal registry:

$ podman login -u xxx -p $(oc whoami -t) default-route-openshift-image-registry.apps.xxx.yyy.zzz
Login Succeeded!

$ podman push default-route-openshift-image-registry.apps.xxx.yyy.zzz/project/pod:1.0.1
Getting image source signatures
Copying blob d27d00a62b62 done
Copying blob faf7c252da57 done
Error: Error copying image to the remote destination: Error writing blob: Error initiating layer upload to /v2/clustervalidation/traefik/blobs/uploads/ in default-route-openshift-image-registry.apps.osd01.atradiusnet.com: received unexpected HTTP status: 500 Internal Server Error

After reviewing the registry logs with oc logs <registry_pod_name> this message is found:

level=error msg="error putting into main store: filesystem: mkdir /registry/docker: permission denied" go.version=go1.10.8 http.request.host="image-registry.openshift-image-registry.svc:5000" http.request.id=195989d2-002c-4881-99d6-7d50c84864d8 http.request.method=GET http.request.remoteaddr="10.128.8.69:59728" http.request.uri="/v2/openshift/httpd/manifests/sha256:e67868a558cfe45441e1c326de6d67596fc61b65aa183066fbadfe53c20fb415" http.request.useragent=Go-http-client/1.1 openshift.auth.user="system:serviceaccount:clustervalidation:builder"

Environment

  • OCP 4
  • vSphere UPI Installation
  • A NFS share for the registry

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

Понравилась статья? Поделить с друзьями:
  • Received error when trying to advertise server on master server response was not valid json
  • Redis error moved
  • Received error from kdc 1765328360 preauthentication failed
  • Receipt is already open эвотор ошибка
  • Recaptcha validate error перевод