Websocket connection error #506

Open
opened 2026-02-04 20:01:32 +03:00 by OVERLORD · 12 comments
Owner

Originally created by @Oscar-Charlie on GitHub (May 13, 2024).

Hello together,
We have setup planka in our company via docker on our synology.
Configuration is as follows:


version: '3.9'
services:
planka:
image: ghcr.io/plankanban/planka:latest
container_name: Planka
command: >
bash -c
"for i in seq 1 30; do
./start.sh &&
s=? && break || s=?;
echo "Tried $$i times. Waiting 5 seconds...";
sleep 5;
done; (exit $$s)"
restart: on-failure:5
volumes:
- /volume1/docker/planka/avatars:/app/public/user-avatars
- /volume1/docker/planka/images:/app/public/project-background-images
- /volume1/docker/planka/files:/app/private/attachments
ports:
- 3617:1337
environment:
- BASE_URL=https://planka.ourwebsite.com
- TRUST_PROXY=1
- DATABASE_URL=postgresql://postgres@postgres/planka
- SECRET_KEY=xxxxx
- DEFAULT_ADMIN_EMAIL=xxx@email.de
- DEFAULT_ADMIN_PASSWORD=xxxx
- DEFAULT_ADMIN_NAME=xxxx
- DEFAULT_ADMIN_USERNAME=xxxx
- NODE_ENV=production

depends_on:
  - postgres

postgres:
image: postgres
container_name: Planka-DB
restart: on-failure:5
volumes:
- /volume1/docker/planka/db:/var/lib/postgresql/data:rw
environment:
- POSTGRES_DB=planka
- POSTGRES_HOST_AUTH_METHOD=trust


We have set a reverse proxy rule to 443 and to localhost 3617. We also set the websocket option in our synology.

Nevertheless one of our client just sees the loading screen from the startup an can't get any further. From the google debug consule they get an websocket error (sails.io)
Fehler_Planka2

Do you have any advice? We are loving planka, but we need to have to make it work for all of our clients.
Thank you in advance,
Matthias

Originally created by @Oscar-Charlie on GitHub (May 13, 2024). Hello together, We have setup planka in our company via docker on our synology. Configuration is as follows: *********************************************************************************** version: '3.9' services: planka: image: ghcr.io/plankanban/planka:latest container_name: Planka command: > bash -c "for i in `seq 1 30`; do ./start.sh && s=$$? && break || s=$$?; echo \"Tried $$i times. Waiting 5 seconds...\"; sleep 5; done; (exit $$s)" restart: on-failure:5 volumes: - /volume1/docker/planka/avatars:/app/public/user-avatars - /volume1/docker/planka/images:/app/public/project-background-images - /volume1/docker/planka/files:/app/private/attachments ports: - 3617:1337 environment: - BASE_URL=https://planka.ourwebsite.com - TRUST_PROXY=1 - DATABASE_URL=postgresql://postgres@postgres/planka - SECRET_KEY=xxxxx - DEFAULT_ADMIN_EMAIL=xxx@email.de - DEFAULT_ADMIN_PASSWORD=xxxx - DEFAULT_ADMIN_NAME=xxxx - DEFAULT_ADMIN_USERNAME=xxxx - NODE_ENV=production depends_on: - postgres postgres: image: postgres container_name: Planka-DB restart: on-failure:5 volumes: - /volume1/docker/planka/db:/var/lib/postgresql/data:rw environment: - POSTGRES_DB=planka - POSTGRES_HOST_AUTH_METHOD=trust ***************************************************************** We have set a reverse proxy rule to 443 and to localhost 3617. We also set the websocket option in our synology. Nevertheless one of our client just sees the loading screen from the startup an can't get any further. From the google debug consule they get an websocket error (sails.io) ![Fehler_Planka2](https://github.com/plankanban/planka/assets/163834745/46bd6cc3-2a72-48b7-82ba-3ac9da41ef9f) Do you have any advice? We are loving planka, but we need to have to make it work for all of our clients. Thank you in advance, Matthias
OVERLORD added the help wanted label 2026-02-04 20:01:32 +03:00
Author
Owner

@meltyshev commented on GitHub (May 14, 2024):

