Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket connection error #754

Open
Oscar-Charlie opened this issue May 13, 2024 · 2 comments
Open

Websocket connection error #754

Oscar-Charlie opened this issue May 13, 2024 · 2 comments

Comments

@Oscar-Charlie
Copy link

Oscar-Charlie commented 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

@Oscar-Charlie Oscar-Charlie changed the title Websocket connection error (in homeoffice/works in company) Websocket connection error May 13, 2024
@meltyshev
Copy link
Member

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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants