docker search : Error response from daemon: Unexpected status code 401 (solved)

created at 11-09-2021 views: 1

1. Problem description:

When trying to query the image through docker, a 401 was reported (probably no permission and no authentication)

# 10018318 @ Mrli in ~ [10:57:19]
$ docker search elasticsearch
Error response from daemon: Unexpected status code 401

After some searching, I located an article describing a similar problem:

https://forums.docker.com/t/error-response-from-daemon-unexpected-status-code-401/117194

It probably means that you are currently logged in, and when you try to search, there is a prompt that there is no authentication.

2. Solution

1. Execute the exit command

# 10018318 @ Mrli in ~ [10:57:34] C:1
$ docker logout
Removing login credentials for https://index.docker.io/v1/

2. After executing the previous search command, the search is successful

# 10018318 @ Mrli in ~ [11:04:05]
$ docker search elasticsearch
NAME                                         DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
elasticsearch                                Elasticsearch is a powerful open source sear…   5303      [OK]
nshou/elasticsearch-kibana                   Elasticsearch-7.15.1 Kibana-7.15.1              132                  [OK]
mobz/elasticsearch-head                      elasticsearch-head front-end and standalone …   81
elastichq/elasticsearch-hq                   Official Docker image for ElasticHQ: Elastic…   77                   [OK]
itzg/elasticsearch                           Provides an easily configurable Elasticsearc…   71                   [OK]
elastic/elasticsearch                        The Elasticsearch Docker image maintained by…   56
taskrabbit/elasticsearch-dump                Import and export tools for elasticsearch       27                   [OK]
lmenezes/elasticsearch-kopf                  elasticsearch kopf                              18                   [OK]
barnybug/elasticsearch                       Latest Elasticsearch 1.7.2 and previous rele…   17                   [OK]
justwatch/elasticsearch_exporter             Elasticsearch stats exporter for Prometheus     17
blacktop/elasticsearch                       Alpine Linux based Elasticsearch Docker Image   16                   [OK]
esystemstech/elasticsearch                   Debian based Elasticsearch packing for Lifer…   15
monsantoco/elasticsearch                     ElasticSearch Docker image                      11                   [OK]
mesoscloud/elasticsearch                     [UNMAINTAINED] Elasticsearch                    9                    [OK]
centerforopenscience/elasticsearch           Elasticsearch                                   4                    [OK]
dtagdevsec/elasticsearch                     elasticsearch                                   4                    [OK]
barchart/elasticsearch-aws                   Elasticsearch AWS node                          3
thingswise/elasticsearch                     Elasticsearch + etcd2 peer discovery            1                    [OK]
axway/elasticsearch-docker-beat              "Beat" extension to read logs of containers …   1                    [OK]
jetstack/elasticsearch-pet                   An elasticsearch image for kubernetes PetSets   1                    [OK]
kuzzleio/elasticsearch                       Elasticsearch container based on Alpine Linu…   1                    [OK]
phenompeople/elasticsearch                   Elasticsearch is a powerful open source sear…   1                    [OK]
dsteinkopf/elasticsearch-ingest-attachment   elasticsearch + ingest-attachment to be used…   1                    [OK]
wreulicke/elasticsearch                      elasticsearch                                   0                    [OK]
travix/elasticsearch-kubernetes              To run ElasticSearch in kubernetes and expor…   0                    [OK]

As for why it can’t be searched when logging in, it’s still being verified.

Please log in to leave a comment.