docker-archive / toolbox

The Docker Toolbox
https://docker.com/toolbox
3.22k stars 1.23k forks source link

Win7 Enterprise SP1 - can't restart docker daemon on boot2docker machine - docker toolbox 1.9.1 #320

Open flado opened 9 years ago

flado commented 9 years ago

After installation of Docker Toolbox v1.9.1 on windows:

$ env | grep DOCKER
DOCKER_HOST=tcp://192.168.99.101:2376
DOCKER_MACHINE_NAME=default
DOCKER_TLS_VERIFY=1
DOCKER_TOOLBOX_INSTALL_PATH=C:\Program Files\Docker Toolbox
DOCKER_CERT_PATH=C:\Users\M040398\.docker\machine\machines\default

$ docker version
Client:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   a34a1d5
 Built:        Fri Nov 20 17:56:04 UTC 2015
 OS/Arch:      windows/amd64

Server:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   a34a1d5
 Built:        Fri Nov 20 17:56:04 UTC 2015
 OS/Arch:      linux/amd64

$ docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM
default   *        virtualbox   Running   tcp://192.168.99.101:2376

$ docker-machine ssh default
                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/
              \____\_______/
 _                 _   ____     _            _
| |__   ___   ___ | |_|___ \ __| | ___   ___| | _____ _ __
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__|   <  __/ |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
Boot2Docker version 1.9.1, build master : cef800b - Fri Nov 20 19:33:59 UTC 2015
Docker version 1.9.1, build a34a1d5
docker@default:~$

And now I an trying to restart docker daemon:

docker@default:~$ sudo /etc/init.d/docker restart
Need TLS certs for default,127.0.0.1,10.0.2.15,192.168.99.101
-------------------

but the docker daemon has actually stopped and I can't start it anymore:

docker@default:~$ sudo /etc/init.d/docker status
Docker daemon is not running
docker@default:~$ sudo /etc/init.d/docker start
Need TLS certs for default,127.0.0.1,10.0.2.15,192.168.99.101
-------------------
docker@default:~$ sudo /etc/init.d/docker status
Docker daemon is not running
docker@default:~$ docker ps
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

What is really strange is that using "docker.exe" straight from Windows everything looks good:

$ docker ps -a
CONTAINER ID        IMAGE                                COMMAND                  CREATED             STATUS                      PORTS                   NAMES
5c98f5dcf70e        kitematic/hello-world-nginx:latest   "sh /start.sh"           25 minutes ago      Up 25 minutes               0.0.0.0:32768->80/tcp   hello-world-nginx
169c22879faf        nginx                                "nginx -g 'daemon off"   29 minutes ago      Up 29 minutes               80/tcp, 443/tcp         dreamy_keller
62b05e39e78d        hello-world                          "/hello"                 30 minutes ago      Exited (0) 30 minutes ago                           compassionate_jang
028defdd162e        hello-world                          "/hello"                 39 minutes ago      Exited (0) 39 minutes ago                           boring_hoover

How is that possible that when I ssh into the "default" docker VM I can;t see the "docker daemon running but from windows I can list, start and run containers ?

SvenDowideit commented 8 years ago

maybe docker-machine ssh tail /var/log/docker.log will tell you more

yes, it sounds very unusual - though you could create this issue by setting the docker daemon to only listening to the tcp socket, and not /var/run/docker.sock