Problems with webSockets?

Dear community!

After updating to the latest jitsi-version, I followed this article FAQ | Jitsi Meet to migrate away from nginx multiplexing.

Jitsi website is working, conferences also.

After joining a room I get this message:
image
Video quality is very poor…

In the browser console, I can see this message:

WebSocket connection to 'wss://EXTERNAL-MEETING-URL/colibri-ws/default-id/eaf7164f207d4c9b/4ad1b3f4?pwd=2gfet53lo4tr6lap6mrhufocus' failed: Error during WebSocket handshake: Unexpected response code: 405

I’m not sure where to look at… This is my jvb.conf (out-of-the-box):

videobridge {
  http-servers {
      public {
          port = 9090
      }
  }
  websockets {
      enabled = true
      domain = "EXTERNAL-MEETING-URL:443"
      tls = true
  }
}

What’s that port 9090? Do I have to adjust nginx config? Or is there a missing package I have to install?

The jitsi server was running fine since the update :face_with_raised_eyebrow:

Can you please give me any hint, or is this a known problem?

Kind regards

chris

#3 of the guide you listed points out the nginx change. If your JVB is hosted remotely, your nginx config will have to account for that as well.

Thanks Freddie!
Yes I did the nginx-changes in /etc/nginx/sites-available/LOCALSERVERNAME.conf (I didn’t remember…).
Here it is:

colibri (JVB) websockets for jvb1
location ~ ^/colibri-ws/default-id/(.*) {
proxy_pass http://127.0.0.1:9090/colibri-ws/default-id/$1$is_args$args;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
tcp_nodelay on;
}
And no, JVB is not hosted remotely. I just use a remote coturn server, but I think that doesn’t matter here.

Check your nginx log to see what errors are reported

Sorry, I only see those 2 errors in error.log:

2022/12/16 16:12:04 [error] 5268#5268: *4384 open() "/usr/share/jitsi-meet/lang/languages-de.json" failed (2: No such file or directory), client: CLIENT-IP, server: INTERNAL_SERVERNAME, request: "GET /lang/languages-de.json HTTP/1.1", host: "EXTRNAL-SERVERURL", referrer: "EXTRNAL-SERVERURL/test"

2022/12/16 16:12:04 [error] 5268#5268: *4369 open() "/usr/share/jitsi-meet/lang/translation-languages-de.json" failed (2: No such file or directory), client: CLIENT-IP, server: INTERNAL_SERVERNAME, request: "GET /lang/translation-languages-de.json HTTP/1.1", host: "EXTRNAL-SERVERURL", referrer: "EXTRNAL-SERVERURL/test"

But I guess it has nothing to do with the mentioned problem :thinking:

Happy new year!

Started working today… and enabled debug logging in nginx. In relation to the above mentioned “Unexpected response code: 405” I found this:

2023/01/09 10:04:03 [debug] 226464#226464: *205 HTTP/1.1 405 Method Not Allowed

Here is the complete part of the logfile:

2023/01/09 10:04:03 [debug] 226464#226464: *205 http cleanup add: 00005606EBDA6F30
2023/01/09 10:04:03 [debug] 226464#226464: *205 get rr peer, try: 1
2023/01/09 10:04:03 [debug] 226464#226464: *205 stream socket 18
2023/01/09 10:04:03 [debug] 226464#226464: *205 epoll add connection: fd:18 ev:80002005
2023/01/09 10:04:03 [debug] 226464#226464: *205 connect to 127.0.0.1:9090, fd:18 #206
2023/01/09 10:04:03 [debug] 226464#226464: *205 http upstream connect: -2
2023/01/09 10:04:03 [debug] 226464#226464: *205 posix_memalign: 00005606EBDBE850:128 @16
2023/01/09 10:04:03 [debug] 226464#226464: *205 event timer add: 18: 60000:2039873580
2023/01/09 10:04:03 [debug] 226464#226464: *205 http finalize request: -4, “/colibri-ws/default-id/1363200b0a46ded7/a82c8215?pwd=1k307omluf965qe8i3pnb01qa6” a:1, c:2
2023/01/09 10:04:03 [debug] 226464#226464: *205 http request count:2 blk:0
2023/01/09 10:04:03 [debug] 226464#226464: *205 http run request: “/colibri-ws/default-id/1363200b0a46ded7/a82c8215?pwd=1k307omluf965qe8i3pnb01qa6”
2023/01/09 10:04:03 [debug] 226464#226464: *205 http upstream check client, write event:1, “/colibri-ws/default-id/1363200b0a46ded7/a82c8215”
2023/01/09 10:04:03 [debug] 226464#226464: *205 http upstream request: “/colibri-ws/default-id/1363200b0a46ded7/a82c8215?pwd=1k307omluf965qe8i3pnb01qa6”
2023/01/09 10:04:03 [debug] 226464#226464: *205 http upstream send request handler
2023/01/09 10:04:03 [debug] 226464#226464: *205 http upstream send request
2023/01/09 10:04:03 [debug] 226464#226464: *205 http upstream send request body
2023/01/09 10:04:03 [debug] 226464#226464: *205 chain writer buf fl:1 s:750
2023/01/09 10:04:03 [debug] 226464#226464: *205 chain writer in: 00005606EBDA7070
2023/01/09 10:04:03 [debug] 226464#226464: *205 writev: 750 of 750
2023/01/09 10:04:03 [debug] 226464#226464: *205 chain writer out: 0000000000000000
2023/01/09 10:04:03 [debug] 226464#226464: *205 event timer del: 18: 2039873580
2023/01/09 10:04:03 [debug] 226464#226464: *205 event timer add: 18: 60000:2039873580
2023/01/09 10:04:03 [debug] 226464#226464: *205 http upstream request: “/colibri-ws/default-id/1363200b0a46ded7/a82c8215?pwd=1k307omluf965qe8i3pnb01qa6”
2023/01/09 10:04:03 [debug] 226464#226464: *205 http upstream process header
2023/01/09 10:04:03 [debug] 226464#226464: *205 malloc: 00005606EBD497B0:4096
2023/01/09 10:04:03 [debug] 226464#226464: *205 posix_memalign: 00005606EBDB55A0:4096 @16
2023/01/09 10:04:03 [debug] 226464#226464: *205 recv: eof:0, avail:1
2023/01/09 10:04:03 [debug] 226464#226464: *205 recv: fd:18 824 of 4096
2023/01/09 10:04:03 [debug] 226464#226464: *205 http proxy status 405 “405 Method Not Allowed”
2023/01/09 10:04:03 [debug] 226464#226464: *205 http proxy header: “Cache-Control: must-revalidate,no-cache,no-store”
2023/01/09 10:04:03 [debug] 226464#226464: *205 http proxy header: “Content-Type: text/html;charset=iso-8859-1”
2023/01/09 10:04:03 [debug] 226464#226464: *205 http proxy header: “Content-Length: 650”
2023/01/09 10:04:03 [debug] 226464#226464: *205 http proxy header: “Server: Jetty(11.0.10)”
2023/01/09 10:04:03 [debug] 226464#226464: *205 http proxy header done
2023/01/09 10:04:03 [debug] 226464#226464: *205 xslt filter header
2023/01/09 10:04:03 [debug] 226464#226464: *205 HTTP/1.1 405 Method Not Allowed
Server: nginx/1.14.2
Date: Mon, 09 Jan 2023 09:04:03 GMT
Content-Type: text/html;charset=iso-8859-1
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: must-revalidate,no-cache,no-store

