wrfly / container-web-tty

Connect your containers via a web-tty
https://container-web-tty.kfd.me/
Apache License 2.0
245 stars 45 forks source link

Lost connection to docker socket #84

Open tamimology opened 10 months ago

tamimology commented 10 months ago

After the recent update on 25/9, the container lost connection to the docker sock. I tried using the volume mount and the proxy socket, but none worked. Previously, I used to have it running using the socket proxy

Below is the docker-compose and log using the volume mounting /var/run/docker.sock

docker-compose

  webtty:
    container_name: container-webtty
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - 8818:8080
    image: 'wrfly/container-web-tty:latest'

LOGS

ime="2023-10-01T09:43:54Z" level=info msg="Docker connecting to unix:///var/run/docker.sock"
time="2023-10-01T09:43:54Z" level=info msg="New docker client: API [1.41]"
time="2023-10-01T09:43:54Z" level=info msg="Warm up containers info..."
time="2023-10-01T09:43:54Z" level=info msg="Server running at http://0.0.0.0:8080/"
time="2023-10-01T09:43:54Z" level=error msg="list containers eror: Error response from daemon: client version 1.43 is too new. Maximum supported API version is 1.41"
time="2023-10-01T09:43:54Z" level=error msg="docker cli watch events error: Error response from daemon: client version 1.43 is too new. Maximum supported API version is 1.41"
time="2023-10-01T09:43:54Z" level=fatal msg="lost connection to docker daemon"
time="2023-10-01T09:43:59Z" level=info msg="Docker connecting to unix:///var/run/docker.sock"
time="2023-10-01T09:43:59Z" level=info msg="New docker client: API [1.41]"
time="2023-10-01T09:43:59Z" level=info msg="Warm up containers info..."
time="2023-10-01T09:43:59Z" level=info msg="Server running at http://0.0.0.0:8080/"
time="2023-10-01T09:43:59Z" level=error msg="list containers eror: Error response from daemon: client version 1.43 is too new. Maximum supported API version is 1.41"
time="2023-10-01T09:43:59Z" level=error msg="docker cli watch events error: Error response from daemon: client version 1.43 is too new. Maximum supported API version is 1.41"
time="2023-10-01T09:43:59Z" level=fatal msg="lost connection to docker daemon"
time="2023-10-01T09:44:02Z" level=info msg="Docker connecting to unix:///var/run/docker.sock"
time="2023-10-01T09:44:02Z" level=info msg="New docker client: API [1.41]"

Below is the docker-compose and log using the socket proxy connection, which has been working fine for more than a year, until the latest update on 25/9

docker-compose

  webtty:
    container_name: container-webtty
    restart: unless-stopped
    environment:
      - DOCKER_HOST=192.168.1.10:2375
    ports:
      - 8818:8080
    image: 'wrfly/container-web-tty:latest'

LOGS

time="2023-10-01T10:53:45Z" level=info msg="Docker connecting to tcp://192.168.1.10:2375"
time="2023-10-01T10:53:45Z" level=error msg="create new docker client error: unable to parse docker host `192.168.1.10:2375`"
time="2023-10-01T10:53:45Z" level=fatal msg="Create backend client error: unable to parse docker host `192.168.1.10:2375`"
time="2023-10-01T10:53:49Z" level=info msg="Docker connecting to tcp://192.168.1.10:2375"
time="2023-10-01T10:53:49Z" level=error msg="create new docker client error: unable to parse docker host `192.168.1.10:2375`"
time="2023-10-01T10:53:49Z" level=fatal msg="Create backend client error: unable to parse docker host `192.168.1.10:2375`"
time="2023-10-01T10:53:52Z" level=info msg="Docker connecting to tcp://192.168.1.10:2375"
time="2023-10-01T10:53:52Z" level=error msg="create new docker client error: unable to parse docker host `192.168.1.10:2375`"
time="2023-10-01T10:53:52Z" level=fatal msg="Create backend client error: unable to parse docker host `192.168.1.10:2375`"
time="2023-10-01T10:53:56Z" level=info msg="Docker connecting to tcp://192.168.1.10:2375"
time="2023-10-01T10:53:56Z" level=error msg="create new docker client error: unable to parse docker host `192.168.1.10:2375`"
time="2023-10-01T10:53:56Z" level=fatal msg="Create backend client error: unable to parse docker host `192.168.1.10:2375`"
time="2023-10-01T10:53:59Z" level=info msg="Docker connecting to tcp://192.168.1.10:2375"
time="2023-10-01T10:53:59Z" level=error msg="create new docker client error: unable to parse docker host `192.168.1.10:2375`"
time="2023-10-01T10:53:59Z" level=fatal msg="Create backend client error: unable to parse docker host `192.168.1.10:2375`"
wrfly commented 10 months ago

Hi @tamimology can you try to upgrade the docker daemon version?

based on the logs Error response from daemon: client version 1.43 is too new. Maximum supported API version is 1.41

the latest upgrade of container-web-tty is upgraded all the client dependencies, I suppose its the reason of this error.

tamimology commented 10 months ago

I cannot update it as this is the latest available for my device. I am using Synology DS1513+ with DSM6.2.4 and have docker version 20.10.3

I rolled back to :0.1.10 and is it is working good so far