profile
viewpoint

Ask questionsDocker Machine crashes when managing Docker containers with vscode-docker plugin

I recently started exploring ways to manage my docker development environment with vscode, then I came across this plugin and another one for running vscode in a container. Unfortunately, both methodologies are proving problematic. Since when I installed both plugins, whenever I try to either manage my containers or run vscode inside my workspace container, it crashes the whole docker machine and I will have to start all over again. Although, I am luck I'm able to mount into the docker container using volumes for some of my critical containers except for a few (eg. mongoDB, postgres-postgis & elasticsearch (which is another unsolved issue). Anyways, blow is my system and docker configs; Windows 10 Home Edition, with VTX enabled running DockerTools (which by the way installs vbox with a default guest machine having 4GB RAM).

While below is the stacktrace I get whenever the application crashes

Exception in thread Thread-19:
Traceback (most recent call last):
  File "site-packages\urllib3\connectionpool.py", line 600, in urlopen
  File "site-packages\urllib3\connectionpool.py", line 384, in _make_request
  File "<string>", line 2, in raise_from
  File "site-packages\urllib3\connectionpool.py", line 380, in _make_request
  File "http\client.py", line 1331, in getresponse
  File "http\client.py", line 297, in begin
  File "http\client.py", line 266, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\requests\adapters.py", line 449, in send
  File "site-packages\urllib3\connectionpool.py", line 638, in urlopen
  File "site-packages\urllib3\util\retry.py", line 368, in increment
  File "site-packages\urllib3\packages\six.py", line 685, in reraise
  File "site-packages\urllib3\connectionpool.py", line 600, in urlopen
  File "site-packages\urllib3\connectionpool.py", line 384, in _make_request
  File "<string>", line 2, in raise_from
  File "site-packages\urllib3\connectionpool.py", line 380, in _make_request
  File "http\client.py", line 1331, in getresponse
  File "http\client.py", line 297, in begin
  File "http\client.py", line 266, in _read_status
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Re                                                                                                                                  mote end closed connection without response',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "threading.py", line 916, in _bootstrap_inner
  File "threading.py", line 864, in run
  File "compose\cli\log_printer.py", line 214, in watch_events
  File "compose\project.py", line 493, in yield_loop
  File "compose\project.py", line 461, in build_container_event
  File "compose\container.py", line 48, in from_id
  File "site-packages\docker\utils\decorators.py", line 19, in wrapped
  File "site-packages\docker\api\container.py", line 755, in inspect_container
  File "site-packages\docker\utils\decorators.py", line 46, in inner
  File "site-packages\docker\api\client.py", line 230, in _get
  File "site-packages\requests\sessions.py", line 537, in get
  File "site-packages\requests\sessions.py", line 524, in request
  File "site-packages\requests\sessions.py", line 637, in send
  File "site-packages\requests\adapters.py", line 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected(                                                                                                                                  'Remote end closed connection without response',))

Exception in thread Thread-15:
Traceback (most recent call last):
  File "site-packages\urllib3\connectionpool.py", line 600, in urlopen
  File "site-packages\urllib3\connectionpool.py", line 384, in _make_request
  File "<string>", line 2, in raise_from
  File "site-packages\urllib3\connectionpool.py", line 380, in _make_request
  File "http\client.py", line 1331, in getresponse
  File "http\client.py", line 297, in begin
  File "http\client.py", line 266, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\requests\adapters.py", line 449, in send
  File "site-packages\urllib3\connectionpool.py", line 638, in urlopen
  File "site-packages\urllib3\util\retry.py", line 368, in increment
  File "site-packages\urllib3\packages\six.py", line 685, in reraise
  File "site-packages\urllib3\connectionpool.py", line 600, in urlopen
  File "site-packages\urllib3\connectionpool.py", line 384, in _make_request
  File "<string>", line 2, in raise_from
  File "site-packages\urllib3\connectionpool.py", line 380, in _make_request
  File "http\client.py", line 1331, in getresponse
  File "http\client.py", line 297, in begin
  File "http\client.py", line 266, in _read_status
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Re                                                                                                                                  mote end closed connection without response',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "threading.py", line 916, in _bootstrap_inner
  File "threading.py", line 864, in run
  File "compose\cli\log_printer.py", line 166, in tail_container_logs
  File "compose\cli\log_printer.py", line 197, in wait_on_exit
  File "compose\container.py", line 281, in wait
  File "site-packages\docker\utils\decorators.py", line 19, in wrapped
  File "site-packages\docker\api\container.py", line 1285, in wait
  File "site-packages\docker\utils\decorators.py", line 46, in inner
  File "site-packages\docker\api\client.py", line 226, in _post
  File "site-packages\requests\sessions.py", line 572, in post
  File "site-packages\requests\sessions.py", line 524, in request
  File "site-packages\requests\sessions.py", line 637, in send
  File "site-packages\requests\adapters.py", line 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected(                                                                                                                                  'Remote end closed connection without response',))

Exception in thread Thread-13:
Traceback (most recent call last):
  File "site-packages\urllib3\connection.py", line 159, in _new_conn
  File "site-packages\urllib3\util\connection.py", line 80, in create_connection
  File "site-packages\urllib3\util\connection.py", line 70, in create_connection
ConnectionRefusedError: [WinError 10061] No connection could be made because the                                                                                                                                   target machine actively refused it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\urllib3\connectionpool.py", line 600, in urlopen
  File "site-packages\urllib3\connectionpool.py", line 343, in _make_request
  File "site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
  File "site-packages\urllib3\connection.py", line 301, in connect
  File "site-packages\urllib3\connection.py", line 168, in _new_conn
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnecti                                                                                                                                  on object at 0x000001E356E56438>: Failed to establish a new connection: [WinErro                                                                                                                                  r 10061] No connection could be made because the target machine actively refused                                                                                                                                   it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\requests\adapters.py", line 449, in send
  File "site-packages\urllib3\connectionpool.py", line 638, in urlopen
  File "site-packages\urllib3\util\retry.py", line 399, in increment
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.99.100', por                                                                                                                                  t=2376): Max retries exceeded with url: /v1.25/containers/8d51d4b1aa7f58512b2aa7                                                                                                                                  f65b77c44b79666dbb0c8ed0473a5f4524f0ae0436/wait (Caused by NewConnectionError('<                                                                                                                                  urllib3.connection.VerifiedHTTPSConnection object at 0x000001E356E56438>: Failed                                                                                                                                   to establish a new connection: [WinError 10061] No connection could be made bec                                                                                                                                  ause the target machine actively refused it',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "threading.py", line 916, in _bootstrap_inner
  File "threading.py", line 864, in run
  File "compose\cli\log_printer.py", line 166, in tail_container_logs
  File "compose\cli\log_printer.py", line 197, in wait_on_exit
  File "compose\container.py", line 281, in wait
  File "site-packages\docker\utils\decorators.py", line 19, in wrapped
  File "site-packages\docker\api\container.py", line 1285, in wait
  File "site-packages\docker\utils\decorators.py", line 46, in inner
  File "site-packages\docker\api\client.py", line 226, in _post
  File "site-packages\requests\sessions.py", line 572, in post
  File "site-packages\requests\sessions.py", line 524, in request
  File "site-packages\requests\sessions.py", line 637, in send
  File "site-packages\requests\adapters.py", line 516, in send
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.99.100',                                                                                                                                   port=2376): Max retries exceeded with url: /v1.25/containers/8d51d4b1aa7f58512b2                                                                                                                                  aa7f65b77c44b79666dbb0c8ed0473a5f4524f0ae0436/wait (Caused by NewConnectionError                                                                                                                                  ('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001E356E56438>: Fai                                                                                                                                  led to establish a new connection: [WinError 10061] No connection could be made                                                                                                                                   because the target machine actively refused it',))

Exception in thread Thread-14:
Traceback (most recent call last):
  File "site-packages\urllib3\connection.py", line 159, in _new_conn
  File "site-packages\urllib3\util\connection.py", line 80, in create_connection
  File "site-packages\urllib3\util\connection.py", line 70, in create_connection
ConnectionRefusedError: [WinError 10061] No connection could be made because the                                                                                                                                   target machine actively refused it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\urllib3\connectionpool.py", line 600, in urlopen
  File "site-packages\urllib3\connectionpool.py", line 343, in _make_request
  File "site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
  File "site-packages\urllib3\connection.py", line 301, in connect
  File "site-packages\urllib3\connection.py", line 168, in _new_conn
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnecti                                                                                                                                  on object at 0x000001E356E58080>: Failed to establish a new connection: [WinErro                                                                                                                                  r 10061] No connection could be made because the target machine actively refused                                                                                                                                   it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\requests\adapters.py", line 449, in send
  File "site-packages\urllib3\connectionpool.py", line 638, in urlopen
  File "site-packages\urllib3\util\retry.py", line 399, in increment
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.99.100', por                                                                                                                                  t=2376): Max retries exceeded with url: /v1.25/containers/2a768e7ef87a28e921f5c7                                                                                                                                  7ee166e02317bd51106cd725a56dbc8eeb1c0bd6c0/wait (Caused by NewConnectionError('<                                                                                                                                  urllib3.connection.VerifiedHTTPSConnection object at 0x000001E356E58080>: Failed                                                                                                                                   to establish a new connection: [WinError 10061] No connection could be made bec                                                                                                                                  ause the target machine actively refused it',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "threading.py", line 916, in _bootstrap_inner
  File "threading.py", line 864, in run
  File "compose\cli\log_printer.py", line 166, in tail_container_logs
  File "compose\cli\log_printer.py", line 197, in wait_on_exit
  File "compose\container.py", line 281, in wait
  File "site-packages\docker\utils\decorators.py", line 19, in wrapped
  File "site-packages\docker\api\container.py", line 1285, in wait
  File "site-packages\docker\utils\decorators.py", line 46, in inner
  File "site-packages\docker\api\client.py", line 226, in _post
  File "site-packages\requests\sessions.py", line 572, in post
  File "site-packages\requests\sessions.py", line 524, in request
  File "site-packages\requests\sessions.py", line 637, in send
  File "site-packages\requests\adapters.py", line 516, in send
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.99.100',                                                                                                                                   port=2376): Max retries exceeded with url: /v1.25/containers/2a768e7ef87a28e921f                                                                                                                                  5c77ee166e02317bd51106cd725a56dbc8eeb1c0bd6c0/wait (Caused by NewConnectionError                                                                                                                                  ('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001E356E58080>: Fai                                                                                                                                  led to establish a new connection: [WinError 10061] No connection could be made                                                                                                                                   because the target machine actively refused it',))

Exception in thread Thread-18:
Traceback (most recent call last):
  File "site-packages\urllib3\connection.py", line 159, in _new_conn
  File "site-packages\urllib3\util\connection.py", line 80, in create_connection
  File "site-packages\urllib3\util\connection.py", line 70, in create_connection
ConnectionRefusedError: [WinError 10061] No connection could be made because the                                                                                                                                   target machine actively refused it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\urllib3\connectionpool.py", line 600, in urlopen
  File "site-packages\urllib3\connectionpool.py", line 343, in _make_request
  File "site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
  File "site-packages\urllib3\connection.py", line 301, in connect
  File "site-packages\urllib3\connection.py", line 168, in _new_conn
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnecti                                                                                                                                  on object at 0x000001E356E58AC8>: Failed to establish a new connection: [WinErro                                                                                                                                  r 10061] No connection could be made because the target machine actively refused                                                                                                                                   it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\requests\adapters.py", line 449, in send
  File "site-packages\urllib3\connectionpool.py", line 638, in urlopen
  File "site-packages\urllib3\util\retry.py", line 399, in increment
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.99.100', por                                                                                                                                  t=2376): Max retries exceeded with url: /v1.25/containers/58b8407fabd2fdddeaec4b                                                                                                                                  9393e407f5c15cedff29f78f298f259f69db2ef262/wait (Caused by NewConnectionError('<                                                                                                                                  urllib3.connection.VerifiedHTTPSConnection object at 0x000001E356E58AC8>: Failed                                                                                                                                   to establish a new connection: [WinError 10061] No connection could be made bec                                                                                                                                  ause the target machine actively refused it',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "threading.py", line 916, in _bootstrap_inner
  File "threading.py", line 864, in run
  File "compose\cli\log_printer.py", line 166, in tail_container_logs
  File "compose\cli\log_printer.py", line 197, in wait_on_exit
  File "compose\container.py", line 281, in wait
  File "site-packages\docker\utils\decorators.py", line 19, in wrapped
  File "site-packages\docker\api\container.py", line 1285, in wait
  File "site-packages\docker\utils\decorators.py", line 46, in inner
  File "site-packages\docker\api\client.py", line 226, in _post
  File "site-packages\requests\sessions.py", line 572, in post
  File "site-packages\requests\sessions.py", line 524, in request
  File "site-packages\requests\sessions.py", line 637, in send
  File "site-packages\requests\adapters.py", line 516, in send
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.99.100',                                                                                                                                   port=2376): Max retries exceeded with url: /v1.25/containers/58b8407fabd2fdddeae                                                                                                                                  c4b9393e407f5c15cedff29f78f298f259f69db2ef262/wait (Caused by NewConnectionError                                                                                                                                  ('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001E356E58AC8>: Fai                                                                                                                                  led to establish a new connection: [WinError 10061] No connection could be made                                                                                                                                   because the target machine actively refused it',))

