moby: Failed to execute child process "dbus-launch" (No such file or directory)

Description

Steps to reproduce the issue:

  1. install ubuntu 14.04.5 on kvm host
  2. install docker-engine 1.12.5 or 17.05.0-ce, and dependencies ( libsystemd-journal0 libltdl7)
  3. run docker login a.b.c.d
  4. error occurred:

error getting credentials - err: exit status 1, out: `Failed to execute child process “dbus-launch” (No such file or directory)

Additional information you deem important (e.g. issue happens only occasionally): i have many kvm hosts created from the same ubuntu 14.04.5 image, some hosts have this error, but the others don’t. and i also created some ubuntu hosts on virtualbox with ubuntu 14.04 image, all these hosts don’t have this error, and in these ubuntu hosts dbus-launch command doesn’t exist Output of docker version:

Client:
 Version:      1.12.5
 API version:  1.24
 Go version:   go1.6.4
 Git commit:   7392c3b
 Built:        Fri Dec 16 02:30:42 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.5
 API version:  1.24
 Go version:   go1.6.4
 Git commit:   7392c3b
 Built:        Fri Dec 16 02:30:42 2016
 OS/Arch:      linux/amd64
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:06:06 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:06:06 2017
 OS/Arch:      linux/amd64
 Experimental: false


Output of docker info:

Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 8
Server Version: 1.12.5
Storage Driver: overlay2
 Backing Filesystem: extfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: null bridge overlay host
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor
Kernel Version: 4.4.0-31-generic
Operating System: Ubuntu 14.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.859 GiB
Name: ubuntu14-147
ID: 4BBY:GOYO:WZN5:JDBI:4V42:A4BM:2V3R:YKLZ:EEYK:G7D5:HUXE:CLOK
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
 127.0.0.0/8
Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 8
Server Version: 17.05.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Security Options:
 apparmor
Kernel Version: 4.4.0-31-generic
Operating System: Ubuntu 14.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.859GiB
Name: ubuntu14-147
ID: 4BBY:GOYO:WZN5:JDBI:4V42:A4BM:2V3R:YKLZ:EEYK:G7D5:HUXE:CLOK
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

output of lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:        14.04
Codename:       trusty

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 20 (4 by maintainers)

Most upvoted comments

IF U SEE THIS dbus-launch (no such files or directory)use these steps⬇️ sudo service xrdp stop sudo apt-get install dbus-x11 sudo service xrdp start

@thaJeztah thanks for your help! 1, there is not a file ~/.docker/config.json in my system 2, there is indeed a package (golang-docker-credential-helpers) installed 3, after golang-docker-credential-helpers package removed, the problem is gone

I resolved the issue by running this: apt install gnupg2 pass

I had the same issue: After I’ve provisioned a fresh Ubuntu 18.04 LTS server on packet.net and installed docker.io, I installed docker-compose. This has the golang-docker-credential-helpers as dependency. The package does breaking the docker login and was throwing dbus errors.

Thanks for all the likes and comments on my way to solve the dbus-launch error, I am glad that it worked for you too

A couple of observations:

  • docker 1.12.5 is outdated and no longer maintained; if you have specific reasons to stay on docker 1.12, make sure to upgrade to 1.12.6. Docker 1.12.6 fixes a critical vulnerability in RunC, which allows processes to escape the container, and obtain root access to the host (see the 1.12.6 release notes, and CVE-2016-9962
  • Note that Docker 17.05 is an “edge” (monthly) release; support will end soon now that Docker 17.06 has been released

You did not post additional information about your configuration. This error message seems to indicate you’re using a credentials-helper to store your credentials. On Linux, most likely the docker-credential-secretservice helper. If so; which version did you install? Does your ~/.docker/config.json file have a "credHelpers" entry?

The secretservice credentials helper requires d-bus to be installed, which usually is the case on a desktop system (IIRC, it’s installed as part of GNOME), but you may have to install the dbus-x11 manually in other situations; https://packages.ubuntu.com/trusty/dbus (also see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750392)

If you remove the "credHelpers" entry from your ~/.docker/config.json, does it work?

From my points above, I don’t think there’s a bug here, but a missing dependency for the credentials helper. Perhaps some improvements in the documentation are needed (full instructions to install a credentials helper); perhaps you could open an issue for that in the documentation issue tracker? https://github.com/docker/docker.github.io/issues

I’ll close this issue because I don’t think this is a bug, but feel free to continue the conversation, and interested to hear if you managed to resolve your situation