[ASK] XMPP Websocket Configuration

Hi Team,

I’m having trouble setup jitsi meet with xmpp-websocket configuration:

but on client side I’m still having error:

strophe.umd.js:5463 WebSocket connection to 'wss://example.com/xmpp-websocket?room=jointworkplacesapproachquickly' failed: Error during WebSocket handshake: Unexpected response code: 403
_connect @ strophe.umd.js:5463
Logger.js:154 2020-04-06T02:33:56.440Z [JitsiMeetJS.js] <Object.getGlobalOnErrorHandler>:  UnhandledError: null Script: null Line: null Column: null StackTrace:  Error: Strophe: Websocket error [object Event]
    at Object.i.Strophe.log (strophe.util.js:89)
    at Object.error (strophe.umd.js:1392)
    at N.Websocket._onError (strophe.umd.js:5730)

Did I miss something here ? please advise.

My Configuration:

  1. using latest stable
  2. Environment: Ubuntu 18.04 LTS
  3. apt install --no-install-recommends jitsi-meet
  4. set prodosy config : modules_enabled = { “websocket”; }
  5. https://gist.github.com/maps90/e06043734cda7bb67392ce2599ae25d4

Log

jvb.log

2020-04-06 11:08:42.737 INFO: [16] Videobridge.createConference#326: create_conf, id=2c1b776b810f3c2b gid=null logging=false
2020-04-06 11:08:42.740 INFO: [16] Health.doRun#294: Performed a successful health check in 3ms. Sticky failure: false

jicofo.log

Jicofo 2020-04-06 01:59:34.059 INFO: [11] org.eclipse.jetty.server.handler.ContextHandler.doStart() Started o.e.j.s.ServletContextHandler@5fb03dae{/,null,AVAILABLE}
Jicofo 2020-04-06 01:59:34.094 INFO: [11] org.eclipse.jetty.server.AbstractConnector.doStart() Started MuxServerConnector@2eea8028{HTTP/1.1,[http/1.1]}{0.0.0.0:8888}
Jicofo 2020-04-06 01:59:34.095 INFO: [11] org.eclipse.jetty.server.Server.doStart() Started @2702ms
Jicofo 2020-04-06 01:59:34.099 INFO: [1] org.jitsi.impl.configuration.ConfigurationServiceImpl.log() org.jitsi.jicofo.BRIDGE_MUC=JvbBrewery@internal.auth.example.loc
Jicofo 2020-04-06 01:59:34.099 INFO: [1] org.jitsi.impl.configuration.ConfigurationServiceImpl.log() net.java.sip.communicator.impl.protocol.jabber.extensions.caps.EntityCapsManager.CAPS.http://prosody.im#wBlvgkM1+mhpz81eJoge4hYoI0Q==<query xmlns='http://jabber.org/protocol/disco#info' node='http://prosody.im#wBlvgkM1+mhpz81eJoge4hYoI0Q='><identity category='server' name='Prosody' type='im'/><identity category='pubsub' name='Prosody' type='pep'/><feature var='urn:xmpp:carbons:2'/><feature var='jabber:iq:register'/><feature var='vcard-temp'/><feature var='http://jabber.org/protocol/commands'/><feature var='jabber:iq:roster'/><feature var='urn:xmpp:time'/><feature var='jabber:iq:time'/><feature var='jabber:iq:private'/><feature var='urn:xmpp:ping'/><feature var='urn:xmpp:blocking'/><feature var='msgoffline'/><feature var='http://jabber.org/protocol/disco#info'/><feature var='http://jabber.org/protocol/disco#items'/><feature var='jabber:iq:version'/><feature var='jabber:iq:last'/><feature var='http://jabber.org/protocol/pubsub#publish'/></query>
Jicofo 2020-04-06 01:59:34.106 INFO: [1] org.jitsi.xmpp.component.ComponentBase.log() Component org.jitsi.jicofo. config:
Jicofo 2020-04-06 01:59:34.107 INFO: [1] org.jitsi.xmpp.component.ComponentBase.log()   ping interval: 10000 ms
Jicofo 2020-04-06 01:59:34.107 INFO: [1] org.jitsi.xmpp.component.ComponentBase.log()   ping timeout: 5000 ms
Jicofo 2020-04-06 01:59:34.107 INFO: [1] org.jitsi.xmpp.component.ComponentBase.log()   ping threshold: 3
Jicofo 2020-04-06 02:00:03.333 INFO: [31] org.jitsi.jicofo.ComponentsDiscovery.log() New component discovered: focus.meet.example.loc, null

