docker login timeout on ubuntu `Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached`

Ali picture Ali · Jun 5, 2018 · Viewed 7.2k times · Source

I have encountered this error while doing a simple sudo docker login. On checking the logs using journalctl -xe I found the following problem.

Jun 05 01:51:30 ubuntu sudo[24492]: pam_unix(sudo:session): session opened for user root by (uid=0)`

Jun 05 01:51:34 ubuntu dbus-daemon[7120]: [session uid=0 pid=7118] Activating service name='org.freedesktop.secrets' requested by ':1.41' (uid=0 pid=24502 comm="docker-credential-secretservice stostore " label="unconfined")`

Jun 05 01:51:34 ubuntu gnome-keyring-daemon[24511]: couldn't create socket directory: /home/aliicp/.cache/keyring-KUIFKZ: Permission denied`

Jun 05 01:51:34 ubuntu gnome-keyring-daemon[24511]: couldn't bind to control socket: /home/aliicp/.cache/keyring-KUIFKZ/control: Permission denied`

Jun 05 01:51:34 ubuntu gnome-keyring-d[24511]: couldn't create socket directory: /home/aliicp/.cache/keyring-KUIFKZ: Permission denied`

Jun 05 01:51:34 ubuntu gnome-keyring-d[24511]: couldn't bind to control socket: /home/aliicp/.cache/keyring-KUIFKZ/control: Permission denied
Jun 05 01:51:59 ubuntu sudo[24492]: pam_unix(sudo:session): session closed for user root`

Jun 05 01:53:34 ubuntu dbus-daemon[7120]: [session uid=0 pid=7118] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)

the keyring value set from command is ps aux | grep keyring:

aliicp    24044  0.0  0.3 288356  7944 pts/0    Sl+  00:29   0:00 gnome-keyring-daemon --start --replace --foreground --components=secrets,ssh,pcks11

aliicp    24103  0.0  0.0  21536  1016 pts/2    S+   00:33   0:00 grep --color=auto keyring

this problem doesn't happen when I am using VirtualBox or Kitmatic instead of VMware. My base OS is Win7.

Thanks.

Answer

mango parade picture mango parade · Dec 5, 2018

You could add yourself to the docker group. Doing to would allow docker to access your keyring and thus remove the error.