5

I am configuring docker registry on nexus 3 configuration. I Am running nexus behind apache and has https enabled.

On command line, when I do a docker search, I get the below error:

docker search my.nexus.net/ubantu

Error response from daemon: Unexpected status code 404

Here is the daemon log on debug mode:

DEBU[7519] Calling GET /images/search 
INFO[7519] GET /v1.19/images/search?term=my.nexus.net%2Fubantu 
DEBU[7519] pinging registry endpoint https://my.nexus.net/v0/
DEBU[7519] attempting v2 ping for registry endpoint https://my.nexus.net/v2/
DEBU[7519] hostDir: /etc/docker/certs.d/my.nexus.net
DEBU[7519] attempting v1 ping for registry endpoint https://my.nexus.net/v1/
DEBU[7519] hostDir: /etc/docker/certs.d/my.nexus.net
DEBU[7519] Error unmarshalling the _ping RegistryInfo: invalid character '<' looking for beginning of value
DEBU[7519] RegistryInfo.Version: ""
DEBU[7519] Registry standalone header: ''
DEBU[7519] RegistryInfo.Standalone: true
DEBU[7519] attempting v1 ping for registry endpoint https://my.nexus.net/v1/
DEBU[7519] hostDir: /etc/docker/certs.d/my.nexus.net
DEBU[7519] Error unmarshalling the _ping RegistryInfo: invalid character '<' looking for beginning of value
DEBU[7519] RegistryInfo.Version: ""
DEBU[7519] Registry standalone header: ''
DEBU[7519] RegistryInfo.Standalone: true
DEBU[7519] Endpoint https://my.nexus.net/v1/ is eligible for private registry. Enabling decorator.
DEBU[7519] Index server: https://my.nexus.net/v1/
DEBU[7519] hostDir: /etc/docker/certs.d/my.nexus.net
ERRO[7519] Handler for GET /images/search returned error: Unexpected status code 404
ERRO[7519] HTTP Error                                    err=Unexpected status code 404 statusCode=500

If any one has any idea on it, please let me know.

veben
  • 19,637
  • 14
  • 60
  • 80
stara
  • 153
  • 1
  • 2
  • 10
  • 1
    Same issue, docker pull works fine, but in push operations nexus log show DEBUG [qtp1022076555-115] admin org.sonatype.nexus.repository.httpbridge.internal.DefaultHttpResponseSender - Sending response: Response{status=Status{successful=false, code=404, message='null'}, payload=null} – Hugo Robayo Nov 17 '16 at 21:53

5 Answers5

3

From the logs it seems you try pining different versions of the registry endpoint. Did you use v1Enabled:falseoption on the repository configuration? It seems to get an error during v1 ping but still uses that endpoint. It's rather strange & unexpected behaviour.

enter image description here

Markus
  • 1,887
  • 18
  • 23
  • where is this option? I'm using docker version 19.03.12 and can't find this setting. – nima Sep 23 '20 at 11:02
  • 1
    Login to Nexus as Admin. Click on Repositories -> select a Docker repository and scroll down a bit. :) – Markus Apr 02 '21 at 14:54
1

I had the same problem. After googling, it looks like 'docker search' uses the V1 API: see Issue https://github.com/docker/distribution/issues/206
So after I have enabled the V1 API on all docker registries of the group corresponding with the port, it works perfectly.

double-X
  • 11
  • 1
1

The docker search command use a v1 API. You have 2 alternatives :

  1. Enable v1 API before using docker search
  2. Use a curl like that: curl -X GET localhost:5000/v2/_catalog
veben
  • 19,637
  • 14
  • 60
  • 80
0

To do pretty much anything in docker using NXRM3, you need to specify the port you are searching so the repository manager knows what repository you are looking for. If you just specify the root port (or in your case, looks like no port), NXRM3 has no idea which you are looking at.

So if your group is setup to use HTTPS connector 18075 try "docker search my.nexus.net:18075/ubantu"

Reference: http://books.sonatype.com/nexus-book/reference3/docker.html#docker-search

joedragons
  • 2,505
  • 21
  • 21
0

I used a VPN and it worked. Not psiphon.

Darwin
  • 1,695
  • 1
  • 19
  • 29