Has anyone gotten either pubsub or MUC working with ejabberd for multiple servers and load balancing?

I’ve been trying to get this working - I’ve gotten very close with MUC, the jitsi-videobridges are connecting and publishing statistics to ejabberd but the jicofo doesn’t seem to be able to see them - I see this error in the jicofo logs:

Jicofo 2020-03-14 01:45:43.387 SEVERE: [71] org.jitsi.jicofo.JvbDoctor.log() Unexpected error returned by the bridge: jvbroom@conference.prod-video.video.cabishows.com/jvb-123, err: <iq to='focus@prod-video.video.cabishows.com/focus14549279460660' from='jvbroom@conference.prod-video.video.cabishows.com/jvb-123' id='nx7NF-1144' type='error'><error type='auth'><not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
Jicofo 2020-03-14 01:45:53.387 SEVERE: [71] org.jitsi.jicofo.JvbDoctor.log() Unexpected error returned by the bridge: jvbroom@conference.prod-video.video.cabishows.com/jvb-123, err: <iq to='focus@prod-video.video.cabishows.com/focus14549279460660' from='jvbroom@conference.prod-video.video.cabishows.com/jvb-123' id='nx7NF-1158' type='error'><error type='auth'><not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
Jicofo 2020-03-14 01:45:54.554 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().574 HAVE Discovered items for: prod-video.video.cabishows.com
Jicofo 2020-03-14 01:45:54.554 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().581 <item jid='conference.prod-video.video.cabishows.com'/>
Jicofo 2020-03-14 01:45:54.555 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().581 <item jid='focus.prod-video.video.cabishows.com'/>
Jicofo 2020-03-14 01:45:54.555 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().581 <item jid='jitsi-videobridge.prod-video.video.cabishows.com'/>
Jicofo 2020-03-14 01:45:54.555 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().581 <item jid='jitsi-videobridge2.prod-video.video.cabishows.com'/>
Jicofo 2020-03-14 01:45:54.555 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().581 <item jid='jitsi-videobridge3.prod-video.video.cabishows.com'/>
Jicofo 2020-03-14 01:45:54.555 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().581 <item jid='jitsi-videobridge4.prod-video.video.cabishows.com'/>
Jicofo 2020-03-14 01:45:54.555 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().581 <item jid='pubsub.prod-video.video.cabishows.com'/>
Jicofo 2020-03-14 01:45:54.555 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().581 <item jid='prod-video.video.cabishows.com' name='Announcements' node='announce'/>
Jicofo 2020-03-14 01:45:54.555 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().581 <item jid='prod-video.video.cabishows.com' name='Configuration' node='config'/>
 Jicofo 2020-03-14 01:45:54.555 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().581 <item jid='prod-video.video.cabishows.com' name='User Management' node='user'/>
Jicofo 2020-03-14 01:45:54.555 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().581 <item jid='prod-video.video.cabishows.com' name='Online Users' node='online users'/>
Jicofo 2020-03-14 01:45:54.555 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().581 <item jid='prod-video.video.cabishows.com' name='All Users' node='all users'/>
Jicofo 2020-03-14 01:45:54.555 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().581 <item jid='prod-video.video.cabishows.com' name='Outgoing s2s Connections' node='outgoing s2s'/>
Jicofo 2020-03-14 01:45:54.555 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().581 <item jid='prod-video.video.cabishows.com' name='Running Nodes' node='running nodes'/>
Jicofo 2020-03-14 01:45:54.555 FINE: [65] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.discoverItems().581 <item jid='prod-video.video.cabishows.com' name='Stopped Nodes' node='stopped nodes'/>
 Jicofo 2020-03-14 01:46:03.387 SEVERE: [71] org.jitsi.jicofo.JvbDoctor.log() Unexpected error returned by the bridge: jvbroom@conference.prod-video.video.cabishows.com/jvb-123, err: <iq to='focus@prod-video.video.cabishows.com/focus14549279460660' from='jvbroom@conference.prod-video.video.cabishows.com/jvb-123' id='nx7NF-1190' type='error'><error type='auth'><not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
 Jicofo 2020-03-14 01:46:13.387 SEVERE: [71] org.jitsi.jicofo.JvbDoctor.log() Unexpected error returned by the bridge: jvbroom@conference.prod-video.video.cabishows.com/jvb-123, err: <iq to='focus@prod-video.video.cabishows.com/focus14549279460660' from='jvbroom@conference.prod-video.video.cabishows.com/jvb-123' id='nx7NF-1204' type='error'><error type='auth'><not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
  Jicofo 2020-03-14 01:46:23.390 SEVERE: [71] org.jitsi.jicofo.JvbDoctor.log() Unexpected error returned by the bridge: jvbroom@conference.prod-video.video.cabishows.com/jvb-123, err: <iq to='focus@prod-video.video.cabishows.com/focus14549279460660' from='jvbroom@conference.prod-video.video.cabishows.com/jvb-123' id='nx7NF-1218' type='error'><error type='auth'><not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>