Hi! It seems that your settings look correct. Please make sure that BASE_URL is exactly the same as the address you specify in your browser and also starts with http:// or https://. It's hard for me to suggest solutions to possible server-side problems, as I'm not very familiar with it, but I'll try to find a way to display an error text in the server logs.

@meltyshev commented on GitHub (May 14, 2024): Hi! It seems that your settings look correct. Please make sure that `BASE_URL` is exactly the same as the address you specify in your browser and also starts with `http://` or `https://`. It's hard for me to suggest solutions to possible server-side problems, as I'm not very familiar with it, but I'll try to find a way to display an error text in the server logs.
Author
Owner

@meltyshev commented on GitHub (May 14, 2024):

Please try to change command in docker-compose.yml from

command: >
  bash -c
    "for i in `seq 1 30`; do
      ./start.sh &&
      s=$$? && break || s=$$?;
      echo \"Tried $$i times. Waiting 5 seconds...\";
      sleep 5;
    done; (exit $$s)"

to

command: bash -c "export NODE_ENV=development && set -e && node db/init.js && node app.js"

With this you'll be able to run Planka in development mode and see all debug messages.

Then try to open Planka in a browser and get that socket connection error. Check the logs on the server, there should be something like "debug: A socket was rejected via the ...". Also, there may not be any error there, but then the problem is somewhere in the proxy server settings.

@meltyshev commented on GitHub (May 14, 2024): Please try to change `command` in `docker-compose.yml` from ``` command: > bash -c "for i in `seq 1 30`; do ./start.sh && s=$$? && break || s=$$?; echo \"Tried $$i times. Waiting 5 seconds...\"; sleep 5; done; (exit $$s)" ``` to ``` command: bash -c "export NODE_ENV=development && set -e && node db/init.js && node app.js" ``` With this you'll be able to run Planka in development mode and see all debug messages. Then try to open Planka in a browser and get that socket connection error. Check the logs on the server, there should be something like "debug: A socket was rejected via the ...". Also, there may not be any error there, but then the problem is somewhere in the proxy server settings.
Author
Owner

@modem7 commented on GitHub (Nov 7, 2024):

I'm getting the same issue on this end.

It works if I set the container to load locally (bypassing the reverse proxy).

