jitsi-admin icon indicating copy to clipboard operation
jitsi-admin copied to clipboard

Issue with Websocket

Open timowevel1 opened this issue 1 year ago • 4 comments

Hello,

we got an issue with the websocket. It is not able to connect to the websocket and drops a 404.

Mercure installed and running on port 3334: `[Unit] Description=Mercure.Rocks service After=network.target StartLimitBurst=5 StartLimitIntervalSec=33

[Service] Type=simple WorkingDirectory=/bin/mercure Environment= MERCURE_PUBLISHER_JWT_KEY='asdasd' MERCURE_SUBSCRIBER_JWT_KEY='asdasd' SERVER_NAME=':3334' ExecStart=/bin/mercure/mercure run -config /etc/mercure/Caddyfile StandardOutput=file:/var/log/mercure.log StandardError=file:/var/log/mercure.log Restart=always RestartSec=5

[Install] WantedBy=multi-user.target`

Nginx config: `location /ws { proxy_pass http://127.0.0.1:3334/.well-known/mercure; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }

# WebSocket Reverse Proxy
location /.well-known/mercure {
    proxy_pass http://127.0.0.1:3334/.well-known/mercure;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

# Proxy für Mercure /healthz
location /healthz {
    proxy_pass http://127.0.0.1:3334/healthz;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

`

.env MERCURE_URL=http://localhost:3334/.well-known/mercure MERCURE_PUBLIC_URL=https://asdasd/.well-known/mercure MERCURE_JWT_SECRET=asdasd ###< symfony/mercure-bundle ###

###>WEBSOCKET CREDENTIALS WEBSOCKET_SECRET=asdasd

In browser console, it says 404 not found. image image

It also doesnt seem to use the MERCURE_PUBLIC_URL.

timowevel1 avatar Sep 26 '24 12:09 timowevel1

I noticed you dont use mercure anymore. I switched to your docker image for the websocket.

I get image with this response image

but still image

I checked that WEBSOCKET_SECRET in the websocket docker container and MERCURE_JWT_SECRET and WEBSOCKET_SECRET in .env are identical.

timowevel1 avatar Sep 26 '24 12:09 timowevel1

Hello, mercure ist not support for the last 10 versions. You have to install our websocket service which is deliverd within the sources.

holema avatar Oct 06 '24 11:10 holema

See my message, I did switch to your docker image, still have that issue. Ideas why that happen?

timowevel1 avatar Oct 06 '24 12:10 timowevel1

can you try to restart the websocket container with docker restart <dockerid>, we sometime face this issue that it is not coming up correctly. we are currently working on a fix for the next release. If thisis not working please try to reinstall the docker installation with bash installDocker.sh all your paramters are already so just confirm then with enter. All your databases will stay.

holema avatar Oct 06 '24 15:10 holema