New install: can't get local client to work

Hi,

New user here. Trying to get jitsi working inside docker.
I used the official guide.
When connecting locally using chrome, I can’t even get 1 client to connect.
Seeing these errors in JS console:

WebSocket connection to 'wss://http//192.168.0.121/xmpp-websocket?room=toto' failed: Error in connection establishment: net::ERR_NAME_NOT_RESOLVED

my env is:

# Exposed HTTP port
HTTP_PORT=8001

# Exposed HTTPS port
HTTPS_PORT=8443

# System time zone
TZ=Europe/Paris

# Public URL for the web service (required)
PUBLIC_URL=http://192.168.0.121

# IP address of the Docker host
# See the "Running behind NAT or on a LAN environment" section in the Handbook:
# https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-docker#running-behind-nat-or-on-a-lan-environment
DOCKER_HOST_ADDRESS=192.168.0.121

Not sure where to look next.

I am using external nginx and Let’sEncrypt certificate.

The only error/warning I see in the logs are in prosody logs:

startup             info	Hello and welcome to Prosody version 0.11.7
startup             info	Prosody is using the epoll backend for connection handling
muc.meet.jitsi:tls  info	Certificates loaded
auth.meet.jitsi:tls  info	Certificates loaded
portmanager          info	Activated service 'c2s' on [*]:5222, [::]:5222
portmanager          info	Activated service 'legacy_ssl' on no ports
general              info	Starting speakerstats for muc.meet.jitsi
speakerstats.meet.jitsi:speakerstats_component  info	Hook to muc events on muc.meet.jitsi
speakerstats.meet.jitsi:tls                     info	Certificates loaded
meet.jitsi:auth_token                           warn	WARNING - empty tokens allowed
meet.jitsi:tls                                  info	Certificates loaded
portmanager                                     info	Activated service 'http' on [*]:5280, [::]:5280
portmanager                                     info	Activated service 'https' on no ports
portmanager                                     info	Activated service 'component' on [*]:5347
focus.meet.jitsi:tls                            info	Certificates loaded
recorder.meet.jitsi:tls                         info	Certificates loaded
general                                         info	Starting conference duration timer for muc.meet.jitsi
conferenceduration.meet.jitsi:conference_duration_component  info	Hook to muc events on muc.meet.jitsi
conferenceduration.meet.jitsi:tls                            info	Certificates loaded
internal-muc.meet.jitsi:tls                                  info	Certificates loaded
c2s5595d0d215c0                                              info	Client connected
c2s5595d0e752f0                                              info	Client connected
c2s5595d0d215c0                                              info	Stream encrypted (TLSv1.2 with ECDHE-RSA-AES256-GCM-SHA384)
c2s5595d0d215c0                                              info	Authenticated as jvb@auth.meet.jitsi
c2s5595d0e752f0                                              info	Stream encrypted (TLSv1.2 with ECDHE-RSA-AES256-GCM-SHA384)
c2s5595d0e752f0                                              info	Authenticated as focus@auth.meet.jitsi
focus.meet.jitsi:component                                   warn	Component not connected, bouncing error for: <iq from='focus@auth.meet.jitsi/focus7781682383236430' id='Fvx7Z-44' to='focus.meet.jitsi' type='get'>
jcp5595d0e4ce50                                              info	Incoming Jabber component connection
focus.meet.jitsi:component                                   info	External component successfully authenticated
c2s5595d0d23f40                                              info	Client connected
c2s5595d0d23f40                                              info	Client disconnected: closed
c2s5595d0ecf240                                              info	Client connected
c2s5595d0ecf240                                              info	Client disconnected: closed
c2s5595d1034df0                                              info	Client connected

Seems it’s working from outside my LAN (I used 4G smartphone), but not internally on local LAN.

What needs to be done to have local LAN connection working? Where should I look?
thanks

This is wrong. Not sure what is the syntax in that file for PUBLIC_URL=http://192.168.0.121 but the wss link should be: wss://192.168.0.121/....

True. Thanks @damencho
I have modified that to use my domain name: https//jitsi.domain.com
This works fine for external users, but doesn’t work from my LAN.

Here is the console error I am getting now when using https//jisti.domain.com from inside my lan:

lib-jitsi-meet.min.js?v=4466:1 WebSocket connection to 'wss://192.168.0.121/xmpp-websocket?room=newconf' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

Here is the console error I am getting now when using http://192.168.0.121/ from inside my lan:

2021-01-22T18:54:22.780Z [features/base/tracks] Failed to create local tracks ["audio"] TypeError: Cannot read property 'getUserMedia' of undefined
    at lib-jitsi-meet.min.js?v=4466:1
    at new Promise (<anonymous>)
    at Y._newGetUserMediaWithConstraints (lib-jitsi-meet.min.js?v=4466:1)
    at Y.<anonymous> (lib-jitsi-meet.min.js?v=4466:1)

lib-jitsi-meet.min.js?v=4466:1 WebSocket connection to 'wss://192.168.0.121/xmpp-websocket?room=testaaa' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

2021-01-22T18:55:24.052Z [JitsiMeetJS.js] <Object.getGlobalOnErrorHandler>:  UnhandledError: null Script: null Line: null Column: null StackTrace:  Error: Strophe: Websocket error [object Event]
    at Object.r.Strophe.log (lib-jitsi-meet.min.js?v=4466:17)
    at Object.error (lib-jitsi-meet.min.js?v=4466:1)
    at N.Websocket._onError (lib-jitsi-meet.min.js?v=4466:1)

2021-01-22T18:55:24.053Z [modules/xmpp/strophe.util.js] <Object.r.Strophe.log>:  Strophe: Websocket error [object Event]

app.bundle.min.js?v=4466:110 2021-01-22T18:55:56.121Z [connection.js] <a.d>:  CONNECTION FAILED: connection.otherError

2021-01-22T18:56:27.905Z [features/base/connection] connection.otherError

I’m not sure how this can work for external participants but not for internal: 'wss://192.168.0.121/xmpp-websoc … where it uses the private address, it should be the other way around?

Not sure I understand your comment (pardon my ignorance)
But internally, I use local DNS, and reverse proxy on my NAS.
Domain name is resolved and sent to reverse proxy, which sends back to jitsi docker.

I don’t understand how external client can make a connection to 192.168… address which is your setting according to your logs.

The logs I’m sharing are not the logs from external clients.

Here are my testings:

  1. Connect using 4G smartphone to my server using Jitsi Meet Android app: working (single client)
  2. 3 smartphone clients using Android Jitsi Meet app: 2 inside LAN using Wifi + 1 over 4G => Working except video on 4G (maybe UDP is filtered…)
  3. 3 smartphone clients inside LAN using Android Jitsi Meet app: working fine
  4. Trying to use Mac thru Chrome or Safari inside LAN: constantly disconnects (logs in above posts).
  5. Trying to use Mac thru Chrome or Safari over 4G connection: connection starts fine, but getting disconnect after 20-30 seconds.

So it seems I’m facing using using Chrome on Mac or PC.
Also tried Electron App on Mac, same issue.

Seems something is blocking connecting to this address to port 443.

Solved using this: ServiceWorker won't activate since it's served with text/html mime type · Issue #831 · jitsi/docker-jitsi-meet · GitHub

More that 2 users seems to work locally. However, when 2 users on LAN & I external user, I get no video/sound. Need more investigation.

Edit: UDP port 10000 was NATed to wrong machine :smile: