Issues setting up Jitsi-Backend with lib-jitsi-meet, prosody get error with focus-server (Sending error replies for 1 queued stanzas because of failed outgoing connection to focus.undefined)

I try to setup a jitsi-backend on ubuntu 20.04. As a frontend we use an own implementation with React-JS, using lib-jitsi-meet to organize the handling of the streams.

The complete setup worked nicely last year on a Debian 10 instance. I reconfigures some things, and then got into issues. To resolve, I just re-installed the complete backend, but this time with Ubuntu 20.04. Setup and running jitsi-meet frontend works nicely, but when try to connect via lib-jitsi-meet, I get an error in Prosody, which I am not able to resolve - no matter what I tried so far.

This is the error I get:

Jan 12 21:28:44 speakerstats.xxxxxx.com:speakerstats_component       warn    A module has been configured that triggers external events.
Jan 12 21:28:44 speakerstats.xxxxxx.com:speakerstats_component       warn    Implement this lib to trigger external events.
Jan 12 21:29:26 mod_bosh        info    New BOSH session, assigned it sid '6f4876bc-f43e-49a2-8cd6-0974277d0db7'
Jan 12 21:29:26 mod_bosh        info    New BOSH session, assigned it sid 'cc9d0056-7971-4339-80a8-2de2204947cb'
Jan 12 21:29:27 boshcc9d0056-7971-4339-80a8-2de2204947cb        info    Authenticated as e2fe9d58-15dc-4bb9-b933-df418fb41aca@xxxxxx.com
Jan 12 21:29:27 bosh6f4876bc-f43e-49a2-8cd6-0974277d0db7        info    Authenticated as 9ab1d837-c5e4-436e-b0fb-836e9711a0a4@xxxxxx.com
Jan 12 21:29:28 s2sout562c0d94f230      info    Failed in all attempts to connect to focus.undefined
Jan 12 21:29:28 s2sout562c0d94f230      info    Sending error replies for 1 queued stanzas because of failed outgoing connection to focus.undefined
Jan 12 21:29:28 s2sout562c0d9e1a30      info    Failed in all attempts to connect to focus.undefined
Jan 12 21:29:28 s2sout562c0d9e1a30      info    Sending error replies for 1 queued stanzas because of failed outgoing connection to focus.undefined

Has anyone an idea, what could be the issue here? One notice: the frontend is served via a different domain, then the backend. But again: we had this working before. I also allowed all with CORS and also tried a lot of this around configuring the focus-server (and auth). Right now I have no clue what else to try about this issue…

To sum-up again: prosody seems to have problems to open the connection to the frontend with:

Sending error replies for 1 queued stanzas because of failed outgoing connection to focus.undefined

The corrensponding error on the frontend looks like this:

Logger.js:154 2023-01-12T21:33:58.227Z [modules/xmpp/moderator.js] <Ar._handleError>:  Failed to get a successful response, giving up. Error: Failed to get a successful response, giving up.
    at Ar._handleError (moderator.js:388:23)
    at Ar._handleIqError (moderator.js:437:10)
    at moderator.js:266:31
    at P.Handler.handler (strophe.umd.js:2716:25)
    at P.Handler.run (strophe.umd.js:1875:33)
    at strophe.umd.js:3157:35
    at Object.forEachChild (strophe.umd.js:830:21)
    at P.Connection._dataRecv (strophe.umd.js:3146:25)
    at N.Bosh._onRequestStateChange (strophe.umd.js:5012:19)

I guess you are sending the initial iq or something to the wrong focus address ‘focus.undefined’.

I had the same problem (debian jitsi-meet bundle 2.0.8194-1). When going back to the last version 2.0.8138-1 everything worked fine again. So something happened in between the packages.

Oh, my problem is more likely Update to 2.0.8194-1 stable: Can't create conferences no more, sorry

I think I figured out the issue. The error was in the config of the frontend, that uses lib-jitsi-meet.

In the serverConfig.js-file I only used the (depreciated) parameter bosh, but did not set the serviceUrl, which obviously replaces the bosh-parameter in the more recent version of the backend. (Refers to the options, when init a Jitsi-Connection: lib-jitsi-meet API (low level) | Jitsi Meet)

Before we let the fronten run against an older version og jitsi-meet, so this never was a problem before. Works now!

We always recommend to use jitsi-meet, lib-jitsi-meet, jicofo and jvb from the same release. Other combinations may lead to unpredictable results.