I also changed the turn/turns ports in /etc/prosody/conf.d/SERVERNAME.cfg.lua from 443 to standard-ports - without success. We need our external turnserver for participants with restricted internet access - so I don’t understand how to use both, turn and websockets???

Prosody version:
prosody/oldstable,oldstable,now 0.11.2-1+deb10u4 amd64 [installiert,automatisch-entfernbar]

I don’t know how to fix the issue and kindly ask for assistance :pray:

Going back to your first post, the fact that you’re migrating from multiplexing now makes clear you were waaaaaaaaay too many versions behind. There have been so many changes since then that migrating may be more work than necessary. Probably easier to just do a fresh install. Also, you need Prosody 0.11.7+ (preferably 0.12) to run Jitsi now. That doesn’t upgrade by default, so you’ll need to add the Prosody repo and install that version from there.

Ok, a fresh install would be my fallback-solution…

Please help me to understand: In a new install, I will also configure our external turnserver running on port 443. Wouldn’t that be a problem regarding the sockets? Or is the usage of a turnserver obsolete?

Sorry, but that guide is not answering my question.

Moreover the guide says: “You need to enable the multiplexing (…)”

But this article FAQ | Jitsi Meet tells me to migrate away from multiplexing because it’s “proved to be problematic”.

So I’m confused :face_with_spiral_eyes:

IMO the article means ALPN based multiplexing. The recommended guide is not based on ALPN, it is based on server addresses (one for Jitsi and one for TURNS).

Thank you emrah

I upgraded to debian11 and updated all jitsi components including prosody.

jitsi-meet				2.0.8138-1
jitsi-meet-prosody		1.0.6854-1
jitsi-meet-turnserver	1.0.6854-1
jitsi-meet-web			1.0.6854-1
jitsi-meet-web-config	1.0.6854-1
jitsi-videobridge2		2.2-63-g252d14bc-1
lua-basexx				0.4.1-jitsi1
lua-cjson:amd64			2.1.0.10-jitsi1
prosody					0.12.2-1~bullseye1

I disabled websockets by commenting them out in jvb.conf since I do not understand why I need them.
So Jitsi is running fine again, without poor video issues.

Please help me to clarify:
Is it possible to use websockets and an external turnserver simultaneously?

These are two seperate topics. They don’t affect each other.

Ok. But I don’t understand, why I have to set turns port to default (5349) to enable websockets according to the guide FAQ | Jitsi Meet
I cannot set it from 443 to 5349 because my external turnserver is running on port 443.

That’s what makes me wonder…

You don’t because your situation is different. TURNS and jitsi-meet are not on the same server in your case.

I see. Thank you very much emrah!

So I will give websockets another try :+1:

1 Like

I’m not sure how exactly this magic works but i had the same issue and my Jitsi instance web part of which is served by nginx(1) located behind another nginx(2) that works as reverse proxy.
I’ve added

location ~ ^/colibri-ws/default-id/(.*) {
	proxy_pass http://<my_internal_jitsi_ip>:9090/colibri-ws/default-id/$1$is_args$args;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        tcp_nodelay on;
    }

to nginx(2) config in reverse proxy and this issue was solved for me. Other “locations” are still in nginx(1) config.

Thank you Dudki01, but I think I found what caused the error:
In our web-application-firewall (WAF) rule I had to activate the option Websocket Passthrough.
Thanks to emrah who pointed me to that in another thread:
Jitsi - mobile app (android or IOS) don’t connect to meetings - Jitsi Community Forum - developers & users

Is there any way to verify websockets working?

You may check the browser console log. There should be bridge errors for websocket issues