Docker Community Forums

Share and learn in the Docker community.

Connection timed out when attaching to Docker via Websocket

Currently I’m trying to remotely run bash commands in a container by attaching via Websocket, like this:

new WebSocket('ws://172.24.0.2:2375/containers/0df8ba74d96f/attach/ws?stdin=1&stdout=1&stderr=1&stream=1')

and the connection is timed out. I have also tested with using the browser and Node (using third party websocket library) and both return the same error. According to the docs, this is how I should go about connecting. Any advice?

Before 1.5.1 I used to receive the following error 'ConnectionError: HTTPSConnectionPool(host=‘192.168.99.104’, port=2376): Read timed out. but the containers were still running and responsive.

Now that I’ve updated to 1.5.1 the containers graceful stop after 1 min, round, in every single try and then print the following error: ERROR: Couldn’t connect to Docker daemon - you might need to run docker-machine start default.

I’m using OSX 10.11.1
Docker 1.9
Compose 1.5.1
Virtualbox 5.0.8 r103449