Problem with cloned jitsi / jibri pairs

Hello all,

I have a problem with the url being passed to jibri from a jitsi-meet server which has been cloned and domain changed.

Initially i have created a server pair, jitsi1.example.com and jibri1.example.com. I’ve done lots of customisation, both in standard config and within the code.

I then cloned these servers and created a new pair jitsi2.example.com and jibri2.example.com.

I changed the domain on jitsi2.example.com following a recent post here, updating the following

on the jibri server I simply changed the prod.xmpp.host.net to jitsi2.example.com

so as far as I am aware - I have changed all of the ‘public dns’ domains to use the new address and left all of the xmpp domains as per original setup - so that the xmpp config used for auth / internal / hidden domains etc do not need to be updated on each clone ( it is my plan to create many clones - but every so often this needs redoing as I make more changes to jitsi1.example.com I wish to roll out to all )

so … jitsi2.example.com works fine, secure-domain is still working etc (with users carried over from jitsi1)

However - I have problems with jibri2.example.com,
I has joined the muc on jitsi2 ok. and when is asked to start the stream it tries, however it seems to be given the jitsi1.example.com path for the room not jitsi2.example.com - is it being given a url derived from xmpp domains ? or have i missed a ‘public dns’ domain somewhere ??
NB : i can see it trying to join the room on jitsi1.example.com in the jicofo logs

any help would be appreciated - If I cant solve this then I am going to have to migrate all of the xmpp domains between clones, which probably also requires removing and re-adding all of the auth accounts etc - I’d like to avoid his if possible;

version wise I am on -

  • jitsi-meet/stable,now 2.0.4384-1

  • jitsi-meet-prosody/stable,now 1.0.3969-1

  • jitsi-meet-turnserver/stable,now 1.0.3969-1

  • jitsi-meet-web/stable,now 1.0.3969-1

  • jitsi-meet-web-config/stable,now 1.0.3969-1

  • jitsi-videobridge2/stable,now 2.1-164-gfdce823f-1

  • jibri/stable,now 8.0-14-g0ccc3f6-1

below is a Jibri log snippet illustrating the problem

  • I guess that the code behind nginx does not know that the new domain exists … hence the URL being passed to jibri for the room is based on the old URL not the new one ?

==> click start stream <==

2020-04-28 09:42:25.564 INFO: [90] org.jitsi.jibri.api.xmpp.XmppApi.handleJibriIq() Received JibriIq from environment [MucClient id=jitsi2.example.com hostname=jitsi2.example.com]

2020-04-28 09:42:25.564 INFO: [90] org.jitsi.jibri.api.xmpp.XmppApi.handleStartJibriIq() Received start request
2020-04-28 09:42:25.565 INFO: [90] org.jitsi.jibri.api.xmpp.XmppApi.handleStartJibriIq() Sending ‘pending’ response to start IQ
2020-04-28 09:42:25.566 INFO: [91] org.jitsi.jibri.api.xmpp.XmppApi.run() Starting service

2020-04-28 09:42:25.566 INFO: [91] org.jitsi.jibri.api.xmpp.XmppApi.handleStartService() Parsed call url info: CallUrlInfo(baseUrl=https://jitsi1.example.com, callName=ajtest, urlParams=)
2020-04-28 09:42:25.723 INFO: [91] org.jitsi.jibri.JibriManager.startStreaming() Starting a stream with params: ServiceParams(usageTimeoutMinutes=0, appData=null) StreamingParams(callParams=CallParams(callUrlInfo=CallUrlInfo(baseUrl=https://jitsi1.example.com, callName=ajtest, urlParams=)), sessionId=dgzxxiyxsfytcsof, callLoginParams=XmppCredentials(domain=recorder.jitsi1.example.com, username=recorder, password=blahblahblah), youTubeStreamKey=my_private_stream_key, youTubeBroadcastId=null)

2020-04-28 09:42:25.723 FINE: [91] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.() Detected os as OS: LINUX
2020-04-28 09:42:26.140 INFO: [91] org.openqa.selenium.remote.ProtocolHandshake.createSession() Detected dialect: OSS
2020-04-28 09:42:26.144 INFO: [91] org.jitsi.jibri.selenium.JibriSelenium.() Starting empty call check with a timeout of PT30S
2020-04-28 09:42:26.285 FINE: [91] org.jitsi.jibri.statsd.JibriStatsDClient.incrementCounter() Incrementing statsd counter: start:live_stream
2020-04-28 09:42:26.285 INFO: [91] org.jitsi.jibri.status.JibriStatusManager.log() Busy status has changed: IDLE -> BUSY
2020-04-28 09:42:26.285 INFO: [91] org.jitsi.jibri.api.xmpp.XmppApi.updatePresence() Jibri reports its status is now JibriStatus(busyStatus=BUSY, health=OverallHealth(healthStatus=HEALTHY, details={})), publishing presence to connections
2020-04-28 09:42:26.285 INFO: [91] org.jitsi.xmpp.mucclient.MucClientManager.log() Setting a presence extension: org.jitsi.xmpp.extensions.jibri.JibriStatusPacketExt@699f2a35

2020-04-28 09:42:27.210 FINE: [101] org.jitsi.jibri.selenium.pageobjects.CallPage.visit() Visiting url https://jitsi1.example.com/ajtest#config.iAmRecorder=true&config.externalConnectUrl=null&config.startWithAudioMuted=true&config.startWithVideoMuted=true&interfaceConfig.APP_NAME=“Jibri”&config.analytics.disabled=true&config.p2p.enabled=false

==> start stream fails <==

2020-04-28 09:42:58.120 SEVERE: [101] org.jitsi.jibri.selenium.pageobjects.CallPage.visit() Timed out waiting for call page to load
2020-04-28 09:42:58.121 INFO: [101] org.jitsi.jibri.selenium.JibriSelenium.onSeleniumStateChange() Transitioning from state Starting up to Error: SESSION Failed to join call
2020-04-28 09:42:58.121 INFO: [101] org.jitsi.jibri.service.impl.StreamingJibriService.onServiceStateChange() Streaming service transitioning from state Starting up to Error: SESSION Failed to join call
2020-04-28 09:42:58.121 INFO: [101] org.jitsi.jibri.api.xmpp.XmppApi.invoke() Current service had an error, sending error iq

Hello,

In the end I have cheated my way out of this problem - notes below in case anyone else is in the same boat. I would still like to resolve this underlying issue ( room url passed to jibri ) but for now here is the work around ( based on post referenced below )

  • Accept that jibri2.example.com is going to be given jits1.example.com for room URL
  • JIBRI2 : Use /etc/hosts on jibri2 to point jitsi1.example.com at IP for jitsi2.example.com (so request goes to correct server)
  • JITSI2 : Configure nginx on jitsi2.example.com to be happy to serve requests for jitsi1.example.com ( add jitsi1.example.com after jitsi2.example.com for server_name in nginx conifg - twice http and https)
  • JITSI2 : Update /etc/jitsi/meet/jitsi1.example.com-config.js change the BOSH url to '//<!--# echo var="http_host" -->/<!--# echo var="subdir" default="" -->http-bind' - this will use a server side include to populate these value to match the requested domain (by nginx) so they will work with both jitsi1 and jitsi2 requests
  • JITSI2 : Restart nginx

this is not ideal - but it works, and right now I’ll happily take that.
The solution is built on the Same Jitsi-Meet instance with multiple domain names thread / post - so thankyou to @damencho for that