Hi any suggestion?

after adding JVB_OPTS="–apis=rest,xmpp" I’m getting error like this:

2020-04-07 11:40:05.775 SEVERE: [36] ComponentMain.lambda$getConnectCallable$0#293: host-unknown, host:localhost, port:5347
org.xmpp.component.ComponentException: host-unknown
	at org.jivesoftware.whack.ExternalComponent.connect(ExternalComponent.java:243)
	at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentManager.java:242)
	at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentManager.java:222)
	at org.jitsi.meet.ComponentMain.lambda$getConnectCallable$0(ComponentMain.java:285)
	at org.jitsi.retry.RetryStrategy$TaskRunner.run(RetryStrategy.java:193)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
2020-04-07 11:40:06.875 INFO: [28] Videobridge.createConference#326: create_conf, id=bf9cb8bdb65575d0 gid=null logging=false
2020-04-07 11:40:06.888 INFO: [28] Health.doRun#294: Performed a successful health check in 13ms. Sticky failure: false

/etc/prosody/conf.d/localhost.cfg.lua

-- Section for localhost

-- This allows clients to connect to localhost. No harm in it.
VirtualHost "localhost"

/etc/jitsi/videobridge# netstat -anp | grep lua
tcp 0 0 0.0.0.0:5269 0.0.0.0:* LISTEN 23084/lua5.1
tcp 0 0 0.0.0.0:5280 0.0.0.0:* LISTEN 23084/lua5.1
tcp 0 0 0.0.0.0:5347 0.0.0.0:* LISTEN 23084/lua5.1
tcp 0 0 0.0.0.0:5222 0.0.0.0:* LISTEN 23084/lua5.1
tcp 0 0 127.0.0.1:5222 127.0.0.1:39696 ESTABLISHED 23084/lua5.1
tcp 0 0 127.0.0.1:5347 127.0.0.1:54736 ESTABLISHED 23084/lua5.1
tcp 0 0 127.0.0.1:5222 127.0.0.1:39702 ESTABLISHED 23084/lua5.1
tcp6 0 0 :::5269 :::* LISTEN 23084/lua5.1
tcp6 0 0 :::5280 :::* LISTEN 23084/lua5.1
tcp6 0 0 :::5222 :::* LISTEN 23084/lua5.1

error on Prosody:

type status description
portmanager error Failed to open server port 5347 on ::1, Cannot assign requested address
Apr 07 13:14:29 portmanager error Error binding encrypted port for https: No key present in SSL/TLS configuration for https port 5281
Apr 07 13:14:29 portmanager error Error binding encrypted port for https: No key present in SSL/TLS configuration for https port 5281

any suggestion ?

Finally get it to work:

  1. in /etc/prosody/conf.d/example.com.lua (to fix the websocket 403)

    consider_websocket_secure = true;
    cross_domain_websocket = true;
    component_interfaces = { “0.0.0.0” };

    Component “jitsi-videobridge.example.com” component_secret = “XXXXXX” (to fix host unknown)

NOTE: XXXXXX should match with org.jitsi.videobridge.xmpp.user.shard.PASSWORD or
in /var/lib/prosody/auth%2emeet%2eexample%2ecom/accounts/jvb.dat

  1. set JICOFO_HOST and JVB_HOST to private IP not localhost (to fix host unknown / connection refused)

Hello, after I tried the solution you mentioned, there are still problems. Your https://gist.github.com/maps90/e06043734cda7bb67392ce2599ae25d4 does not seem to be the final solution. Can you share the latest configuration?