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 login failure #1220

Closed
lwdye opened this issue Jan 26, 2017 · 35 comments
Closed

docker login failure #1220

lwdye opened this issue Jan 26, 2017 · 35 comments

Comments

@lwdye
Copy link

lwdye commented Jan 26, 2017

Expected behavior

docker login -u xxxx -p yyyy

works from linux instance but fails from osx 1.13.0-beta39 (15140)

Actual behavior

https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

@yallop
Copy link
Contributor

yallop commented Jan 26, 2017

Thanks for the report, @lwdye. Could you please provide a diagnostic id (from the "Diagnose & Feedback..." -> "Diagnose & Upload" menu option) to help us investigate further?

@lwdye
Copy link
Author

lwdye commented Jan 27, 2017

C251A20E-F39D-4584-A65C-4FFF4CFFF4FB

Thanks!

@samoht
Copy link
Contributor

samoht commented Jan 30, 2017

Can you try to run:

$ docker run samoht/wget https://registry-1.docker.io/v2/
Connecting to registry-1.docker.io (52.6.119.223:443)
wget: server returned error: HTTP/1.1 401 Unauthorized

Did you set-up a proxy your Linux machine?

@lwdye
Copy link
Author

lwdye commented Jan 30, 2017

Hi @samoht. Here is the result

