for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

Docker hangs on setting hosts in the advanced settings tab.

Open phiroict opened this issue 9 years ago • 9 comments

Expected behavior

In the advanced settings tab I add the hosts json tag: "hosts": ["tcp://0.0.0.0:2376"] to request to listen on a port. I expect the docker instance to listen for connections on that port on all interfaces.

Actual behavior

On restart the docker instance hangs with no further information.

Information

  • Diagnostic ID from "Diagnose & Feedback" in the menu. (On restore, the diagnostic does not return with the hosts setting) Docker for Mac: version: 17.03.1-ce-mac5 (b18e2a50c) macOS: version 10.12.4 (build: 16E195) logs: /tmp/9EF8EC92-3011-4764-B408-62A838AD0335/20170507-123618.tar.gz failure: docker ps failed: (Failure "docker ps: timeout after 10.00s") [OK] vmnetd [OK] dns [OK] driver.amd64-linux [OK] virtualization VT-X [OK] app [OK] moby [OK] system [OK] moby-syslog [OK] db [OK] env [OK] virtualization kern.hv_support [OK] slirp [OK] osxfs [OK] moby-console [OK] logs [ERROR] docker-cli docker ps failed [OK] menubar [OK] disk
  • a reproducible case if this is a bug, Dockerfiles FTW No docker container failure, this is starting with extra configuration: { "tlsverify": true, "tlskey": "/Users/phiro/docker-certs/server-key.pem", "tlscacert": "/Users/phiro/docker-certs/ca.pem", "ip": "192.168.2.107", "tlscert": "/Users/phiro/docker-certs/server-cert.pem", "hosts": ["tcp://0.0.0.0:2376"] }

Steps to reproduce the behavior

  1. start docker mac
  2. add to the advanced configuration tab: { "tlsverify": true, "tlskey": "/Users/phiro/docker-certs/server-key.pem", "tlscacert": "/Users/phiro/docker-certs/ca.pem", "ip": "192.168.2.107", "tlscert": "/Users/phiro/docker-certs/server-cert.pem", "hosts": ["tcp://0.0.0.0:2376"] }

Start fails (hangs) Now starting with : { "tlsverify": true, "tlskey": "/Users/phiro/docker-certs/server-key.pem", "tlscacert": "/Users/phiro/docker-certs/ca.pem", "ip": "192.168.2.107", "tlscert": "/Users/phiro/docker-certs/server-cert.pem" } starts ok but it does not appear to listen on any port.

phiroict avatar May 07 '17 00:05 phiroict

I have the same problem on mac.

rmontagne avatar May 12 '17 19:05 rmontagne

I'm having the same problem. I added a "hosts" argument to my daemon json configuration and docker never finished starting.

Initially, I added "hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2375"] and startup failed. I wanted to eliminate the possibility that opening a port was causing a problem, so I did another experiment where the only thing I added to the docker daemon json is "hosts": ["unix:///var/run/docker.sock"] (which should leave the docker daemon unchanged from the default). Docker still never starts.

DIAGNOSTIC ID

5EA5019D-6415-44CD-A362-F2F780BFE8DC

INFORMATION

Docker for Mac: version: 17.06.0-rc2-ce-mac14 (4cdec4294a50b2233146b09469b49937dabdebdd)
macOS: version 10.12.5 (build: 16F73)
logs: /tmp/5EA5019D-6415-44CD-A362-F2F780BFE8DC/20170615-100938.tar.gz
failure: docker ps failed: (Failure "docker ps: timeout after 10.00s")
[OK]     db.git
[OK]     vmnetd
[OK]     dns
[OK]     driver.amd64-linux
[OK]     virtualization VT-X
[OK]     app
[OK]     moby
[OK]     system
[OK]     moby-syslog
[OK]     db
[OK]     env
[OK]     virtualization kern.hv_support
[OK]     slirp
[OK]     osxfs
[OK]     moby-console
[OK]     logs
[ERROR]  docker-cli
         docker ps failed
[OK]     menubar
[OK]     disk

johnflavin avatar Jun 15 '17 15:06 johnflavin

Having the same problem here. This "advanced" configuration causes Docker to hang. { "hosts": [ "unix:///var/run/docker.sock", "tcp://127.0.0.1:2375" ] }

kevwil avatar Jun 16 '17 17:06 kevwil

Same issue as above, when set the hosts in advanced configurations.

DIAGNOSTIC ID F0B1D3D8-14E9-493C-A50C-0004E54C2B98

Marcnuth avatar Jun 20 '17 15:06 Marcnuth

Same issue on Ubuntu 16.04, when set hosts argument in /etc/docker/daemon.json, while docker daemon is managed by systemd. But running standalone dockerd, as dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock works.

j3ffyang avatar Jul 14 '17 15:07 j3ffyang

Hey All,

Have a same issue with next configuration for the docker daemon.

{
    "hosts": [
                "unix:///var/run/docker.sock",
                "tcp://127.0.0.1:2375"
    ]
}

Docker CE for mac stuck with message "Docker starting". The root of issue is described in error message from /var/log/docker.log inside xhyve VM.

unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives are specified both as a flag and in the configuration file: hosts: (from flag: [unix:///var/run/docker.sock], from file: [unix:///var/run/docker.sock tcp://0.0.0.0:2376])

I've logged to VM and updated /etc/init.d/docker but Docker CE restart erase my changes.

I am going to update /Applications/Docker.app/Contents/Resources/moby/initrd.img image if it is possible.

DIAGNOSTIC ID 807D61DD-AD13-407E-8D71-908F25B712D8

xdmytrox avatar Aug 07 '17 08:08 xdmytrox

This https://github.com/stephank/docker-for-mac-nfs helped me to update xhyve VM

xdmytrox avatar Aug 07 '17 11:08 xdmytrox

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

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

docker-robott avatar Mar 27 '18 10:03 docker-robott

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-robott avatar Jun 23 '20 03:06 docker-robott