Websocket error when second user joins meeting, jitsi Docker

Hi,
when I start a meeting I get no error messages related to websockets. When a second user joins the meeting, both of us get this error message in the .js console:

My nginx.conf is:

 server {
        access_log /var/log/nginx/access.log filter;
        listen jitsimb.iskratel.mbmak:443 ssl http2;
        server_name jitsimb.iskratel.mbmak;
        ssl_certificate /etc/nginx/server.crt;
        ssl_certificate_key /etc/nginx/server.key;

        proxy_set_header Real-Client-Ip   $remote_addr;
        proxy_set_header Nginx-Protocol https;
        proxy_set_header Nginx-Host-Ip $http_host;
        proxy_set_header Nginx-Host-Name $server_name;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP          $remote_addr;
        proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host   $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-Port   443;
        proxy_set_header X-Forwarded-Proto  https;

        proxy_read_timeout 300s;
        proxy_max_temp_file_size 0;



        location / {
            proxy_pass https://localhost:8443;
        }


        location = /http-bind
        {
                proxy_pass http://localhost:5280/http-bind;
                proxy_set_header Host $host;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_buffering off;
                tcp_nodelay on;
        }


        location = /xmpp-websocket {

                proxy_pass http://localhost:5280/xmpp-websocket;

                proxy_set_header Real-Client-Ip $remote_addr;
                proxy_set_header Nginx-Protocol https;
                proxy_set_header Nginx-Host-Ip $http_host;
                proxy_set_header Nginx-Host-Name $server_name;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Server $host;
                proxy_set_header X-Forwarded-Port 443;
                proxy_set_header X-Forwarded-Proto https;


                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
        }


In my .env I added:

ENABLE_COLIBRI_WEBSOCKET=1
ENABLE_XMPP_WEBSOCKET=1

My prosody config file:

consider_bosh_secure = true;
consider_websocket_secure = true;

-- Deprecated in 0.12
-- https://github.com/bjc/prosody/commit/26542811eafd9c708a130272d7b7de77b92712de
cross_domain_websocket = true
cross_domain_bosh = true

VirtualHost "meet.jitsi"

    authentication = "jitsi-anonymous"

    ssl = {
        key = "/config/certs/meet.jitsi.key";
        certificate = "/config/certs/meet.jitsi.crt";
    }
    modules_enabled = {
        "bosh";

        "websocket";
        "smacks"; -- XEP-0198: Stream Management

        "pubsub";
        "ping";
        "speakerstats";
        "conference_duration";


        "muc_lobby_rooms";


        "muc_breakout_rooms";


        "av_moderation";



    }

        smacks_max_unacked_stanzas = 5;
        smacks_hibernation_time = 60;
        smacks_max_hibernated_sessions = 1;
        smacks_max_old_sessions = 1;

In config.js I have the xmpp websocket line commented as I don’t know how to change the config.js file without env variables.
Any help would be appreciated.

If you open the WebSocket URL with your browser do you get any error or do you get a message from prosody?

1 Like

Yes if I change the wws:// to http:// I get the following error message:


Also the URI is /colibri-ws/…, before I had a similar error but the URI was /xmpp-websocket… and if I did the same thing (change wss:// to http://), it said:

“It works! Now point your WebSocket client to this URL to connect to Prosody.”

I fixed that error and now this one came up.
So if I’m guessing correctly the XMPP websocket is now configured correctly but the colibri one isn’t?

Any ideas?

The previous error was what was preventing you from having the meeting. THis error looks ok since you are trying to connect via HTTP to a WS endpoint. Can you have a meeting correctly now?

Yes the meetings are fully functional but I still want to fix this error.
But I don’t fully understand colibri web sockets, are there perhaps any good guides on setting up colibri web sockets?

Also when I use:

curl http://jvb-ip:9090/

I get the result:

curl: (6) Could not resolve host: jvb-ip; Unknown error

There is nothing to fix, it’s not a real error. What you see is the JVB complaining you connected using regular HTTP to a place where it expects a WS connection. That’s ok.

1 Like

Thanks!!!