Issues with docker when re-opening a stopped workspace

I created this workspace a few days and it was not used during the weekend and today when I opened it docker-compose was showing below error

Traceback (most recent call last):
  File "urllib3/connectionpool.py", line 677, in urlopen
  File "urllib3/connectionpool.py", line 426, in _make_request
  File "<string>", line 3, in raise_from
  File "urllib3/connectionpool.py", line 421, in _make_request
  File "http/client.py", line 1369, in getresponse
  File "http/client.py", line 310, in begin
  File "http/client.py", line 271, in _read_status
  File "socket.py", line 589, in readinto
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "requests/adapters.py", line 449, in send
  File "urllib3/connectionpool.py", line 727, in urlopen
  File "urllib3/util/retry.py", line 410, in increment
  File "urllib3/packages/six.py", line 734, in reraise
  File "urllib3/connectionpool.py", line 677, in urlopen
  File "urllib3/connectionpool.py", line 426, in _make_request
  File "<string>", line 3, in raise_from
  File "urllib3/connectionpool.py", line 421, in _make_request
  File "http/client.py", line 1369, in getresponse
  File "http/client.py", line 310, in begin
  File "http/client.py", line 271, in _read_status
  File "socket.py", line 589, in readinto
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "docker/api/client.py", line 214, in _retrieve_server_version
  File "docker/api/daemon.py", line 181, in version
  File "docker/utils/decorators.py", line 46, in inner
  File "docker/api/client.py", line 237, in _get
  File "requests/sessions.py", line 543, in get
  File "requests/sessions.py", line 530, in request
  File "requests/sessions.py", line 643, in send
  File "requests/adapters.py", line 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose/cli/main.py", line 80, in main
  File "compose/cli/main.py", line 189, in perform_command
  File "compose/cli/command.py", line 70, in project_from_options
  File "compose/cli/command.py", line 153, in get_project
  File "compose/cli/docker_client.py", line 43, in get_client
  File "compose/cli/docker_client.py", line 170, in docker_client
  File "docker/api/client.py", line 197, in __init__
  File "docker/api/client.py", line 222, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
[7799] Failed to execute script docker-compose

I checked docker info and it was not responding

Then I tried sudo docker-up then I saw

FATA[0000] Docker socket already exists at /var/run/docker.sock.
In a Gitpod workspace Docker will start automatically when used.
If all else fails, please remove /var/run/docker.sock and try again. 

So removed /var/run/docker.sock as suggested and ran again sudo docker-up then I saw

WARN[0000] no LISTEN_FDS                                 LISTEN_FDS= error="strconv.Atoi: parsing \"\": invalid syntax" service=runOutsideNetns
sent tapfd=5 for tap0
received tapfd=5
Starting slirp
* MTU:             65520
* Network:         10.0.2.0
* Netmask:         255.255.255.0
* Gateway:         10.0.2.2
* DNS:             10.0.2.3
* Recommended IP:  10.0.2.100
* API Socket:      /tmp/slirp4netns-api534985885
INFO[2021-06-07T09:03:41.877270738Z] Starting up                                  
WARN[2021-06-07T09:03:41.877431515Z] Running experimental build                   
WARN[2021-06-07T09:03:41.877438121Z] Running in rootless mode. Cgroups, AppArmor, and CRIU are disabled. 
failed to start daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid
FATA[0000] failed                                        error="exit status 1" service=runWithinNetns
FATA[0000] failed                                        error="exit status 1" service=runOutsideNetns

So I removed /var/run/docker.pid and ran sudo docker-up and now some different error

WARN[0000] no LISTEN_FDS                                 LISTEN_FDS= error="strconv.Atoi: parsing \"\": invalid syntax" service=runOutsideNetns
sent tapfd=5 for tap0
received tapfd=5
Starting slirp
* MTU:             65520
* Network:         10.0.2.0
* Netmask:         255.255.255.0
* Gateway:         10.0.2.2
* DNS:             10.0.2.3
* Recommended IP:  10.0.2.100
* API Socket:      /tmp/slirp4netns-api4160788398
INFO[2021-06-07T09:05:24.858225090Z] Starting up                                  
WARN[2021-06-07T09:05:24.858286217Z] Running experimental build                   
WARN[2021-06-07T09:05:24.858293374Z] Running in rootless mode. Cgroups, AppArmor, and CRIU are disabled. 
INFO[2021-06-07T09:05:24.860356625Z] libcontainerd: containerd is still running    pid=3982
INFO[2021-06-07T09:05:24.860903499Z] parsed scheme: "unix"                         module=grpc
INFO[2021-06-07T09:05:24.861659947Z] scheme "unix" not registered, fallback to default scheme  module=grpc
INFO[2021-06-07T09:05:24.861695333Z] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0  <nil>}] <nil>}  module=grpc
INFO[2021-06-07T09:05:24.861714948Z] ClientConn switching balancer to "pick_first"  module=grpc
failed to start containerd: timeout waiting for containerd to start
FATA[0015] failed                                        error="exit status 1" service=runWithinNetns
FATA[0015] failed                                        error="exit status 1" service=runOutsideNetns

Any idea why this happened and how to make docker start?

HI @vinaypuppal ,

sorry, no idea what’s wrong there. Could you share a repository URL so I can try to reproduce?

Hi @geropl
Sorry, I just saw this message.
The issue seems to be fixed after few hours.