Change subdomain

Hello,
Thanks to the Jitsi team for the great job.

I have installed my own server. It works well.
I’m looking for the best way to change my subdomain without reinstalling everything if possible.
xxxx.domain.net → meet yyyy.domain.net
I have found topics that talk about changing the domain but no subdomain.

Jitsi-meet 2.0.5390-3.
Prosody 0.11.8-1 ~ bionic1.
Nginx https
Secure domain (ldap2)
Thank you

sudo dpkg-reconfigure jitsi-videobridge2

1 Like

thanks Freddie,
it helped me. it works.
i also modified the file jvb.conf and the line : bosh: ‘//xxxx.domain.net/http-bind’ in config.js

1 Like

Thanks @Freddie @ajj75012 for this post. I had a similar issue and this solved it.
Just one question, I’m trying to automate this without having to input the new domain manually.
Is there any way I can call dpkg-reconfigure without having to type in the new domain in the GUI input box?

Found the solution. For anyone trying to do this you can follow the below steps:

  1. apt install debconf-utils
  2. debconf-get-selections | grep jitsi-videobridge/jvb-hostname > jvbselections.conf
  3. sed -i 's/a.example.com/b.example.com/g' jvbselections.conf
  4. dpkg-reconfigure jitsi-videobridge2 -f noninteractive
  5. /etc/jitsi/meet/b.example.com-config.js → change bosh url
  6. /etc/jitsi/videobridge/jvb.conf → change all a.example.com to b.example.com

@Freddie any idea what should be the changes to conf for a jibri instance hosted on a different server?
Thanks

Make sure port 5222 is open and accessible by Jibri on the JMS.

Yes, it is. I was able to access jibri before changing the subdomain on the jitsi-meet instance. In the /etc/hosts file for jibri I pointed the old subdomain to the IP for my jitsi instance. But jibri gives a timeout error:

2021-06-15 12:13:55.145 SEVERE: [52] org.jitsi.jibri.selenium.pageobjects.CallPage.log() Timed out waiting for call page to load

I also tried changing different combinations in the jibri.conf from old domain to the new domain but that’s not working either.
The domain name is specified in jibri.conf at 4 places:

xmpp-server-hosts = [ “oldsubdom.example.com” ]
xmpp-domain = “oldsubdom.example.com
control-muc {
domain = “internal.auth.oldsubdom.example.com
room-name = “JibriBrewery”
nickname = “Live”
}
control-login {
domain = “auth.oldsubdom.example.com
username = “jibri”
password = “jibriauthpass”
}
call-login {
domain = “recorder.oldsubdom.example.com
username = “recorder”
password = “jibrirecorderpass”
}

Can you please help about which particular domain I should change in jibri.conf to the new domain?

I’m still struggling with this.
Here is what I tried:

  1. Changing only xmpp-* in jibri.conf. No error on restarting jibri. When stream starts immediate error:
org.jitsi.jibri.util.CallUrlInfoFromJidException: Unable to extract 
call url info from Jid darkfuturesformthus@conference.oldsubdom.example.com (stripFromRoomDomain = conference., xmppDomain = newsubdom.example.com)
        at org.jitsi.jibri.util.XmppUtilsKt.getCallUrlInfoFromJid(Xm
ppUtils.kt:58)
        at org.jitsi.jibri.api.xmpp.XmppApi.handleStartService(XmppA
pi.kt:285)
        at org.jitsi.jibri.api.xmpp.XmppApi.handleStartJibriIq(XmppA
pi.kt:198)
        at org.jitsi.jibri.api.xmpp.XmppApi.handleJibriIq(XmppApi.kt
:170)
        at org.jitsi.jibri.api.xmpp.XmppApi.handleIq(XmppApi.kt:152)
        at org.jitsi.xmpp.mucclient.MucClient.handleIq(MucClient.jav
a:569)
        at org.jitsi.xmpp.mucclient.MucClient.access$800(MucClient.j
ava:50)
        at org.jitsi.xmpp.mucclient.MucClient$2.handleIQRequest(MucC
lient.java:533)
        at org.jivesoftware.smack.AbstractXMPPConnection$4.run(Abstr
actXMPPConnection.java:1188)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
2021-06-15 09:23:47.807 INFO: [42] org.jitsi.jibri.api.xmpp.XmppApi.log() Received JibriIq <iq to='jibri@auth.oldsubdom.example.com/8CFzGD-f' from='jibribrewery@internal.auth.oldsubdom.example.com/focus' id='amlicmlAYXV0aC5iLmJvcmRlcmZyZWUubGl2ZS84Q0Z6R0QtZgBNVHBaWC03OABueWhycJYb2RQQ+zpMA03h' type='set'><jibri xmlns='http://jitsi.org/protocol/jibri' action='start' recording_mode='stream' room='darkfuturesformthus@conference.oldsubdom.example.com' streamid='hellow1' session_id='gxyirkesqjcrwavd'/></iq> from environment [MucClient id=newsubdom.example.com hostname=newsubdom.example.com]
2021-06-15 09:23:47.807 INFO: [42] org.jitsi.jibri.api.xmpp.XmppApi.log() Received start request, starting service
2021-06-15 09:23:47.807 SEVERE: [42] org.jitsi.jibri.api.xmpp.XmppApi.log() Error starting Jibri service
  1. Changed only xmpp-server-hosts. No error on restart. Does not fail immediately. After ~30 sec of clicking on start streaming it fails with below timeout error: The visited URL by selenium is the old URL (oldsubdom.example.com):
