Host-unknown for videobridge [SOLVED]


#1

Hello,

I have a problem with videobridge that posts these logs.
Is it supposed to connect to the xmpp server in ssl ? Otherwise I don’t understand why it complains

export JVB_HOME=/usr/local/jitsi-videobridge
mvn compile exec:exec -Dexec.executable=java -Dexec.args="-cp %classpath org.jitsi.videobridge.Main –domain=“jitsi.mydomain.org” --host=“jitsi.mydomain.org” --port=“5347” --secret=“YOURSECRET1” -Djava.library.path=$JVB_HOME/lib/native/linux-64 -Djava.util.logging.config.file=$JVB_HOME/lib/logging.properties -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=.jitsi-videobridge"

Nov 04, 2018 3:19:56 PM net.java.sip.communicator.util.Logger error
SEVERE: host-unknown, host:jitsi.mydomain.org, 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$3.call(ComponentMain.java:315)
at org.jitsi.meet.ComponentMain$3.call(ComponentMain.java:300)
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)

However I’m able to join it

telnet jitsi.mydomain.org 5347
Trying 10.255.89.250…
Connected to jitsi.mydomain.org.
Escape character is ‘^]’.
^]
telnet> quit
Connection closed.

But it doesn’t handle ssl

openssl s_client -connect jitsi.domain.org:5347
CONNECTED(00000003)
4420539820704:error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number:/usr/src/lib/libssl/ssl_pkt.c:386:

no peer certificate available

No client certificate CA names sent

SSL handshake has read 5 bytes and written 0 bytes

New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
Start Time: 1541341371
Timeout : 7200 (sec)
Verify return code: 0 (ok)

I followed the prosody configuration

VirtualHost “jitsi.mydomain.org
authentication = “anonymous”
ssl = {
key = “/etc/prosody/certs/xmpp.mydomain.org.key”;
certificate = “/etc/prosody/certs/xmpp.mydomain.org_chained.crt”;
cafile = “/etc/ssl/certs/CA_Root_Lets_Encrypt.crt”;
}
modules_enabled = {
“bosh”;
“pubsub”;
}
c2s_require_encryption = false

VirtualHost “auth.jitsi.mydomain.org
ssl = {
key = “/etc/prosody/certs/xmpp.mydomain.org.key”;
certificate = “/etc/prosody/certs/xmpp.mydomain.org_chained.crt”;
cafile = “/etc/ssl/certs/CA_Root_Lets_Encrypt.crt”;
}
authentication = “internal_plain”

Component “conference.jitsi.mydomain.org” “muc”
Component “jitsi-videobridge.jitsi.mydomain.org
component_secret = “YOURSECRET1”
Component “focus.jitsi.mydomain.org
component_secret = “YOURSECRET2”


#2

This means, jvb connects to the server, but the server replies that the hostname that jvb tries to use is not configured/unknown. The domain is passed with param --domain.


#3

I checked the logs in prosody and indeed it looks like there is a problem

Nov 05 00:50:42 jcp6f99d04db80 info Incoming Jabber component connection
Nov 05 00:50:42 mod_component info Disconnecting component, stream:error is: stream:errorjitsi-videobridge does not match any configured external components</stream:error>
Nov 05 00:50:42 jcp6f99d04db80 info component disconnected: nil (false)
Nov 05 00:50:42 socket debug server.lua: closed client handler and removed socket from list

I don’t know where it found the string “jitsi-videobridge” because it’s nowhere in my configuration, it’s missing the domain part.

Also I read one of the message you participated

Shoud I create the file /etc/jitsi/videobridge/config
How should it look like ?

Thank You


#4

This file is created during installation, and is used by the init.d script. I suppose you are running from source, so you don’t need that.
You are passing --domain=“jitsi.mydomain.org” to jvb, this means you need to have configured in prosody:

Component "jitsi-videobridge.jitsi.mydomain.org"
    component_secret = "----"

Have you configured this in prosody?


#5

Thank you for your answer damencho.
Yes I run it from source.

I did configure this stanza in my prosody.cfg.lua, I had posted it in my first message and rechecked right now

Component “jitsi-videobridge.jitsi.mydomain.org
component_secret = “YOURSECRET1”

But the message found in prosody.debug

jitsi-videobridge does not match any configured external components

Do you know if I can run a basic test to validate or invalidate the prosody part ?

Do you also know how does it decides to connect to jitsi-videobridge.jitsi.mydomain.org, what if I wanted the name to be MY-videobridge.jitsi.mydomain.org” ?
Because I don’t feel it’s in the mvn compile command.


#6

There is a param subdomain which controls that part.

Check whether your config is included in prosody config. The versions of prosody coming from the ubuntu repo include all files from conf.d folder, but if you use prosody coming from prosody’s repo, their default config do not use that scheme.


#7

So I finally found the root cause of this issue !
In my command line I had -domain instead of --domain (two dashes), hence the domain wasn’t taken into account.

Maybe it would be nice to have an error message for people who have their head in the clouds.

Thank you for your patience