Videobridge cannot found hostname

Hello,

I’ve been struggling for the past hours with this error:

2020-05-28 21:05:22.735 INFO: [28] Videobridge.createConference#326: create_conf, id=16b68f4c300f0dbb gid=null logging=false
2020-05-28 21:05:22.744 INFO: [28] Health.doRun#294: Performed a successful health check in 10ms. Sticky failure: false
2020-05-28 21:05:27.121 SEVERE: [38] ComponentMain.lambda$getConnectCallable$0#293: host-unknown, host:video.server.com, port:5347
org.xmpp.component.ComponentException: host-unknown
at org.jivesoftware.whack.ExternalComponent.connect(ExternalComponent.java:243)
at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentManager.java:242)
at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentManager.java:222)
at org.jitsi.meet.ComponentMain.lambda$getConnectCallable$0(ComponentMain.java:285)
at org.jitsi.retry.RetryStrategy$TaskRunner.run(RetryStrategy.java:193)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
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:834)

And I’ve no clue what can be the problem.
In /etc/prosody/conf.avail forlder, files are:
localhost.cfg.lua
video.server.com.cfg.lua

video.server.com.cfg.lua content :

plugin_paths = { “/usr/share/jitsi-meet/prosody-plugins/” }

– domain mapper options, must at least have domain base set to use the mapper
muc_mapper_domain_base = “video.server.com”;

turncredentials_secret = “CCCCCCC”;

turncredentials = {
{ type = “stun”, host = “video.server.com”, port = “443” },
{ type = “turn”, host = “video.server.com”, port = “443”, transport = “udp” },
{ type = “turns”, host = “video.server.com”, port = “443”, transport = “tcp” }
};

cross_domain_bosh = false;
consider_bosh_secure = true;

VirtualHost “video.server.com
– enabled = false – Remove this line to enable this host
–authentication = “anonymous”
authentication = “internal_hashed”
admins = {“video.server.com”}

    -- Properties below are modified by jitsi-meet-tokens package config
    -- and authentication above is switched to "token"
    --app_id="example_app_id"
    --app_secret="example_app_secret"
    -- Assign this host a certificate for TLS, otherwise it would use the one
    -- set in the global section (if any).
    -- Note that old-style SSL on port 5223 only supports one certificate, and will always
    -- use the global one.
    ssl = {
            key = "/etc/prosody/certs/video.server.com.key";
            certificate = "/etc/prosody/certs/video.server.com.crt";

            https_certificate = "/etc/prosody/certs/video.server.com.crt";
            https_key =  "/etc/prosody/certs/video.server.com.key";
    }
   speakerstats_component = "speakerstats.video.server.com"
    conference_duration_component = "conferenceduration.video.server.com"
    -- we need bosh
    modules_enabled = {
        "bosh";
        "pubsub";
        "ping"; -- Enable mod_ping
        "speakerstats";
        "turncredentials";
        "conference_duration";
    }
    c2s_require_encryption = false

Component “conference.video.server.com” “muc”
storage = “memory”
modules_enabled = {
“muc_meeting_id”;
“muc_domain_mapper”;
– “token_verification”;
}
admins = { “focus@auth.video.server.com” }

– internal muc component
Component “internal.auth.video.server.com” “muc”
storage = “memory”
modules_enabled = {
“ping”;
}
admins = { “focus@auth.video.server.com”, “jvb@auth.video.server.com” }

VirtualHost “auth.video.server.com
ssl = {
key = “/etc/prosody/certs/auth.video.server.com.key”;
certificate = “/etc/prosody/certs/auth.video.server.com.crt”;

    https_certificate = "/etc/prosody/certs/video.server.com.crt";
    https_key =  "/etc/prosody/certs/video.server.com.key";
}
authentication = "internal_hashed"

Component “focus.video.server.com
component_secret = “BBBBBBBB”

Component “speakerstats.video.server.com” “speakerstats_component”
muc_component = “conference.video.server.com

Component “conferenceduration.video.server.com” “conference_duration_component”
muc_component = “conference.video.server.com

Component “callcontrol.video.server.com” component_secret = “AAAAAAA”

VirtualHost “guest.video.server.com
authentication = “anonymous”
c2s_require_encryption = false

Videobrige’s config file is:

Jitsi Videobridge settings

sets the XMPP domain (default: none)

JVB_HOSTNAME=video.server.com

sets the hostname of the XMPP server (default: domain if set, localhost otherwise)

JVB_HOST=video.server.com

sets the port of the XMPP server (default: 5275)

JVB_PORT=5347

sets the shared secret used to authenticate to the XMPP server

JVB_SECRET=ZZZZZZZZZ

extra options to pass to the JVB daemon

JVB_OPTS="–apis=rest,xmpp --subdomain=video"
#,xmpp --subdomain=video"

AUTHBIND=yes

adds java system props that are passed to jvb (default are for home and logging config file)

JAVA_SYS_PROPS="-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/etc/jitsi -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=videobridge -Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/jitsi -Djava.util.logging.config.file=/etc/jitsi/videobridge/logging.properties"

I can’t find anything wrong, but it seems to me that Jitsi cannot connect to port 5347, even though UFW has the port open/allowed.
I’ve tested to connect from my laptop to the server via telnet and port 5347 and it fails.

Any help would be very appreciated.

TIA,

SCC

a basic jitsi server has 3 parts:

  • prosody, the xmpp server: think of it as the conference center
  • jicofo: think of it as the organizer who greets people and ushers them in the rooms
  • videobridge: the cameras in the rooms

an extended server can have cameras outside of the conference center, in separate rooms to make for more capacity. In this case a jitsi system has

  • a base with prosody, jicofo and (usually) a videobridge
  • N servers with only videobridges

That’s why videobridge needs an internet host name to connect, in case where it’s located on a different server than the system center with prosody and jicofo. But in the simple case it’s not needed in fact, so it could be just as well left empty since by default it will be localhost. That’s the meaning of (default: domain if set, localhost otherwise). As you are setting up your first system, you could just as well set the entry to blank:
JVB_HOST=
or if you prefer you can set up the host name (in /etc/hostname) to the internet name (video.server.com as you quoted it). Both options will allow videobridge to ‘know’ the host name of prosody. When prosody and videobridge run on the same server, UFW is not involved at all and in fact you should NOT allow port 5347 from the internet. Such an access is only needed if there are separate videobridges. If you can’t connect from the server to port 5347, you have a bigger problem, that is, prosody probably don’t run or is very badly configured. You should check that by running
sudo ps fauxww | grep prosody
should return a line with lua init.
and
sudo ss -tapnu | grep lua | grep LISTEN | grep 5347
should return 2 lines to check that prosody is indeed listening on port 5347.

Thanks!

I executed the suggested commands:

ps fauxww | grep prosody

root 13041 0.0 0.0 6144 828 pts/1 S+ 22:36 0:00 | _ grep prosody
prosody 10540 0.2 0.7 52616 30596 ? Ss 21:06 0:11 lua5.2 /usr/bin/prosody

not sure if that is correct…

and for the 2nd command:

ss -tapnu | grep lua | grep LISTEN | grep 5347

tcp LISTEN 0 128 127.0.0.1:5347 0.0.0.0:* users:((“lua5.2”,pid=10540,fd=14))
tcp LISTEN 0 128 [::1]:5347 [::]:* users:((“lua5.2”,pid=10540,fd=15))

I think it is OK.

As for the JVB_HOST=
I already have done that too, but the error continues with some slight differences:

2020-05-28 22:39:32.285 SEVERE: [37] ComponentMain.lambda$getConnectCallable$0#293: host-unknown, host:localhost, port:5347
org.xmpp.component.ComponentException: host-unknown
at org.jivesoftware.whack.ExternalComponent.connect(ExternalComponent.java:243)
at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentManager.java:242)
at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentManager.java:222)
at org.jitsi.meet.ComponentMain.lambda$getConnectCallable$0(ComponentMain.java:285)
at org.jitsi.retry.RetryStrategy$TaskRunner.run(RetryStrategy.java:193)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
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:834)

further details, as per your suggestions:

cat /etc/hostname

video

(not sure if this should be FQDN or not, to be honest)

and the /etc/hosts:

cat /etc/hosts

::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

666.555.999.888 video.server.com video
127.0.0.1 video.server.com video

any additional suggestion?

set the Fqdn, report it in JVB_HOST and restart videobridge
also use three backticks like that ``` at the beginning of a line to paste config text

also use three backticks like that ``` at the beginning of a line to paste config text

thanks for the tip :wink:

some additional details:
cat /etc/hostname
video.server.com

# sets the XMPP domain (default: none)
JVB_HOSTNAME=video.server.com

# sets the hostname of the XMPP server (default: domain if set, localhost otherwise)
JVB_HOST=video.server.com

# sets the port of the XMPP server (default: 5275)
JVB_PORT=5347

and restarted jicofo, prosody and video-bridge, and I still get:

2020-05-29 00:39:29.617 SEVERE: [39] ComponentMain.lambda$getConnectCallable$0#293: host-unknown, host:video.server.com, port:5347
org.xmpp.component.ComponentException: host-unknown

Strangely, videocalls do work…

I also added to prosody.cfg.lua

component_interface = "0.0.0.0";

and now I can telnet to server from my laptop…

I’m really stuck… can’t understand why this error happens…

It could be a transient problem. I have seen this mentioned on this forum, it could be because of a timing problem in service starts. Try to restart only videobridge and see if the message appears again in the log.

Thanks.
I already have restarted JVB several times, but no luck, problem persists…

I have set JVB_HOST to the same value of JVB_DOMAIN, empty, LOCALHOST, Public IP Address, Local IP Address, all sorts of values, and same result…

May certificates be the issue?

Added details:

# lsof -i -P -n | grep prosody
lua5.2     4925  prosody    4u  IPv4 636448      0t0  TCP *:5222 (LISTEN)
lua5.2     4925  prosody    5u  IPv6 636449      0t0  TCP *:5222 (LISTEN)
lua5.2     4925  prosody    8u  IPv4 636450      0t0  TCP *:5280 (LISTEN)
lua5.2     4925  prosody    9u  IPv6 636451      0t0  TCP *:5280 (LISTEN)
lua5.2     4925  prosody   12u  IPv4 636459      0t0  TCP *:5269 (LISTEN)
lua5.2     4925  prosody   13u  IPv6 636460      0t0  TCP *:5269 (LISTEN)
lua5.2     4925  prosody   14u  IPv4 636463      0t0  TCP 127.0.0.1:5347 (LISTEN)
lua5.2     4925  prosody   15u  IPv6 636464      0t0  TCP [::1]:5347 (LISTEN)
lua5.2     4925  prosody   19u  IPv4 636472      0t0  TCP 127.0.0.1:5347->127.0.0.1:60348 (ESTABLISHED)
lua5.2     4925  prosody   20u  IPv4 636474      0t0  TCP 127.0.0.1:5347->127.0.0.1:60350 (ESTABLISHED)
lua5.2     4925  prosody   21u  IPv4 636583      0t0  TCP 127.0.0.1:5222->127.0.0.1:50424 (ESTABLISHED)
lua5.2     4925  prosody   22u  IPv4 636636      0t0  TCP 127.0.0.1:5222->127.0.0.1:50426 (ESTABLISHED)

duh, I realize only now that I should have taken in account that by default current Jitsi, videobridge2 don’t connect at all to port 5347 so either you use an older version, or you have changed the
JVB_OPTS="–apis=,"
default value to include xmpp. If this is the case, it’s not recommended.

yup, got JVB OPTS like:

# extra options to pass to the JVB daemon
JVB_OPTS="--apis=rest,xmpp --subdomain=video"

might this be the issue?
I needed User Authentication on conference rooms, and, as far as I can remember, the tutorial I found stated that this was needed…

I’ll try to remove it and get you some feedback!

Thanks mate!

And it works!

just updated the JVB_OPTS to

# extra options to pass to the JVB daemon
JVB_OPTS="--apis=rest --subdomain=video"

and no more error logs!

Thanks a lot!

I owe you a pizza :wink:

Cheers,

I should have thought of that before. It’s so difficult to follow all the (mostly undocumented or badly documented) changes on this project.