image

  planka:
    image: linuxserver/planka
    container_name: Planka
    networks:
      pihole:
        ipv4_address: '172.22.0.115'
      isolated:
    ports:
      - 3000:1337
    logging:
      driver: "local"
      options:
        max-size: 10m
        max-file: "3"
    environment:
      PUID: $PUID
      PGID: $PGID
      TZ: $TZ
      BASE_URL: https://kanban.$DOMAINNAME
      # BASE_URL: http://192.168.50.254:3000
      DATABASE_URL: postgresql://$PLANKA_DB_USER@plankaDB/planka
      SECRET_KEY: $PLANKA_SECRET_KEY
      TRUST_PROXY: 1
      DEFAULT_ADMIN_EMAIL: $PLANKA_ADMIN_EMAIL # Do not remove if you want to prevent this user from being edited/deleted
      DEFAULT_ADMIN_USERNAME: $PLANKA_ADMIN_USERNAME
      DEFAULT_ADMIN_PASSWORD: $PLANKA_ADMIN_PASSWORD
      DEFAULT_ADMIN_NAME: $PLANKA_ADMIN_NAME
      OIDC_ISSUER: $PLANKA_OIDC_ISSUER
      OIDC_CLIENT_ID: $PLANKA_OIDC_CLIENT_ID
      OIDC_CLIENT_SECRET: $PLANKA_OIDC_CLIENT_SECRET
      OIDC_SCOPES: openid email profile
      OIDC_ADMIN_ROLES: authentik-admins
      OIDC_EMAIL_ATTRIBUTE: email
      OIDC_NAME_ATTRIBUTE: name
      OIDC_USERNAME_ATTRIBUTE: preferred_username
      OIDC_ROLES_ATTRIBUTE: groups
      # OIDC_IGNORE_USERNAME: true
      # OIDC_IGNORE_ROLES: true
      OIDC_ENFORCED: true
    labels:
      - backup
      - autoheal=true
      - "traefik.enable=true"
      ## HTTP Routers
      - "traefik.http.routers.planka-rtr.entrypoints=https"
      - "traefik.http.routers.planka-rtr.rule=Host(`kanban.$DOMAINNAME`)"
      # - "traefik.http.routers.planka-rtr.tls=true"
      ## Middlewares
      - "traefik.http.routers.planka-rtr.middlewares=chain-no-auth@file" # No Authentication
      # - "traefik.http.routers.planka-rtr.middlewares=chain-basic-auth@file" # Basic Authentication
      # - "traefik.http.routers.planka-rtr.middlewares=chain-oauth-admins@file" # Google OAuth 2.0
      # - "traefik.http.routers.planka-rtr.middlewares=chain-authentik@file"
      ## HTTP Services
      - "traefik.http.routers.planka-rtr.service=planka-svc"
      - "traefik.http.services.planka-svc.loadbalancer.server.port=1337"
      ## Homepage
      - homepage.name=Kanban
      - homepage.group=Other
      - homepage.icon=https://planka.app/cms-content/1/uploads/site/favicon.png
      - homepage.href=https://kanban.$DOMAINNAME
    volumes:
      # - $USERDIR/Planka/user-avatars:/app/public/user-avatars
      # - $USERDIR/Planka/project-background-images:/app/public/project-background-images
      # - $USERDIR/Planka/attachments:/app/private/attachments
      - $USERDIR/Planka/data:/config
    restart: always
    # healthcheck:
    #   test: node ./healthcheck.js
    #   start_period: 120s
    #   interval: 10s
    #   timeout: 10s
    #   retries: 3
    depends_on:
      - plankaDB

  plankaDB:
    container_name: PlankaDB
    # image: postgres:16-alpine
    image: pgautoupgrade/pgautoupgrade:17-alpine # https://github.com/pgautoupgrade/docker-pgautoupgrade
    environment:
      # - POSTGRES_PASSWORD=$LINKWRDNDBPASS
      - POSTGRES_DB=planka
      - POSTGRES_HOST_AUTH_METHOD=trust
    labels:
      - backup
    logging:
      driver: "local"
      options:
        max-size: 10m
        max-file: "3"
    networks:
      isolated:
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -d planka"]
      interval: 10s
      timeout: 5s
      retries: 5
    restart: always
    volumes:
      - $USERDIR/Planka/db:/var/lib/postgresql/data