JibriSelenium.log() An error o
ccurred while joining the call
org.openqa.selenium.TimeoutException: timeout: Timed out receiving message from renderer: -0
.000
  1. Change only xmpp-domain
2021-06-15 10:06:33.417 WARNING: [28] org.jitsi.xmpp.mucclient.MucClient.log() [MucClient id=oldsubdom.example.com hostname=oldsubdom.example.com] error connecting
org.jivesoftware.smack.SmackException$ConnectionException: The following addresses failed: 'oldsubdom.example.com:5222' failed because: oldsubdom.example.com/1.2.3.4 exception: java.net.SocketTimeoutException: connect timed out
  1. Change xmpp-* and control-muc
2021-06-15 10:52:20.266 SEVERE: [28] org.jivesoftware.smack.AbstractXMPPConnection.callConnectionAuthenticatedListener() Exception in authenticated listener
Caused by: org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPP error reply received from internal.auth.newsubdom.example.com: XMPPError: remote-server-not-found - cancel. Generated by auth.oldsubdom.example.com
        at org.jivesoftware.smack.XMPPException$XMPPErrorException.ifHasErrorThenThrow(XMPPException.java:132)
        at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:263)
        at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:214)
        at org.jivesoftware.smackx.disco.ServiceDiscoveryManager.discoverInfo(ServiceDiscoveryManager.java:540)
        at org.jivesoftware.smackx.disco.ServiceDiscoveryManager.discoverInfo(ServiceDiscoveryManager.java:506)
        at org.jivesoftware.smackx.disco.ServiceDiscoveryManager.supportsFeatures(ServiceDiscoveryManager.java:748)
        at org.jivesoftware.smackx.disco.ServiceDiscoveryManager.supportsFeatures(ServiceDiscoveryManager.java:744)
        at org.jivesoftware.smackx.disco.ServiceDiscoveryManager.supportsFeature(ServiceDiscoveryManager.java:740)
        at org.jivesoftware.smackx.muc.MultiUserChatManager.providesMucService(MultiUserChatManager.java:361)
        at org.jivesoftware.smackx.muc.MultiUserChat.enter(MultiUserChat.java:311)
        at org.jivesoftware.smackx.muc.MultiUserChat.createOrJoin(MultiUserChat.java:498)
        at org.jivesoftware.smackx.muc.MultiUserChat.createOrJoin(MultiUserChat.java:444)
        at org.jitsi.xmpp.mucclient.MucClient$MucWrapper.join(MucClient.java:769)
        at org.jitsi.xmpp.mucclient.MucClient$MucWrapper.access$700(MucClient.java:698)
        at org.jitsi.xmpp.mucclient.MucClient.joinMucs(MucClient.java:389)
        at org.jitsi.xmpp.mucclient.MucClient.access$200(MucClient.java:50)
        at org.jitsi.xmpp.mucclient.MucClient$1.authenticated(MucClient.java:283)
        ... 14 more

I’m not sure if this is the right approach to make jibri work after updating subdomain in JMS with dpkg-reconfigure. Unfortunately, purge reinstall is not an option for me for this setup. @Freddie @damencho would really appreciate it if I could get any pointers on how to proceed with this.

Just to clarify:

  1. My setup has jitsi jibri hosted on 2 separate servers. This setup works perfectly.
  2. Now I changed the subdomain of JMS using steps mentioned above in this post

After this I tried:

  1. Editing /etc/hosts of Jibri instance to point the old domain to the IP of JMS - This give a timeout in jibri logs after trying for 30-40 seconds. (Note: ping oldsubdom.example.com works)
  2. Editing jibri.conf to new subdomain throws errors.

Did you change the domain name in your cfg.lua? Did you register the necessary Jibri accounts with the new domain name?

I did that previously but didn’t capture the errors. I’ll post them shortly.

