Jicofo needs to be restarted after reboot of VM

Running jicofo from ppa in version jicofo/stable,now 1.0-644-1 all [installed,automatic] in an Ubuntu VM 18.04. After almost every reboot I have to restart jicofo, otherwise the second person entering the room kicks everybody out with a modal message, that reconnecting will be tried. Reconnecting fails then and the process repeats.

Service status before was fine, surprisingly:

● jicofo.service - LSB: Jitsi conference Focus
   Loaded: loaded (/etc/init.d/jicofo; generated)
   Active: active (running) since Wed 2020-12-09 08:05:18 CET; 3min 10s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 739 ExecStart=/etc/init.d/jicofo start (code=exited, status=0/SUCCESS)
    Tasks: 86 (limit: 4915)
   CGroup: /system.slice/jicofo.service
           └─879 java -Xmx3072m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -Djdk.tls.ephemeralDHKeySize=2048 -Dconfig.file=/etc/jitsi/jicofo/jicofo.conf -Dnet.java.sip.communicator.SC_HOME_DIR_LOCATIO

Dec 09 08:05:17 k001372a systemd[1]: Starting LSB: Jitsi conference Focus...
Dec 09 08:05:18 k001372a jicofo[739]: Starting jicofo: jicofo started.
Dec 09 08:05:18 k001372a systemd[1]: Started LSB: Jitsi conference Focus.
stefan@k001372a:~$ sudo systemctl restart jicofo
stefan@k001372a:~$ sudo systemctl status jicofo
● jicofo.service - LSB: Jitsi conference Focus
   Loaded: loaded (/etc/init.d/jicofo; generated)
   Active: active (running) since Wed 2020-12-09 08:08:43 CET; 2s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1961 ExecStop=/etc/init.d/jicofo stop (code=exited, status=0/SUCCESS)
  Process: 1967 ExecStart=/etc/init.d/jicofo start (code=exited, status=0/SUCCESS)
    Tasks: 18 (limit: 4915)
   CGroup: /system.slice/jicofo.service
           └─1977 java -Xmx3072m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -Djdk.tls.ephemeralDHKeySize=2048 -Dconfig.file=/etc/jitsi/jicofo/jicofo.conf -Dnet.java.sip.communicator.SC_HOME_DIR_LOCATI

Dec 09 08:08:42 k001372a systemd[1]: Starting LSB: Jitsi conference Focus...
Dec 09 08:08:43 k001372a jicofo[1967]: Starting jicofo: jicofo started.

In jicofo.log, I can see an error message:

Jicofo 2020-12-09 08:05:34.645 SEVERE: [18] org.jitsi.jicofo.xmpp.BaseBrewery.log() Failed to create room: JvbBrewery@internal.auth.floridsdorf.mittenin.at
net.java.sip.communicator.service.protocol.OperationFailedException: Failed to join the room
        at org.jitsi.impl.protocol.xmpp.ChatRoomImpl.joinAs(ChatRoomImpl.java:298)
        at org.jitsi.impl.protocol.xmpp.ChatRoomImpl.join(ChatRoomImpl.java:209)
        at org.jitsi.jicofo.xmpp.BaseBrewery.start(BaseBrewery.java:185)
        at org.jitsi.jicofo.xmpp.BaseBrewery.maybeStart(BaseBrewery.java:136)
        at org.jitsi.jicofo.xmpp.BaseBrewery.registrationStateChanged(BaseBrewery.java:161)
        at org.jitsi.jicofo.ProtocolProviderHandler.registrationStateChanged(ProtocolProviderHandler.java:150)
        at net.java.sip.communicator.service.protocol.AbstractProtocolProviderService.fireRegistrationStateChanged(AbstractProtocolProviderService.java:187)
        at net.java.sip.communicator.service.protocol.AbstractProtocolProviderService.fireRegistrationStateChanged(AbstractProtocolProviderService.java:141)
        at org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.notifyConnected(XmppProtocolProvider.java:326)
        at org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.access$000(XmppProtocolProvider.java:61)
        at org.jitsi.impl.protocol.xmpp.XmppProtocolProvider$XmppConnectionListener.authenticated(XmppProtocolProvider.java:523)
        at org.jivesoftware.smack.AbstractXMPPConnection.callConnectionAuthenticatedListener(AbstractXMPPConnection.java:1297)
        at org.jivesoftware.smack.AbstractXMPPConnection.afterSuccessfulLogin(AbstractXMPPConnection.java:572)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection.afterSuccessfulLogin(XMPPTCPConnection.java:379)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection.loginInternal(XMPPTCPConnection.java:444)
        at org.jivesoftware.smack.AbstractXMPPConnection.login(AbstractXMPPConnection.java:491)
        at org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.doConnect(XmppProtocolProvider.java:283)
        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)
Caused by: org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPP error reply received from jvbbrewery@internal.auth.floridsdorf.mittenin.at: XMPPError: forbidden - auth
        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.muc.MultiUserChat.getConfigurationForm(MultiUserChat.java:781)
        at org.jitsi.impl.protocol.xmpp.ChatRoomImpl.joinAs(ChatRoomImpl.java:244)

but I can see a similar one after the restart where jitsi is not kicking us out of the room.

The config settings mentioned in another issue

muc_room_locking = false
muc_room_default_public_jids = true

are not present at all in our prosody config. We have

Component "internal.auth.floridsdorf.mittenin.at" "muc"
    storage = "none"
    modules_enabled = { "ping"; }
    admins = { "focusUser@auth.jitmeet.example.com", "jvb@auth.jitmeet.example.com" }

Any more info I can provide to mitigate the issue? Any suggestions welcome.

You are using prosody 0.10. I’m not sure whether muc_room_locking and muc_room_default_public_jids exist for it.
But that error means jicofo is not an owner in the room and access to the config is forbidden. All admins are owners … so the admins part is not taken into account, I think, can you try moving the admins part in the general part of the file and see does that change anything?

The other option is to order startup through systemd unit files and make sure jicofo is the first to start before jvb. … but I guess that jvb my hit this problem then …

Thanks for the quick response!
The issue seems to have magically disappeared right now, even before messing with the startup order. Will investigate further, when it reappears.