@modem7 commented on GitHub (Nov 7, 2024): I'm getting the same issue on this end. It works if I set the container to load locally (bypassing the reverse proxy). ![image](https://github.com/user-attachments/assets/ad7983d0-fbad-4c2d-8b25-33f9509c717a) ```yaml planka: image: linuxserver/planka container_name: Planka networks: pihole: ipv4_address: '172.22.0.115' isolated: ports: - 3000:1337 logging: driver: "local" options: max-size: 10m max-file: "3" environment: PUID: $PUID PGID: $PGID TZ: $TZ BASE_URL: https://kanban.$DOMAINNAME # BASE_URL: http://192.168.50.254:3000 DATABASE_URL: postgresql://$PLANKA_DB_USER@plankaDB/planka SECRET_KEY: $PLANKA_SECRET_KEY TRUST_PROXY: 1 DEFAULT_ADMIN_EMAIL: $PLANKA_ADMIN_EMAIL # Do not remove if you want to prevent this user from being edited/deleted DEFAULT_ADMIN_USERNAME: $PLANKA_ADMIN_USERNAME DEFAULT_ADMIN_PASSWORD: $PLANKA_ADMIN_PASSWORD DEFAULT_ADMIN_NAME: $PLANKA_ADMIN_NAME OIDC_ISSUER: $PLANKA_OIDC_ISSUER OIDC_CLIENT_ID: $PLANKA_OIDC_CLIENT_ID OIDC_CLIENT_SECRET: $PLANKA_OIDC_CLIENT_SECRET OIDC_SCOPES: openid email profile OIDC_ADMIN_ROLES: authentik-admins OIDC_EMAIL_ATTRIBUTE: email OIDC_NAME_ATTRIBUTE: name OIDC_USERNAME_ATTRIBUTE: preferred_username OIDC_ROLES_ATTRIBUTE: groups # OIDC_IGNORE_USERNAME: true # OIDC_IGNORE_ROLES: true OIDC_ENFORCED: true labels: - backup - autoheal=true - "traefik.enable=true" ## HTTP Routers - "traefik.http.routers.planka-rtr.entrypoints=https" - "traefik.http.routers.planka-rtr.rule=Host(`kanban.$DOMAINNAME`)" # - "traefik.http.routers.planka-rtr.tls=true" ## Middlewares - "traefik.http.routers.planka-rtr.middlewares=chain-no-auth@file" # No Authentication # - "traefik.http.routers.planka-rtr.middlewares=chain-basic-auth@file" # Basic Authentication # - "traefik.http.routers.planka-rtr.middlewares=chain-oauth-admins@file" # Google OAuth 2.0 # - "traefik.http.routers.planka-rtr.middlewares=chain-authentik@file" ## HTTP Services - "traefik.http.routers.planka-rtr.service=planka-svc" - "traefik.http.services.planka-svc.loadbalancer.server.port=1337" ## Homepage - homepage.name=Kanban - homepage.group=Other - homepage.icon=https://planka.app/cms-content/1/uploads/site/favicon.png - homepage.href=https://kanban.$DOMAINNAME volumes: # - $USERDIR/Planka/user-avatars:/app/public/user-avatars # - $USERDIR/Planka/project-background-images:/app/public/project-background-images # - $USERDIR/Planka/attachments:/app/private/attachments - $USERDIR/Planka/data:/config restart: always # healthcheck: # test: node ./healthcheck.js # start_period: 120s # interval: 10s # timeout: 10s # retries: 3 depends_on: - plankaDB plankaDB: container_name: PlankaDB # image: postgres:16-alpine image: pgautoupgrade/pgautoupgrade:17-alpine # https://github.com/pgautoupgrade/docker-pgautoupgrade environment: # - POSTGRES_PASSWORD=$LINKWRDNDBPASS - POSTGRES_DB=planka - POSTGRES_HOST_AUTH_METHOD=trust labels: - backup logging: driver: "local" options: max-size: 10m max-file: "3" networks: isolated: healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d planka"] interval: 10s timeout: 5s retries: 5 restart: always volumes: - $USERDIR/Planka/db:/var/lib/postgresql/data ```
Author
Owner

@lid3rs commented on GitHub (Jan 22, 2025):

Have the same error, using reverse proxy

@lid3rs commented on GitHub (Jan 22, 2025): Have the same error, using reverse proxy
Author
Owner

@pentiumoverdrive commented on GitHub (Feb 5, 2025):

I have web sockets issue as well, but only through Microsoft Entra Application Proxy.

Websocktes works fine when accessing planka on the server that runs the Entra Application Proxy connector, but comming over internet through the reverse proxy there is just an infinite spin after login.

It apperas that Entra Application Proxy does not support web sockets fully, but other applications that uses web sockets works at least.

@pentiumoverdrive commented on GitHub (Feb 5, 2025): I have web sockets issue as well, but only through Microsoft Entra Application Proxy. Websocktes works fine when accessing planka on the server that runs the Entra Application Proxy connector, but comming over internet through the reverse proxy there is just an infinite spin after login. It apperas that Entra Application Proxy does not support web sockets fully, but other applications that uses web sockets works at least.
Author
Owner

@ghost commented on GitHub (Feb 7, 2025):

Have the same error, using reverse proxy

Same here, and it's just about driven me mad troubleshooting and debugging.

@ghost commented on GitHub (Feb 7, 2025): > Have the same error, using reverse proxy Same here, and it's just about driven me mad troubleshooting and debugging.
Author
Owner

@lid3rs commented on GitHub (Mar 17, 2025):

Any plans fixing this?

@lid3rs commented on GitHub (Mar 17, 2025): Any plans fixing this?
Author
Owner

@ghost commented on GitHub (Apr 23, 2025):

I'm having the same issue, and have been unable to resolve it.

@ghost commented on GitHub (Apr 23, 2025): I'm having the same issue, and have been unable to resolve it.
Author
Owner

@00pp commented on GitHub (Jun 11, 2025):

same issue. can't resolve

@00pp commented on GitHub (Jun 11, 2025): same issue. can't resolve
Author
Owner

@TheGitPanda commented on GitHub (Jun 17, 2025):

