Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker does not print custom 404 responses from the registry during login #28082

Open
vikstrous opened this issue Nov 4, 2016 · 0 comments
Open
Labels
area/authentication area/distribution kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. version/master

Comments

@vikstrous
Copy link
Contributor

Description

During push docker interprets 404 responses and allows a registry to return a custom message to the user, but during login it does not. It simply prints Error response from daemon: login attempt to http://172.17.0.1/v2/ failed with status: 404 Not Found

More specifically, during push the error message looks like:

error parsing HTTP 404 response body: invalid character 'C' looking for beginning of value: "Custom error information here\n"

That's good enough for us, but that could also be improved.

Steps to reproduce the issue:

  1. create a docker registry with a custom 404 page that returns a hint as to why the registry is not accessible
  2. try to docker login into the registry

Describe the results you received:

Error response from daemon: login attempt to http://172.17.0.1/v2/ failed with status: 404 Not Found

Describe the results you expected:

Error response from daemon: login attempt to http://172.17.0.1/v2/ failed with status: 404 Not Found and body: Please do XYZ to configure the registry before using it.

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

Output of docker version:

$ docker version
Client:
 Version:      1.12.2-cs2
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   d5fda6e
 Built:        Sun Oct 23 07:48:43 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.13.0-dev
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   17aaa08-unsupported
 Built:        Tue Nov  1 04:28:42 2016
 OS/Arch:      linux/amd64

Output of docker info:

$ docker info
Containers: 31
 Running: 17
 Paused: 0
 Stopped: 14
Images: 280
Server Version: 1.13.0-dev
Storage Driver: overlay2
 Backing Filesystem: extfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: active
 NodeID: q0i8qz897t67xphfahdlz2sa3
 Is Manager: true
 ClusterID: k33d8hpd40dri5jiukx2zgxze
 Managers: 1
 Nodes: 1
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Heartbeat Tick: 1
  Election Tick: 3
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
  External CAs:
    cfssl: https://172.17.0.1:12381/api/v1/cfssl/sign
 Node Address: 172.17.0.1
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.8.3
Operating System: NixOS 17.03.git.210b3b3 (Gorilla)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.53 GiB
Name: thisisfine
ID: 4XB6:RAOL:2UT7:W3TT:JBSR:ILHC:LREA:HUVU:5U7V:TI7E:WUT2:WQTS
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 203
 Goroutines: 346
 System Time: 2016-11-04T16:40:28.015262135-07:00
 EventsListeners: 2
Username: viktorstanchev
Registry: https://index.docker.io/v1/
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
Insecure Registries:
 172.17.0.1
 127.0.0.0/8

Additional environment details (AWS, VirtualBox, physical, etc.):
Physical

@thaJeztah thaJeztah added area/distribution kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. labels Nov 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/authentication area/distribution kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. version/master
Projects
None yet
Development

No branches or pull requests

3 participants