I have the following in jitsi-videobridge’s sip-communicator.properties:

org.jitsi.videobridge.AUTHORIZED_SOURCE_REGEXP=focus@prod-video.video.mydomain/.*
org.jitsi.videobridge.xmpp.user.shard.HOSTNAME=xmpp-p1test.mydomain
org.jitsi.videobridge.xmpp.user.shard.DOMAIN=prod-video.video.mydomain
org.jitsi.videobridge.xmpp.user.shard.USERNAME=focus
org.jitsi.videobridge.xmpp.user.shard.PASSWORD=mypassword
org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS=jvbroom@conference.prod-video.video.mydomain
org.jitsi.videobridge.xmpp.user.shard.MUC=jvbroom@conference.prod-video.video.mydomain
org.jitsi.videobridge.xmpp.user.shard.MUC_NICKNAME=jvb-123
org.jitsi.videobridge.xmpp.user.shard.IQ_HANDLER_MODE=sync
org.jitsi.videobridge.xmpp.user.shard.DISABLE_CERTIFICATE_VERIFICATION=true

org.jitsi.videobridge.ENABLE_STATISTICS=true
org.jitsi.videobridge.STATISTICS_TRANSPORT=muc

I have the following in jicofo’s sip-communicator.properties:

org.jitsi.jicofo.BRIDGE_MUC=jvbroom@conference.prod-video.video.mydomain
org.jitsi.jicofo.ALWAYS_TRUST_MODE_ENABLED=true

Any examples of working configurations for ejabberd for either pubsub or MUC for multiple video servers gratefully accepted, as well as any hints.

I may have figured this out. It turns out the error about unauthorized is because my regex in AUTHORIZED_SOURCE_REGEXP needs to match both the jwbroom and the focus entries. I’ve changed it to this and I’m no longer getting a error:

org.jitsi.videobridge.AUTHORIZED_SOURCE_REGEXP=(focus|jvbroom)@.*prod-video.video.mydomain

However, my original problem still exists - in multiuser rooms, the users get assigned to different video bridges so they can’t see each other.

Jicofo is the entity doing the dispatching of users to bridges. If you have multiple servers handling the same MUC things will likely go wrong. Are users joining the same MUC where the same Jicofo is connected?

I have one jicofo instance, multiple jitsi-videobridge instances. The idea here is to load spread load as described in [jitsi-dev] How to config for multi jitsi-video-bridge instance?

I think I have it working, although I’m having to use videobridge 2.1 from /unstable to make it work.

We’ve been using 2.1 in meet.jit.si for a few months, it is the recommended version and considered stable. It just hasn’t made its way to the “stable” branch in debian.

Boris

1 Like

It is still not working in production. I’m trying to figure out whether I just thought i had it working in dev or whether there’s some difference between the two

To get it to work I had to make some changes to jicofo. Is anyone interested in some, hm, constructive criticism and/or a patch file? In particular I would hint that isOperational appears to be treated two different ways by two different developers.

Also, the current setup will now allow people to join a existing bridge that’s in clean shutdown. That may be by design, but it doesn’t fit my needs so I added a isOpen seperate from the isOperational so no new conferences will start on a bridge but existing ones can have members pop in and out until they all fade into the darkness.

I’m not on the bridge team, but IIRC that’s by design. When a bridge is in graceful shutdown mode no new conferences should be allocated in it.

I’d suggest you opena an issue / PR in the JVB repo to discuss actual code changes with your findings.