Synology Docker users, head to Control Panel > Login Portal > Reverse Proxy > [Edit the proxy config] > Custom Header > Create > Websocket. It should insert two rows;

Upgrade : $http_upgrade
Connection: $connection_upgrade

This solved it in my case.

For the record, I had tweaked some files on the planka docker container prior to this (which I'm intending to rollback when I have time)

$ vi /app/config/sockets.js
Ensuring beforeConnect was enabled and return process(undefined, true)
Docs: https://sailsjs.com/documentation/reference/configuration/sails-config-sockets

$ vi /app/config/security.js
Ensuring allowOrigins: '*', allowAnyOriginWithCredentialsUnsafe : true
Docs: https://sailsjs.com/documentation/reference/configuration/sails-config-security

Hope this helps

@TheGitPanda commented on GitHub (Jun 17, 2025): Synology Docker users, head to Control Panel > Login Portal > Reverse Proxy > [Edit the proxy config] > Custom Header > Create > Websocket. It should insert two rows; Upgrade : $http_upgrade Connection: $connection_upgrade This solved it in my case. For the record, I had tweaked some files on the planka docker container prior to this (which I'm intending to rollback when I have time) `$ vi /app/config/sockets.js` Ensuring beforeConnect was enabled and return `process(undefined, true)` Docs: https://sailsjs.com/documentation/reference/configuration/sails-config-sockets `$ vi /app/config/security.js` Ensuring `allowOrigins: '*', allowAnyOriginWithCredentialsUnsafe : true` Docs: https://sailsjs.com/documentation/reference/configuration/sails-config-security Hope this helps
Author
Owner

@S1M8N commented on GitHub (Jul 19, 2025):

@TheGitPanda thank for the solution it's work fine with cloudflared tunnel environnement

@S1M8N commented on GitHub (Jul 19, 2025): @TheGitPanda thank for the solution it's work fine with cloudflared tunnel environnement
Author
Owner

@pvdh commented on GitHub (Jan 11, 2026):

I'm getting the same issue on this end.

It works if I set the container to load locally (bypassing the reverse proxy).

image

planka:
[...]> labels:
- backup
- autoheal=true
- "traefik.enable=true"
## HTTP Routers
- "traefik.http.routers.planka-rtr.entrypoints=https"
- "traefik.http.routers.planka-rtr.rule=Host(kanban.$DOMAINNAME)"

I had the very same issue with planka and traefik.
Turns out: I had seafile running on the same server and following a seafile-traefik-guide added
"traefik.http.routers.seafhttp.rule=Host(seafile.$DOMAINNAME) && PathPrefix(/sdoc-server) || PathPrefix(/socket.io)"
for seafile. Which is evaluated as (Host(seafile.$DOMAINNAME) && PathPrefix(/sdoc-server)) || PathPrefix(/socket.io) and therefore conflicts with /socket.io in planka.
Changing the Rule to "Host(seafile.$DOMAINNAME) && (PathPrefix(/sdoc-server) || PathPrefix(/socket.io))" solved my issue.

@pvdh commented on GitHub (Jan 11, 2026): > I'm getting the same issue on this end. > > It works if I set the container to load locally (bypassing the reverse proxy). > > ![image](https://github.com/user-attachments/assets/ad7983d0-fbad-4c2d-8b25-33f9509c717a) > > planka: [...]> labels: > - backup > - autoheal=true > - "traefik.enable=true" > ## HTTP Routers > - "traefik.http.routers.planka-rtr.entrypoints=https" > - "traefik.http.routers.planka-rtr.rule=Host(`kanban.$DOMAINNAME`)" I had the very same issue with planka and traefik. Turns out: I had seafile running on the same server and following a seafile-traefik-guide added "traefik.http.routers.seafhttp.rule=Host(`seafile.$DOMAINNAME`) && PathPrefix(`/sdoc-server`) || PathPrefix(`/socket.io`)" for seafile. Which is evaluated as (Host(`seafile.$DOMAINNAME`) && PathPrefix(`/sdoc-server`)) || PathPrefix(`/socket.io`) and therefore conflicts with /socket.io in planka. Changing the Rule to "Host(`seafile.$DOMAINNAME`) && (PathPrefix(`/sdoc-server`) || PathPrefix(`/socket.io`))" solved my issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#506