[jitsi-users] jitsi-videobridge connection refused


#1

First, I apologize if my question has already been asked. I did try
to search the users Archives[1], but it just give me an "Invalid Sort
Option Selected" error (regardless of what sort option I choose).

I want to set up a videobridge with Prosody, but I'm getting a
connection refused error. The XMPP server is set up and it works find
for text based chatting. Prosody is configured to allow external
components to connect to it[2] and I've confirmed that it is listening
on 127.0.0.1:5347 using netstat -lvnt (also confirmed using telnet).

When I run jvb.sh (Linux, OpenJDK 8) like so:

./jvb.sh --domain=chat.diseasedmind.com "--secret=No secrets shall be
posted to mailing lists, lol" --subdomain=videobridge
- --host=chat.diseasedmind.com --port=5347

It ends with a stacktrace where the punchline is
java.net.ConnectException: Connection refused. I wanted to see what
was going on, so I prepended "strace -ff -o strace.txt " to the jvb
command. This resulted in 23 text files, and only one of them
contained an attempt to connect() to port 5347, so that clearly sounds
like the place to look. The exact line is:

connect(68, {sa_family=AF_INET6, sin6_port=htons(5347),
inet_pton(AF_INET6, "::ffff:127.0.1.1", &sin6_addr), sin6_flowinfo=0,
sin6_scope_id=0}, 28) = -1 EINPROGRESS (Operation now in progress)

I tried changing the jvb command to use --host=127.0.0.1 but that
results in org.xmpp.component.ComponentException: host-unknown.
Trying --host=localhost does the same, and omitting --host all
together results in the connection refused.

Just as a test, I opened up the XMPP server to bind to eth0 instead of
lo. Testing on port 5275 also did not make any difference. Also, I
did find this[3], and yes, I did put the code in the correct section.

I am new to running XMPP servers, but I feel like this is a pretty
basic issue. The server is clearly listening on the correct port, but
the jitsi-videobridge appears to be doing something funky with IPv6
and then not falling back to IPv4 (or maybe that's just how the
syscalls normally appear in the latest JVM).

Where do I go from here? Should I try different
versions/implementations of Java? Is it time to break out Netbeans,
build from source, and start debugging? I am fluent in Java, but I
wanted to check to see if this is a known issue before I go digging
through the source code.

Thanks,
Adam

[1] http://lists.jitsi.org/pipermail/users/
[2] http://prosody.im/doc/components#adding_an_external_component
[3] http://lists.jitsi.org/pipermail/users/2014-February/006524.html


#2

Hi Adam,

for text based chatting. Prosody is configured to allow external
components to connect to it[2] and I've confirmed that it is listening
on 127.0.0.1:5347 using netstat -lvnt (also confirmed using telnet).

That's okay.

When I run jvb.sh (Linux, OpenJDK 8) like so:

./jvb.sh --domain=chat.diseasedmind.com "--secret=No secrets shall be
posted to mailing lists, lol" --subdomain=videobridge
--host=chat.diseasedmind.com --port=5347

With --host=chat... you command jvb to connect to chat..., i.e. the
public ip address, but you probably want to use --host=localhost as this
is where prosody is listening.

See the manual at
https://github.com/jitsi/jitsi-meet/blob/master/doc/manual-install.md

Kind regards,
Benedikt Wildenhain

···

On Fri, Jul 24, 2015 at 05:05:13PM +0000, Adam wrote:


#3

Thanks for the swift reply.

Hi Adam,

for text based chatting. Prosody is configured to allow
external components to connect to it[2] and I've confirmed that
it is listening on 127.0.0.1:5347 using netstat -lvnt (also
confirmed using telnet).

That's okay.

When I run jvb.sh (Linux, OpenJDK 8) like so:

./jvb.sh --domain=chat.diseasedmind.com "--secret=No secrets
shall be posted to mailing lists, lol" --subdomain=videobridge
--host=chat.diseasedmind.com --port=5347

With --host=chat... you command jvb to connect to chat..., i.e.
the public ip address, but you probably want to use
--host=localhost as this is where prosody is listening.

Trying --host=localhost results in
org.xmpp.component.ComponentException: host-unknown. --host=127.0.0.1
did the same thing. Omitting the --host gave the "Connection refused"
error.

See the manual at
https://github.com/jitsi/jitsi-meet/blob/master/doc/manual-install.md

Thank

you. This looks like it'll be perfect for getting all the other
software set up (and I can avoid writing my own video conferencing UI,
which is a welcome surprise).

···

On 07/24/2015 05:37 PM, Benedikt Wildenhain wrote:

On Fri, Jul 24, 2015 at 05:05:13PM +0000, Adam wrote:


#4

This worked for me :

daemon /opt/jvb/jvb.sh --domain=my-domainname.eu --secret=PASSWORD
--apis=rest,xmpp 2>/opt/jvb/log &

where our ejabberd bound it port to 0.0.0.0 .

···

Am 24.07.2015 um 20:48 schrieb Adam:

>> When I run jvb.sh (Linux, OpenJDK 8) like so:
>>
>> ./jvb.sh --domain=chat.diseasedmind.com "--secret=No secrets
>> shall be posted to mailing lists, lol" --subdomain=videobridge
>> --host=chat.diseasedmind.com --port=5347
> With --host=chat... you command jvb to connect to chat..., i.e.
> the public ip address, but you probably want to use
> --host=localhost as this is where prosody is listening.


#5

Thanks for the tip on how to daemonize this service.

I solved this "connection refused" / "host-unknown" problem!

For future people who are having the same issues and come across this
message in the archives, here are the important points (error messages
you might receive, and the order they will occur in).

1.) Connection refused. jvb can't connect to your XMPP server. Check
to see if your XMPP server is bound to 0.0.0.0 or 127.0.0.1. This
appears to be the most common problem.

2.) "host-unknown". This is an issue with the XMPP server responding
with an error and jbb is just passing it along to you. Check your
XMPP server logs. In my case, I had defined the Component in Prodosy
as videobridge.diseasedmind.com when it should have been
videobridge.chat.diseasedmind.com

3.) "not-authorized". It's an issue with the shared secret. Check
for wacky characters which might be interpreted by your shell.

···

On 07/24/2015 10:40 PM, Cyborg wrote:

Am 24.07.2015 um 20:48 schrieb Adam:

When I run jvb.sh (Linux, OpenJDK 8) like so:

./jvb.sh --domain=chat.diseasedmind.com "--secret=No secrets
shall be posted to mailing lists, lol"
--subdomain=videobridge --host=chat.diseasedmind.com
--port=5347

With --host=chat... you command jvb to connect to chat...,
i.e. the public ip address, but you probably want to use
--host=localhost as this is where prosody is listening.

This worked for me :

daemon /opt/jvb/jvb.sh --domain=my-domainname.eu --secret=PASSWORD
--apis=rest,xmpp 2>/opt/jvb/log &

where our ejabberd bound it port to 0.0.0.0 .