Since we are updating the Jibri account to new domain that means we will update the call-login and control-login in jibri.conf. Should I update the xmpp-server-hosts, xmpp-domain, domain in jibri.conf as well to the new domain?
My confusion is because in my JMS after changing the subdomain using dpkg-reconfigure as you said above some of the cofigs have the old subdomain and some have the new subdomain.

Made these changes:

  1. /etc/prosody/prosody.cfg.lua
    Changed
    Component "internal.auth.oldsubdom.example.com" "muc" to "internal.auth.newsubdom.example.com" "muc"
    and
    VirtualHost "recorder.oldsubdom.example.com" to VirtualHost "recorder.newsubdom.example.com"
  2. prosodyctl register jibri auth.newsubdom.example.com jibriauthpass gives Error: The given hostname does not exist in the config
  3. To fix (2) I changed VirtualHost "auth.newsubdom.example.com in /etc/prosody/conf.d/oldsubdom.example.com.cfg.lua to VirtualHost "auth.newsubdom.example.com. After this I reran 2 and it worked.
  4. prosodyctl register recorder recorder.newsubdom.example.com jibrirecorderpass
  5. On jibri instance in jibri.conf change all instances of *.oldsubdom.example.com to *.newsubdom.example.com
  6. Restart all services on both instances

Meeting fails to start(No audio/ Video just the message ‘Unfortunately something went wrong’)
Browser console logs:

2021-06-16T08:09:05.078Z [JitsiMeetJS.js] <Object.getGlobalOnErrorHandler>:  UnhandledError: Focus error, retry after 4000 Script: null Line: null Column: null StackTrace:  Error: Focus error, retry after 4000

If I revert to VirtualHost "auth.oldsubdom.example.com in /etc/prosody/conf.d/oldsubdom.example.com.cfg.lua and restart I get back the audio and video. But then jibri starts throwing error on restart:

2021-06-16 08:19:10.319 WARNING: [40] org.jitsi.xmpp.mucclient.MucClient.log() Closed on error:
org.jivesoftware.smack.XMPPException$StreamErrorException: host-unknown You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions
<stream:error><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text>This server does not serve auth.newsubdom.example.com</text></stream:error>
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1064)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:1000)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:1016)
        at java.base/java.lang.Thread.run(Thread.java:829)

@Freddie I moved the jibri setup to the same machine as Jitsi for testing. I’m getting a similar set of errors still. Can you please help me in understanding which domains(out of the 5) in jibri.conf need to be updated and which ones would remain the same:

xmpp-server-hosts = [ “oldsubdom.example.com” ]
xmpp-domain = “oldsubdom.example.com”
control-muc {
domain = “internal.auth.oldsubdom.example.com”
room-name = “JibriBrewery”
nickname = “Live”
}
control-login {
domain = “auth.oldsubdom.example.com”
username = “jibri”
password = “jibriauthpass”
}
call-login {
domain = “recorder.oldsubdom.example.com”
username = “recorder”
password = “jibrirecorderpass”
}

There should be no reference whatsoever to the old domain anywhere in your deployment. You need to go through the configuration of Jibri line by line to change the domain name to the new domain. You can’t have a domain mismatch. Check to make sure you have the right (new) domain name in JibriBrewery (in Jicofo).

What about the references in prosody?
I have the oldsubdoamin at 10-15 places(e.g. conference.oldsubdom.example.com, focus.oldsubdom.example.com, etc) in the prosody config file(oldsubdom.example.com.cfg.lua).

Fields is jibri.conf:

  1. xmpp-server-hosts = [ “oldsubdom.example.com” ]
  2. xmpp-domain = “oldsubdom.example.com
  3. domain = “internal.auth.oldsubdom.example.com
  4. domain = “auth.oldsubdom.example.com
  5. domain = “recorder.oldsubdom.example.com

Fields in videobridge/sip-communicator.properties

  1. org.jitsi.videobridge.xmpp.user.shard.DOMAIN=auth.oldsubdom.example.com
  2. org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS=JvbBrewery@internal.auth.oldsubdom.example.com

Fields in videobridge/config

  1. JVB_HOSTNAME=oldsubdom.example.com
  2. JVB_HOST=oldsubdom.example.com

Even with the old values for subdomain in jvb conf files, the jitsi setup works on new domain. I have the same domains in jibri conf (also the jibri users are registered on prosody with the old domain).

Working even with older name in configs. Strange. Did you restart all services after domain change?

Yes I did. I just made the change to configs mentioned here and did a restart of all services.

Oh…old name present in jvb configs, even after reconfigure!!

And also that link says to replace old to new in jvb conf…but your latest comment says it is still old name there!! Not sure how it is working with new domain now…

The file jvb.conf is updated with the new domain. However, the other jvb config files e.g. videobridge/sip-communicator.properties and videobridge/config still have the old domain.