louislam / dockge

A fancy, easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager
https://dockge.kuma.pet
MIT License
13.29k stars 380 forks source link

Lost connection to the socket server. Reconnecting... #485

Open truthsword opened 7 months ago

truthsword commented 7 months ago

⚠️ Please verify that this bug has NOT been reported before.

πŸ›‘οΈ Security Policy

Description

After logging out from the Dockge UI in my browser, I typically move on to another site in that same tab. When I do, I get thus nuisance pop-up:

Since I've logged out this is of no concern.

Notable, if I close the Dockge browser tab after logging out, there is no notification.

πŸ‘Ÿ Reproduction steps

πŸ‘€ Expected behavior

πŸ˜“ Actual Behavior

Dockge Version

1.4.2

πŸ’» Operating System and Arch

Win10 x64

🌐 Browser

LibreWolf 124.0.1-1

πŸ‹ Docker Version

Docker 26.0.0

🟩 NodeJS Version

No response

πŸ“ Relevant log output

No response

kdpuvvadi commented 7 months ago

Same here,

Here's log from console

2024-04-11T11:27:03Z [SERVER] INFO: Socket connected (direct)
2024-04-11T11:27:03Z [AUTH] INFO: Login by token. IP=172.18.0.5
2024-04-11T11:27:03Z [AUTH] INFO: Username from JWT: kdpuvvadi
2024-04-11T11:27:03Z [AUTH] INFO: Successfully logged in user kdpuvvadi. IP=172.18.0.5
2024-04-11T11:27:03Z [AGENT-MANAGER] INFO: Connecting to all instance socket server(s)...
2024-04-11T11:27:03Z [AGENT-MANAGER] INFO: Connecting to the socket server: 10.20.20.138:5001
2024-04-11T11:27:03Z [AGENT-MANAGER] INFO: Connected to the socket server: 10.20.20.138:5001
2024-04-11T11:27:03Z [AGENT-MANAGER] INFO: Logged in to the socket server: 10.20.20.138:5001
2024-04-11T11:27:05Z [SERVER] INFO: Socket disconnected!
2024-04-11T11:27:05Z [AGENT-MANAGER] INFO: Disconnected from the socket server: 10.20.20.138:5001
2024-04-11T11:27:06Z [SERVER] INFO: Socket disconnected!
2024-04-11T11:27:06Z [AGENT-MANAGER] INFO: Disconnected from the socket server: 10.20.20.138:5001
2024-04-11T11:27:07Z [AUTH] INFO: Origin is not set, IP: ::ffff:172.18.0.5

Here's message from dom

Connected to the socket server
Logging in by token
{
    "ok": true,
    "agentList": {
        "": {
            "url": "",
            "username": "",
            "endpoint": ""
        },
        "10.20.20.138:5001": {
            "url": "http://10.20.20.138:5001/",
            "username": "kdpuvvadi",
            "endpoint": "10.20.20.138:5001"
        }
    }
}
kdpuvvadi commented 7 months ago

Deleted everything in the data directory including data/db-config.json and sqlite db file.

It worked for 2 minutes and then same error.

my compose looks like this

---

services:
  dockge:
    container_name: dockge
    image: louislam/dockge:1
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /home/kd/compose/dockge/data:/app/data
      - /home/kd/compose:/home/kd/compose
    environment:
      - DOCKGE_STACKS_DIR=/home/kd/compose
    networks:
      - proxy
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=proxy"
      - "traefik.http.routers.dockge.entrypoints=https"
      - "traefik.http.routers.dockge.rule=Host(`dockge.local.puvvadi.net`)"
      - "traefik.http.routers.dockge.middlewares=default-headers@file, https-redirectscheme@file"
      - "traefik.http.routers.dockge.tls=true"
      - "traefik.http.routers.dockge.service=dockge"
      - "traefik.http.services.dockge.loadbalancer.server.scheme=http"
      - "traefik.http.services.dockge.loadbalancer.server.port=5001"

networks:
  proxy:
    external: true
Conkuist commented 7 months ago

I also use traefik and I ran into a similar problem. When I access the dockge page via the reverse proxy, the page constantly reloads and shows the same error. When I don't go through the revers proxy everything works fine. The funny thing is that I had all of this running without issues before. But after I reinstalled my system it somehow broke. I copy pasted everything from the old install, so there is no reason why it suddenly shouldn't work anymore.

beastmankojak commented 7 months ago

I ran into this as well. It looks like this is related to traefik 2.11.1, and has possibly been fixed in 2.11.2. For now I've reverted to traefik 2.11.0 and it seems to solve the issue (the official docker image for 2.11.2 is not available yet) https://github.com/traefik/traefik/issues/10598

Conkuist commented 7 months ago

thank you. downgrading to version 2.11.0 fixed my issue.

Marceau-h commented 7 months ago

Thanks for the tip, upgrading traefik solved the problem as well !

truthsword commented 7 months ago

Unfortunately all above posts relating to Traefik are off topic to the OP. I am not using Traefik, and no solution has yet been proposed.

janreinhardt commented 7 months ago

Same here. I am not using a reverse proxy and Dockge keeps displaying that error message to a point it has become unusable. I cannot edit a single line in a docker-compose.yml and save it, because of the recurring connection error.

janreinhardt commented 7 months ago

Same here. I am not using a reverse proxy and Dockge keeps displaying that error message to a point it has become unusable. I cannot edit a single line in a docker-compose.yml and save it, because of the recurring connection error.

ok I have rebooted everything. Works perfectly right now, so sorry for bothering you... πŸ€·πŸΌβ€β™‚οΈ

redlingg commented 2 months ago

same here, no traefic used... cannot install any container :(

thegeekboyz commented 2 months ago

all my dockge dockers in my proxmox LXC container now give me error msg below. dockge has not been updated since january. it just doesnt make sense it suddenly stop working.

'Connecting to the socket server…' then Lost connection to the socket server. Reconnecting... Using a Reverse Proxy? Check how to config it for WebSocket