Unable to find image 'samoht/wget:latest' locally
latest: Pulling from samoht/wget
0a8490d0dfd3: Pull complete 
d1f1f5fd6f36: Pull complete 
Digest: sha256:68e6c3502486b22c34f094b7e41338406b1c445dfef0c6b1333fe01d7db73d8b
Status: Downloaded newer image for samoht/wget:latest
Connecting to registry-1.docker.io (52.55.240.129:443)
wget: server returned error: HTTP/1.1 401 Unauthorized```

@samoht
Copy link
Contributor

samoht commented Jan 30, 2017

Hum so the VM can connect to the registry, but docker login can't? That's very strange.

Can you maybe try to use an SDK to try to login? Maybe it's a problem with shell escaping and/or Docker for Mac's proxy behaving badly.

@samoht
Copy link
Contributor

samoht commented Jan 30, 2017

@thaJeztah pointed out that docker loginmay be client-side.

@lwdye can you try to check if you can reach docker.io from your macOS host? e.g. try to run:

$ curl  https://registry-1.docker.io/v2/

@samoht
Copy link
Contributor

samoht commented Jan 31, 2017

This is probably related to #988

@lwdye
Copy link
Author

lwdye commented Jan 31, 2017

The login that succeeded was from one of our google compute engine instances (debian) running docker 1.3. I have tested from this network on two machines 10.11.4 and 10.12.1 with both sudo and not and both fail (both on this network and haven’t tried another network).

I take it that 'docker login' works fine for you on OS X and 1.13.0 beta and no other issues registered. Correct? If so we will try to dig into this locally and try from an SDK as you suggest.

@lwdye
Copy link
Author

lwdye commented Jan 31, 2017

$ curl https://registry-1.docker.io/v2/
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}

@samoht
Copy link
Contributor

samoht commented Jan 31, 2017

We have seen issues which may be related to what you are seeing, but we are not sure yet. I am not very familiar to that part of the codebase, and it is not clear to me if docker login uses the client or server DNS resolution mechanism (which is similar on Linux but pretty different on macOS: the client runs on the macOS host while the daemon is in a Linux VM). So any hint on any fancy network configuration that you could have would be appreciated to make progress :-)

@ijc
Copy link
Contributor

ijc commented Feb 20, 2017

This issue has been inactive for more than 14 days while marked as status/0-more-info-needed. It is being closed due to abandonment. Please feel free to re-open with more information about the problem.

MORE_INFO_EXPIRY_TIMEOUT

@ijc ijc closed this as completed Feb 20, 2017
@luretsi
Copy link

luretsi commented Mar 16, 2017

I'm experiencing exactly same problem on my mac..

Shouldn't be anything special in my Network configuration.

@luretsi
Copy link

luretsi commented Mar 16, 2017

Problem really seems to be related to Docker for Mac. I tried with another MacBook, and the same problem exists there.

Curiously, if I connect my laptop to our office VPN, login succeeds.

Also on a Linux virtual box running on my laptop the docker login works correctly.

@geevcookie
Copy link

Just as a note on this... I had the same issue. I could pull images with no problem, but docker login failed. I changed my mac's DNS to 8.8.8.8 and 8.8.4.4 instead of the default and it started working. The funny thing is, is that my routers DNS is set to 8.8.8.8 and 8.8.4.4 anyway. 😄

@djs55
Copy link
Contributor

djs55 commented Apr 30, 2017

There are some potential fixes for docker login coming soon. If you're running the latest edge build and would like to try an experimental possible fix, have a look here: #1569 (comment)

@rahul-nath
Copy link

Just want to add that I was having a similar issue. Turns out that I had changed the context of my docker environment in order to have kubectl to use the docker environment (I was setting up minikube for local kubernetes development).

@richtong
Copy link

so what did you do to fix this @rahul-nath I think I have the same issue it does not work on Mac, does work on Linux and docker login seems to fail at the Docker for Mac Gui but says it works when I do a docker login from the command line

@rueberger
Copy link

rueberger commented Sep 24, 2017

Having the opposite problem. docker login works fine. gui does not.

edit: docker login reports successful login but pull does not work

andrew at Andrews-MBP in ~
$ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: rueberger
Password:
Login Succeeded

andrew at Andrews-MBP in ~
$ docker pull rueberger/repo:latest
Error response from daemon: repository rueberger/repo not found: does not exist or no pull access

Docker version: 17.06.2-ce, build cec0b72

@ejholmes
Copy link

I'm running into the same problem as @rueberger. docker login says "Login Succeeded" but unable to pull any private images.

"Sign In" from via the GUI from the dropdown also doesn't work with my credentials (the same credentials that work on id.docker.com).

Trying to disable the automatic keychain storage doesn't appear to do anything, since Docker is apparently poll'ing ~/.docker/config.json and overwriting it.

$ docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 17.06.2-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 6e23458c129b551d5c9871e5174f6b1b7f6d1170
runc version: 810190ceaa507aa2727d7ae6f4790c76ec150bd2
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.41-moby
Operating System: Alpine Linux v3.5
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.952GiB
Name: moby
ID: 576H:OHTS:5FM7:UUHB:7GQR:ONBF:L3KV:3SE7:S52P:U2YI:VKWG:CVAL
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 17
 Goroutines: 29
 System Time: 2017-09-26T04:26:59.08379515Z
 EventsListeners: 1
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

@ejholmes
Copy link

ejholmes commented Sep 26, 2017

Ok, so apparently if your password contains a : in it, you can't login via the CLI or GUI (id.docker.com works fine). Resetting my password to something sufficiently random, without a : allowed me to log in. Sounds like a bug...

@rueberger
Copy link

Wow, nice sleuthing!! The password that was borking did indeed contain a : and everything works fine now!

@richtong
Copy link

Wow got it. Man this stuff is fragile. Is anyone maintaining docker for Mac anymore?

@n4ss
Copy link

n4ss commented Sep 26, 2017

Hi, we are currently looking into this issue.

@n4ss
Copy link

n4ss commented Sep 26, 2017

We found the source of the bug, working on the patch.

@richtong
Copy link

richtong commented Sep 26, 2017 via email

@n4ss
Copy link

n4ss commented Oct 2, 2017

This issue is fixed in the latest release.

@richtong
Copy link

richtong commented Oct 2, 2017 via email

@joshwiens
Copy link

@n4ss - Is there a listing of older releases where I can go grab one that is working. Having a completely containerized infrastructure that I can't work on because the login fails is, as you can imagine, less than optimal.

@n4ss
Copy link

n4ss commented Oct 14, 2017

@d3viant0ne please try with the latest docker4mac release.

@joshwiens
Copy link

@n4ss - It's looking like in my case, my username was an email ( which used to work ).

Switching that over to my actual username & I can now pull public / private on 17.09.0-ce-mac35

@n4ss
Copy link

n4ss commented Oct 15, 2017

@d3viant0ne this seems to be a different issue as this one was a password-only bug. Please, open a new issue so we can have a look & track it.

@andy9775
Copy link

andy9775 commented Nov 8, 2017

I just experienced the same issue as @d3viant0ne. Logging in with an email used to work, logging in with an email via the GUI works but doesn't work through docker login. Had to use my username.

This is on a mac running docker 17.09.0-ce api version 1.32

@oladipo
Copy link

oladipo commented Jan 17, 2019

using my username instead of my email finally worked for me...

@NextZeus
Copy link

Test docker login With modify Docker General Config (macOS High Sierra 10.13.3 & Docker Engine:18.09.2)

1. With GUI Account login

image

1.1 With General -> Securely store Docker logins in macOS keychain (checked)

image

docker login failed

image

1.2 With General -> Securely store Docker logins in macOS keychain (unchecked)

image

docker login successed

image

it will Authenticating with existing credentials.


2. With GUI Account logout

image

2.1 With General -> Securely store Docker logins in macOS keychain (checked)

docker login failed

image

2.2 With General -> Securely store Docker logins in macOS keychain (unchecked)

docker login successed

image

SO,

unchecked General->Securely store Docker logins in macOS keychain, it solved my docker login failed problem

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests