title: Docker process not running, and any interaction with docker fails
body: <p>To preface this, I am running docker in a Ubuntu 20.04 VM on virtualbox.</p>
  <p>I created a simple shell script to kill any process running on port 9042, then start my docker-compose file. Here is the script in question:</p>
  <pre class="lang-sh prettyprint-override"><code>#!/bin/bash
  
  # Check for and kill any processes running on port 9042
  sudo kill -9 $(sudo lsof -t -i:9042)
  
  # start docker-compose
  docker-compose -f ./docker/docker-compose.yml up
  
  </code></pre>
  <p>Since running that, however, it has made my docker installation completely unresponsive to any sort of interaction. Any docker commands will hang indefinitely until cancelled with Ctrl+C, and any other system commands that use docker (such as <code>sudo service docker start</code>) will also hang indefinitely.</p>
  <p>If I try to run <code>dockerd</code>, it fails with the message <code>failed to start daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid</code>. As my system reports that docker is not running, I go ahead and delete <code>var/run/docker.pid</code>. If I then try to run dockerd again, I get a different error message: <code>failed to start daemon: error while opening volume store metadata database: timeout</code>.</p>
  <p>At this stage, some of the docker commands start working again. <code>docker version</code> and <code>docker help</code> both work, but it is still reported that the docker daemon is not running. Attempting to run <code>docker-compose up</code> on a docker-compose file produces this output:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;/usr/lib/python3/dist-packages/urllib3/connectionpool.py&quot;, line 665, in urlopen
      httplib_response = self._make_request(
    File &quot;/usr/lib/python3/dist-packages/urllib3/connectionpool.py&quot;, line 387, in _make_request
      conn.request(method, url, **httplib_request_kw)
    File &quot;/usr/lib/python3.8/http/client.py&quot;, line 1255, in request
      self._send_request(method, url, body, headers, encode_chunked)
    File &quot;/usr/lib/python3.8/http/client.py&quot;, line 1301, in _send_request
      self.endheaders(body, encode_chunked=encode_chunked)
    File &quot;/usr/lib/python3.8/http/client.py&quot;, line 1250, in endheaders
      self._send_output(message_body, encode_chunked=encode_chunked)
    File &quot;/usr/lib/python3.8/http/client.py&quot;, line 1010, in _send_output
      self.send(msg)
    File &quot;/usr/lib/python3.8/http/client.py&quot;, line 950, in send
      self.connect()
    File &quot;/home/david/.local/lib/python3.8/site-packages/docker/transport/unixconn.py&quot;, line 43, in connect
      sock.connect(self.unix_socket)
  ConnectionRefusedError: [Errno 111] Connection refused
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;/usr/lib/python3/dist-packages/requests/adapters.py&quot;, line 439, in send
      resp = conn.urlopen(
    File &quot;/usr/lib/python3/dist-packages/urllib3/connectionpool.py&quot;, line 719, in urlopen
      retries = retries.increment(
    File &quot;/usr/lib/python3/dist-packages/urllib3/util/retry.py&quot;, line 400, in increment
      raise six.reraise(type(error), error, _stacktrace)
    File &quot;/usr/lib/python3/dist-packages/six.py&quot;, line 702, in reraise
      raise value.with_traceback(tb)
    File &quot;/usr/lib/python3/dist-packages/urllib3/connectionpool.py&quot;, line 665, in urlopen
      httplib_response = self._make_request(
    File &quot;/usr/lib/python3/dist-packages/urllib3/connectionpool.py&quot;, line 387, in _make_request
      conn.request(method, url, **httplib_request_kw)
    File &quot;/usr/lib/python3.8/http/client.py&quot;, line 1255, in request
      self._send_request(method, url, body, headers, encode_chunked)
    File &quot;/usr/lib/python3.8/http/client.py&quot;, line 1301, in _send_request
      self.endheaders(body, encode_chunked=encode_chunked)
    File &quot;/usr/lib/python3.8/http/client.py&quot;, line 1250, in endheaders
      self._send_output(message_body, encode_chunked=encode_chunked)
    File &quot;/usr/lib/python3.8/http/client.py&quot;, line 1010, in _send_output
      self.send(msg)
    File &quot;/usr/lib/python3.8/http/client.py&quot;, line 950, in send
      self.connect()
    File &quot;/home/david/.local/lib/python3.8/site-packages/docker/transport/unixconn.py&quot;, line 43, in connect
      sock.connect(self.unix_socket)
  urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionRefusedError(111, 'Connection refused'))
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;/home/david/.local/lib/python3.8/site-packages/docker/api/client.py&quot;, line 205, in _retrieve_server_version
      return self.version(api_version=False)[&quot;ApiVersion&quot;]
    File &quot;/home/david/.local/lib/python3.8/site-packages/docker/api/daemon.py&quot;, line 181, in version
      return self._result(self._get(url), json=True)
    File &quot;/home/david/.local/lib/python3.8/site-packages/docker/utils/decorators.py&quot;, line 46, in inner
      return f(self, *args, **kwargs)
    File &quot;/home/david/.local/lib/python3.8/site-packages/docker/api/client.py&quot;, line 228, in _get
      return self.get(url, **self._set_request_timeout(kwargs))
    File &quot;/usr/lib/python3/dist-packages/requests/sessions.py&quot;, line 546, in get
      return self.request('GET', url, **kwargs)
    File &quot;/usr/lib/python3/dist-packages/requests/sessions.py&quot;, line 533, in request
      resp = self.send(prep, **send_kwargs)
    File &quot;/usr/lib/python3/dist-packages/requests/sessions.py&quot;, line 646, in send
      r = adapter.send(request, **kwargs)
    File &quot;/usr/lib/python3/dist-packages/requests/adapters.py&quot;, line 498, in send
      raise ConnectionError(err, request=request)
  requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionRefusedError(111, 'Connection refused'))
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;/home/david/.local/bin/docker-compose&quot;, line 8, in &lt;module&gt;
      sys.exit(main())
    File &quot;/home/david/.local/lib/python3.8/site-packages/compose/cli/main.py&quot;, line 67, in main
      command()
    File &quot;/home/david/.local/lib/python3.8/site-packages/compose/cli/main.py&quot;, line 123, in perform_command
      project = project_from_options('.', options)
    File &quot;/home/david/.local/lib/python3.8/site-packages/compose/cli/command.py&quot;, line 60, in project_from_options
      return get_project(
    File &quot;/home/david/.local/lib/python3.8/site-packages/compose/cli/command.py&quot;, line 131, in get_project
      client = get_client(
    File &quot;/home/david/.local/lib/python3.8/site-packages/compose/cli/docker_client.py&quot;, line 41, in get_client
      client = docker_client(
    File &quot;/home/david/.local/lib/python3.8/site-packages/compose/cli/docker_client.py&quot;, line 170, in docker_client
      client = APIClient(**kwargs)
    File &quot;/home/david/.local/lib/python3.8/site-packages/docker/api/client.py&quot;, line 188, in __init__
      self._version = self._retrieve_server_version()
    File &quot;/home/david/.local/lib/python3.8/site-packages/docker/api/client.py&quot;, line 212, in _retrieve_server_version
      raise DockerException(
  docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', ConnectionRefusedError(111, 'Connection refused'))
  </code></pre>
  <p>Other system commands such as <code>sudo service docker start</code> still hang indefinitely until killed.</p>
  <p>I have tried every single solution in this thread (<a href="https://stackoverflow.com/questions/44678725/cannot-connect-to-the-docker-daemon-at-unix-var-run-docker-sock-is-the-docker">Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running?</a>) and this one (<a href="https://stackoverflow.com/questions/40803400/docker-commands-do-not-respond-anymore">Docker commands do not respond anymore</a>), but none of them work.</p>
  <p>Does anyone know what could be the issue here?</p>
  <p><em>EDIT:</em> A few more points -</p>
  <ul>
  <li>The <code>docker.pid</code> file reappears again when I restart my VM</li>
  <li>Restarting my VM does not do anything to remedy the problem</li>
  <li>Executing commands as the root user likewise doesn't do anything</li>
  <li>Trying to reinstall docker using <code>sudo apt-get install --reinstall docker-ce</code> also hangs at the stage <code>Preparing to unpack .../docker-ce_5%3a20.10.0~1.1.beta1-0~ubuntu-focal_amd64.deb ...</code></li>
  </ul>