Exception in thread Thread-16:
Traceback (most recent call last):
  File "site-packages\urllib3\connection.py", line 159, in _new_conn
  File "site-packages\urllib3\util\connection.py", line 80, in create_connection
  File "site-packages\urllib3\util\connection.py", line 70, in create_connection
ConnectionRefusedError: [WinError 10061] No connection could be made because the                                                                                                                                   target machine actively refused it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\urllib3\connectionpool.py", line 600, in urlopen
  File "site-packages\urllib3\connectionpool.py", line 343, in _make_request
  File "site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
  File "site-packages\urllib3\connection.py", line 301, in connect
  File "site-packages\urllib3\connection.py", line 168, in _new_conn
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnecti                                                                                                                                  on object at 0x000001E356E58470>: Failed to establish a new connection: [WinErro                                                                                                                                  r 10061] No connection could be made because the target machine actively refused                                                                                                                                   it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\requests\adapters.py", line 449, in send
  File "site-packages\urllib3\connectionpool.py", line 638, in urlopen
  File "site-packages\urllib3\util\retry.py", line 399, in increment
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.99.100', por                                                                                                                                  t=2376): Max retries exceeded with url: /v1.25/containers/a0b2044fbaf0a5e127ef38                                                                                                                                  2804a37293a11be1a178b3e560f57d4fdf961d5b1a/wait (Caused by NewConnectionError('<                                                                                                                                  urllib3.connection.VerifiedHTTPSConnection object at 0x000001E356E58470>: Failed                                                                                                                                   to establish a new connection: [WinError 10061] No connection could be made bec                                                                                                                                  ause the target machine actively refused it',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "threading.py", line 916, in _bootstrap_inner
  File "threading.py", line 864, in run
  File "compose\cli\log_printer.py", line 166, in tail_container_logs
  File "compose\cli\log_printer.py", line 197, in wait_on_exit
  File "compose\container.py", line 281, in wait
  File "site-packages\docker\utils\decorators.py", line 19, in wrapped
  File "site-packages\docker\api\container.py", line 1285, in wait
  File "site-packages\docker\utils\decorators.py", line 46, in inner
  File "site-packages\docker\api\client.py", line 226, in _post
  File "site-packages\requests\sessions.py", line 572, in post
  File "site-packages\requests\sessions.py", line 524, in request
  File "site-packages\requests\sessions.py", line 637, in send
  File "site-packages\requests\adapters.py", line 516, in send
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.99.100',                                                                                                                                   port=2376): Max retries exceeded with url: /v1.25/containers/a0b2044fbaf0a5e127e                                                                                                                                  f382804a37293a11be1a178b3e560f57d4fdf961d5b1a/wait (Caused by NewConnectionError                                                                                                                                  ('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001E356E58470>: Fai                                                                                                                                  led to establish a new connection: [WinError 10061] No connection could be made                                                                                                                                   because the target machine actively refused it',))

