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 hangs on setting hosts in the advanced settings tab. #1595

Closed
phiroict opened this issue May 7, 2017 · 9 comments
Closed

Docker hangs on setting hosts in the advanced settings tab. #1595

phiroict opened this issue May 7, 2017 · 9 comments

Comments

@phiroict
Copy link

phiroict commented May 7, 2017

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.

@rmontagne
Copy link

I have the same problem on mac.

@johnflavin
Copy link

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

@kevwil
Copy link

kevwil commented Jun 16, 2017

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

@Marcnuth
Copy link

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

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

@j3ffyang
Copy link

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.

@xdmytrox
Copy link

xdmytrox commented Aug 7, 2017

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
Copy link

xdmytrox commented Aug 7, 2017

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

@docker-robott
Copy link
Collaborator

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
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 23, 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

9 participants