docker-jitsi-meet icon indicating copy to clipboard operation
docker-jitsi-meet copied to clipboard

websocket connection failed

Open prathibhacdac opened this issue 1 year ago • 22 comments

websocket connection xmpp-websocket failed.

prathibhacdac avatar Apr 13 '23 00:04 prathibhacdac

It's impossible to help you without any logs.

Are you running behind a reverse proxy? Did you make sure WebSocket connections are proxied?

saghul avatar Apr 13 '23 06:04 saghul

The above issue is resolved by adding ENABLE_HTTP_REDIRECT=1 in .env But now I am getting the following error: Video is not getting displayed WebSocket connection to 'wss://bp.erss.in/colibri-ws/172.28.0.5/3f45edae982d3a91/082e38a9?pwd=7kivrblerg80eh5a7gq5va2e53' failed:

prathibhacdac avatar Apr 13 '23 07:04 prathibhacdac

I'm getting the error message on the web page as:

"The bridge channel has been disconnected and thus video quality is limited to its lowest setting."

prathibhacdac avatar Apr 13 '23 07:04 prathibhacdac

Looks like communication with the JVB container is not working.

saghul avatar Apr 13 '23 07:04 saghul

How to resolve this?

prathibhacdac avatar Apr 13 '23 07:04 prathibhacdac

Start by checking the logs.

saghul avatar Apr 13 '23 08:04 saghul

It is not taking the port 9090.

wss://bp.erss.in/colibri-ws It should be wss://bp.erss.in:9090/colibri-ws How to resolve this?

prathibhacdac avatar Apr 13 '23 08:04 prathibhacdac

which log should I check?

prathibhacdac avatar Apr 13 '23 09:04 prathibhacdac

The JVB container logs.

saghul avatar Apr 13 '23 09:04 saghul

I faced to same message "The bridge channel has been disconnected and thus video quality is limited to its lowest setting.".

Screenshot 2023-09-08 at 22 37 04

My usecase:

  • Jitsi server is Raspberry pi 4 model B 8GB.
  • OS: Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
  • Jitsi works by self hosted with Docker container (jitsi/jvb, jicofo, prosody, web stable-8719)
  • When connected 2 clients of Chrome browser(Version 116.0.5845.140 (Official Build) (x86_64)) is no problem. I mean video and audio can be communicated.
  • When connected 3 clients, that message shows me and stop video and audio automatically.
  • If I disconnected one of clients, restart video and audio automatically.

Firstly, I confirmed similar error message such as 'wss://bp.erss.in/colibri-ws/172.28.0.5/3f45edae982d3a91/082e38a9?pwd=7kivrblerg80eh5a7gq5va2e53' on Chrome Inspector shown and then I fixed it.

But "The bridge channel has been disconnected and thus video quality is limited to its lowest setting." message is still here after fixed WebSocket error.

How can I fix it?

UPDATED If I enter local IP for jitsi server to Chrome browser or access from only local, 3 connections video and audio are available. This is based on Jitsi document for JVB_ADVERTISE_IPS.

But if I access over internet, I can't yet. Document is writing "The public IP address is attempted to be discovered via STUN. STUN servers can be specified with the JVB_STUN_SERVERS option.". For JVB_STUN_SERVERS is set default value with stun.l.google.com:19302, stun1.l.google.com:19302, stun2.l.google.com:19302. So I don't need to specify by myself in my understanding.

kunimasu avatar Sep 08 '23 13:09 kunimasu

i'm also getting the error from the screenshot above .

i enter a session from webbrowser which works and as soon as i join the session from mobile phone, i'm getting this message in webbrowser

devZer0 avatar Sep 11 '23 09:09 devZer0

STUN might fail so you can put in your public IP address in JVB_ADVERTISE_IPS

saghul avatar Sep 11 '23 09:09 saghul

i have no public ip, i'm behind reverse proxy and can only use a fqhn, as the proxy does named based virtual host resolution

i would like to have used dedicated ip for public ip of jitsi, but ipv4 ip adresses have gotten very expensive in 2023

devZer0 avatar Sep 11 '23 10:09 devZer0

You would need to use a damenon to monitor the IP and update the config and reload.

saghul avatar Sep 11 '23 12:09 saghul

jitsi-jvb-1        | JVB 2023-09-11 23:16:25.309 INFO: [12] org.ice4j.ice.harvest.MappingCandidateHarvesters.initialize: Adding a static mapping: StaticMapping(localAddress=172.19.0.7, publicAddress=192.168.11.5, localPort=null, publicPort=null, name=ip-0)
jitsi-jvb-1        | JVB 2023-09-11 23:16:26.236 INFO: [12] org.ice4j.ice.harvest.MappingCandidateHarvesters.initialize: Adding a static mapping: StaticMapping(localAddress=172.19.0.7, publicAddress=126.5.249.7, localPort=null, publicPort=null, name=ip-1)
jitsi-jvb-1        | JVB 2023-09-11 23:16:26.238 INFO: [12] org.ice4j.ice.harvest.MappingCandidateHarvesters.initialize: Adding a static mapping: StaticMapping(localAddress=172.19.0.7, publicAddress=133.10.30.168, localPort=null, publicPort=null, name=ip-2)

I setup JVB_ADVERTISE_IPS as above logs.

One of remote video try to show? Because I saw one of remote video became to black. After seconds, returned to my name.

Screenshot_20230911-232505

kunimasu avatar Sep 11 '23 14:09 kunimasu

Check the app logs, it's likely a connection problem with the JVB.

saghul avatar Sep 11 '23 14:09 saghul

which app logs? I launched jvb, jicofo, prosody, web on Docker. And clients are chrome web browser. should I check console on browser inspector?

kunimasu avatar Sep 12 '23 00:09 kunimasu

If the mobile app is the one having trouble, the mobile app logs. If you can reproduce the problem with desktop browsers. it's easier to debug there, check the JS console logs.

saghul avatar Sep 12 '23 08:09 saghul

@saghul

STUN might fail so you can put in your public IP address in JVB_ADVERTISE_IPS

something behind a reverse proxy (as described here: https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-docker/#running-behind-a-reverse-proxy ) should not advertise an ip address to a client, as reverse proxy is http(s) and what's http(s) should be able to be routed by the reverse proxy based on http name based virtual host or ssl server name indication.

so, if jitsi will need specific public ip adress for jvb and if the proxy should route/forward that without inspecting http host name , then jitsi is not really suitable for reverse proxy. it's nat port-translation / tcp port forwarding then but not http reverse proxying at application level

devZer0 avatar Sep 12 '23 10:09 devZer0

That only refers to HTTP traffic indeed.

The JVB host IP is necessary for ICE to work, which goes over UDP and has nothing to do with reverse proxies.

saghul avatar Sep 12 '23 10:09 saghul

mhh, ok. wouldn't it make sense that we need forward udp via nat/tcp-forwarding besides http reverse proxy?

https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-docker/#running-behind-a-reverse-proxy does not mention that.

is there a better place with a description what to do if jitsi server is not installed with public ip but if there is some firewall in like opnsense in front of it?

devZer0 avatar Sep 12 '23 11:09 devZer0

It's mentioned here: https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-docker/#external-ports

It's not mentioned in the recerse-proxy section, because it has nothing to do with it.

saghul avatar Sep 12 '23 11:09 saghul