Exception in thread Thread-17:
Traceback (most recent call last):
  File "site-packages\urllib3\connection.py", line 159, in _new_conn
  File "site-packages\urllib3\util\connection.py", line 80, in create_connection
  File "site-packages\urllib3\util\connection.py", line 70, in create_connection
ConnectionRefusedError: [WinError 10061] No connection could be made because the                                                                                                                                   target machine actively refused it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\urllib3\connectionpool.py", line 600, in urlopen
  File "site-packages\urllib3\connectionpool.py", line 343, in _make_request
  File "site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
  File "site-packages\urllib3\connection.py", line 301, in connect
  File "site-packages\urllib3\connection.py", line 168, in _new_conn
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnecti                                                                                                                                  on object at 0x000001E356E588D0>: Failed to establish a new connection: [WinErro                                                                                                                                  r 10061] No connection could be made because the target machine actively refused                                                                                                                                   it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\requests\adapters.py", line 449, in send
  File "site-packages\urllib3\connectionpool.py", line 638, in urlopen
  File "site-packages\urllib3\util\retry.py", line 399, in increment
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.99.100', por                                                                                                                                  t=2376): Max retries exceeded with url: /v1.25/containers/0e42eb6be4c914d84e02c6                                                                                                                                  499267a476da9e694fe443f880d96bed3fd464b8ac/wait (Caused by NewConnectionError('<                                                                                                                                  urllib3.connection.VerifiedHTTPSConnection object at 0x000001E356E588D0>: Failed                                                                                                                                   to establish a new connection: [WinError 10061] No connection could be made bec                                                                                                                                  ause the target machine actively refused it',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "threading.py", line 916, in _bootstrap_inner
  File "threading.py", line 864, in run
  File "compose\cli\log_printer.py", line 166, in tail_container_logs
  File "compose\cli\log_printer.py", line 197, in wait_on_exit
  File "compose\container.py", line 281, in wait
  File "site-packages\docker\utils\decorators.py", line 19, in wrapped
  File "site-packages\docker\api\container.py", line 1285, in wait
  File "site-packages\docker\utils\decorators.py", line 46, in inner
  File "site-packages\docker\api\client.py", line 226, in _post
  File "site-packages\requests\sessions.py", line 572, in post
  File "site-packages\requests\sessions.py", line 524, in request
  File "site-packages\requests\sessions.py", line 637, in send
  File "site-packages\requests\adapters.py", line 516, in send
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.99.100',                                                                                                                                   port=2376): Max retries exceeded with url: /v1.25/containers/0e42eb6be4c914d84e0                                                                                                                                  2c6499267a476da9e694fe443f880d96bed3fd464b8ac/wait (Caused by NewConnectionError                                                                                                                                  ('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001E356E588D0>: Fai                                                                                                                                  led to establish a new connection: [WinError 10061] No connection could be made                                                                                                                                   because the target machine actively refused it',))

I will be very grateful if I can get any ideas as to why this keep happening and any solutions will be much appreciated as well.

microsoft/vscode-docker

Answer questions bwateratmsft

@nasiriyima If docker-machine is crashing, please file a bug in their repo: https://github.com/docker/machine

useful!

Related questions

Error Message: connect EACCES /var/run/docker.sock hot 3
Error Message: connect EACCES /var/run/docker.sock hot 1
Debug not running hot 1
Error:connect ENOENT //.pipe/docker_engine hot 1
Error:connect ENOENT //.pipe/docker_engine hot 1
In order to use an SSH DOCKER_HOST on OS X and Linux, you must configure an ssh-agent. - vscode-docker hot 1
In order to use an SSH DOCKER_HOST on OS X and Linux, you must configure an ssh-agent. hot 1
Improve error message when docker has not been found- ENOENT //./pipe/docker_engine hot 1
Connect to remote docker daemon when using "Remote - SSH" extension hot 1
VSCode: "No matching resources found." when using with Azure Container Registry extension hot 1
Starting container process caused "process_linux.go:297: applying cgroup configuration for process caused \"open hot 1
Error:connect ENOENT //.pipe/docker_engine hot 1
browse to containers step gives 401 error hot 1
Error Message: connect EACCES /var/run/docker.sock hot 1
Connect to remote docker daemon when using "Remote - SSH" extension hot 1
source:https://uonfu.com/
Github User Rank List