docker-credential-helpers icon indicating copy to clipboard operation
docker-credential-helpers copied to clipboard

NoResponse POST /registry/credstore-updated

Open oliversalzburg opened this issue 5 years ago • 23 comments

Trying to docker login results in the following output:

[328:14:49:31.736][E] (b7b26b32) 2f0ef6b9-CredentialHelperPKG C<-S NoResponse POST /registry/credstore-updated (4.3692ms): Post "http://ipc/registry/credstore-updated": open \\.\pipe\dockerWebApiServer: The system cannot find the file specified.
[common/pkg/gui.(*guiClient).NotifyCredstoreUpdated(0x127acbb)
[       common/pkg/gui/client.go:126 +0x42
[common/pkg/docker-credential-desktop.Helper.Add({0xc000426140}, 0x11a4ba0)
[       common/pkg/docker-credential-desktop/helper.go:31 +0x52
[github.com/docker/docker-credential-helpers/credentials.Store({0x135be98, 0xc0000720c0}, {0x134c2a0, 0xc00014c000})
[       vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go:107 +0x229
[github.com/docker/docker-credential-helpers/credentials.HandleCommand({0x135be98, 0xc0000720c0}, {0xc000128070, 0xc0002dfd68}, {0x134c2a0, 0xc00014c000}, {0x134c2c0, 0xc00014c008})
[       vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go:71 +0xf3
[github.com/docker/docker-credential-helpers/credentials.Serve({0x135be98, 0xc0000720c0})
[       vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go:58 +0xf4
[main.addCredentialsHelperCommand.func1(0xc0003fc2c0, {0x126fb56, 0x0, 0x0})
[       common/cmd/docker-credential-desktop/main.go:27 +0x25
[github.com/spf13/cobra.(*Command).execute(0xc0003fc2c0, {0x181e268, 0x0, 0x0})
[       vendor/github.com/spf13/cobra/command.go:854 +0x5f8
[github.com/spf13/cobra.(*Command).ExecuteC(0xc0003fc000)
[       vendor/github.com/spf13/cobra/command.go:958 +0x3ad
[github.com/spf13/cobra.(*Command).Execute(...)
[       vendor/github.com/spf13/cobra/command.go:895
[main.main()
[       common/cmd/docker-credential-desktop/main.go:69 +0x1b5

oliversalzburg avatar Nov 24 '21 13:11 oliversalzburg

@oliversalzburg Did you find out the root cause here?

if-igor avatar Jan 14 '22 19:01 if-igor

@if-igor Funny you ask that, because I just ran into this again yesterday.

I have no idea what causes this or what the fix is. I feel like this is temporary in nature. However, yesterday I had to resort to deleting ~/.docker/config.json (which only contains configuration for the credential helper in my case). This then causes the credentials to be stored in plaintext, but at least I can work

Sorry to not have more details, but the Docker people don't seem to care either.

oliversalzburg avatar Jan 15 '22 08:01 oliversalzburg

What’s your operating system? Is this with Docker Desktop? Which version?

mat007 avatar Jan 17 '22 10:01 mat007

@mat007 Windows 10 WSL Ubuntu 20.04 + Docker Desktop 4.3.2 (72729), also experienced on Windows 11 WSL Ubuntu 20.04 with same Docker Desktop. Also experienced with earlier versions.

Can you tell me what this failure indicates? Maybe I can work around it more cleanly in the future.

oliversalzburg avatar Jan 17 '22 11:01 oliversalzburg

I guess the most likely cause would be that Docker Desktop isn’t started, is that plausible?

mat007 avatar Jan 17 '22 17:01 mat007

It was definitely running. I'll set up the VM again where I last experienced this. If it reproduces again, I can submit diagnostics or otherwise troubleshoot.

oliversalzburg avatar Jan 17 '22 17:01 oliversalzburg

Set up the VM fresh and reproduced this right away. Diagnostics ID F0B9FFDF-7550-4863-BAE9-EFD51F7A8318/20220117183043

oliversalzburg avatar Jan 17 '22 18:01 oliversalzburg

I can’t spot anything obviously wrong in the diagnostics. Are you able to log in from the UI?

Basically that error means the Docker CLI can’t talk to the Docker Desktop application (sending an IPC to a named pipe). It would help maybe, if I had the error trace that goes with the diagnostics, so that the timestamps match :)

mat007 avatar Jan 18 '22 06:01 mat007

On Windows 10 21H1, Docker Desktop 4.4.3 (73365), WSL2 Ubuntu 20.04, I am having the same issue when running:

docker login

After entering the credentials I get the following error 3 times:

[018:11:01:37.968][E] (34d2e75a) cbba5765-CredentialHelperPKG C<-S NoResponse POST /registry/credstore-updated (5.6086ms): Post "http://ipc/registry/credstore-updated": open /run/host-services/backend.sock: The system cannot find the path specified.
[common/pkg/backend.(*backendClient).NotifyCredstoreUpdated(0x1118751)
[       common/pkg/backend/client.go:358 +0x42
[main.addCredentialsHelperCommand.func1.1()
[       common/cmd/docker-credential-desktop/main.go:21 +0x31
[common/pkg/docker-credential-desktop.Helper.Add({0xc0002fbf60, 0x114ddc0}, 0xc00040f350)
[       common/pkg/docker-credential-desktop/helper.go:59 +0xf4
[github.com/docker/docker-credential-helpers/credentials.Store({0x1205710, 0xc000408a00}, {0x11f5180, 0xc000006010})
[       vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go:107 +0x229
[github.com/docker/docker-credential-helpers/credentials.HandleCommand({0x1205710, 0xc000408a00}, {0xc0000300a0, 0x1205710}, {0x11f5180, 0xc000006010}, {0x11f51c0, 0xc000006018})
[       vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go:71 +0xf3
[github.com/docker/docker-credential-helpers/credentials.Serve({0x1205710, 0xc000408a00})
[       vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go:58 +0xf4
[main.addCredentialsHelperCommand.func1(0xc00045c280, {0x110cfd4, 0x0, 0x0})
[       common/cmd/docker-credential-desktop/main.go:23 +0x2a
[github.com/spf13/cobra.(*Command).execute(0xc00045c280, {0x16ee420, 0x0, 0x0})
[       vendor/github.com/spf13/cobra/command.go:860 +0x5f8
[github.com/spf13/cobra.(*Command).ExecuteC(0xc00045c000)
[       vendor/github.com/spf13/cobra/command.go:974 +0x3bc
[github.com/spf13/cobra.(*Command).Execute(...)
[       vendor/github.com/spf13/cobra/command.go:902
[main.main()
[       common/cmd/docker-credential-desktop/main.go:45 +0x107

This is a new issue, it was not happening with previous versions of Docker Desktop.

As workaround, downgrading to Docker Desktop 4.3.2 made the error not displayed anymore.

lackovic avatar Jan 18 '22 09:01 lackovic

@mat007 I understand the time mismatch is making this less helpful. My original report was for a case I experienced on my main workstation. I had no idea what to do with it, as the same process worked perfectly previously and it was unclear to me what could be the cause. Docker was definitely running. Since then, I only occasionally ran into this, every time without any detectable pattern to what the root cause is.

Recently I was working on documentation and continuously used the "Windows 11 dev environment" Hyper-V template to create an environment to work in. This environment reliably produces the same error output. I'm also seeing this in Ubuntu 20.04 WSL inside that VM. (Before it is mentioned, I am aware of this being an unsupported environment. I do have nested virtualization extensions enabled and I also don't see why this would impact the credential helper.)

In general, I think it'd be nice if this error could be caught and a better output could be generated.

oliversalzburg avatar Jan 18 '22 09:01 oliversalzburg

@lackovic does it work if you docker login from a Windows shell?

mat007 avatar Jan 18 '22 09:01 mat007

Ah so this is from WSL 2, right? Does it work if you open a Windows shell (or Powershell) and do wsl (or wsl -d Distro if Distro is not your default), and then docker login?

mat007 avatar Jan 18 '22 11:01 mat007

This is WSL2, yes. If I wsl -d Ubuntu-20.04 from PowerShell and repeat my login process, I get the identical result.

oliversalzburg avatar Jan 18 '22 11:01 oliversalzburg

@lackovic does it work if you docker login from a Windows shell?

It does work, but I already downgraded to Docker Desktop 4.3.2. I have not tried with the latest version.

Ah so this is from WSL 2, right?

WSL2 is the default WSL version nowadays.

lackovic avatar Jan 18 '22 13:01 lackovic

Same error here. WSL2 running Arch. Tried downgrading docker to 4.3.2 still getting the same issue. Tried downgrading az cli to 2.30.0 but nothing seems to work.

[018:15:55:11.034][E] (0c7ae369) 682bdd33-CredentialHelperPKG C<-S NoResponse POST /registry/credstore-updated (2ms): Post "http://ipc/registry/credstore-updated": open /run/host-services/backend.sock: The system cannot find the path specified.
[common/pkg/backend.(*backendClient).NotifyCredstoreUpdated(0x7f8751)
[       common/pkg/backend/client.go:358 +0x42
[main.addCredentialsHelperCommand.func1.1()
[       common/cmd/docker-credential-desktop/main.go:21 +0x31
[common/pkg/docker-credential-desktop.Helper.Add({0xc0002fff60, 0x82ddc0}, 0xc000413350)
[       common/pkg/docker-credential-desktop/helper.go:59 +0xf4
[github.com/docker/docker-credential-helpers/credentials.Store({0x8e5710, 0xc00040ca00}, {0x8d5180, 0xc000006010})
[       vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go:107 +0x229
[github.com/docker/docker-credential-helpers/credentials.HandleCommand({0x8e5710, 0xc00040ca00}, {0xc0000300a0, 0x8e5710}, {0x8d5180, 0xc000006010}, {0x8d51c0, 0xc000006018})
[       vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go:71 +0xf3
[github.com/docker/docker-credential-helpers/credentials.Serve({0x8e5710, 0xc00040ca00})
[       vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go:58 +0xf4
[main.addCredentialsHelperCommand.func1(0xc000460280, {0x7ecfd4, 0x0, 0x0})
[       common/cmd/docker-credential-desktop/main.go:23 +0x2a
[github.com/spf13/cobra.(*Command).execute(0xc000460280, {0xdce420, 0x0, 0x0})
[       vendor/github.com/spf13/cobra/command.go:860 +0x5f8
[github.com/spf13/cobra.(*Command).ExecuteC(0xc000460000)
[       vendor/github.com/spf13/cobra/command.go:974 +0x3bc
[github.com/spf13/cobra.(*Command).Execute(...)
[       vendor/github.com/spf13/cobra/command.go:902
[main.main()
[       common/cmd/docker-credential-desktop/main.go:45 +0x107
(…)
Error saving credentials: error storing credentials - err: exit status 1, out: `Post "http://ipc/registry/credstore-updated": open /run/host-services/backend.sock: The system cannot find the path specified.`
Login failed.

ghost avatar Jan 18 '22 16:01 ghost

I'm having the same issue here, happened after I updated Docker to 4.4.3 too

myself7890 avatar Jan 19 '22 02:01 myself7890

I am having the same issue with Docker 4.4.3.

themizzi avatar Jan 20 '22 15:01 themizzi

Changing from "credsStore": "desktop.exe" to "credsStore": "wincred.exe" works for me.

walkafwalka avatar Jan 20 '22 20:01 walkafwalka

Thanks @walkafwalka -- that fixed it for me. I updated credStore in ~/.docker/config.json to wincred.exe and all is well again. WSL2 Ubuntu 18.04

lkinley-rythmos avatar Jan 20 '22 22:01 lkinley-rythmos

We have found and fixed the issue, and will be releasing a new Docker Desktop version shortly. In the meanwhile you can download it from here.

Changing the credential manager in config.json is indeed a quick workaround, but docker-credential-wincred doesn’t quite do everything docker-credential-desktop does. Mainly the sign in will not propagate across the rest of Docker Desktop (whale menu, UI, …). But if you’re fine with that, then 👍

mat007 avatar Jan 21 '22 06:01 mat007