Project

General

Profile

jingle protocol support

Alex Kobzar
Added over 2 years ago

Hello dear maintainers.

I installed the last version of Tigase XMPP server. All working at the moment.

But i want use my jabber server for audio/video call to.

So, after install, i am connected with Jitsi client from two accounts(two different PC) and try call from one to other.

Video and audio calls working.(My XMMP server isn't in my office).

So, when both PC (clients) connected from my office place - video/audio is working. But when i try call from one client who connected from my place to other, who connected from other place - isn't.

I see incoming audio/video call, accepted it. Call established, but video/audio is not transfer.

I think that is the NAT problem, so i am configure STUN in Tigase

(My own server have only one network interface with one white IP. E.X. - 185.135.111.22)

So, it's my configuration

  1. Stun

--comp-name-4 = stun

--comp-class-4 = tigase.stun.StunComponent

stun/stun-primary-ip=185.135.111.22

stun/stun-primary-port[I]=3478

stun/stun-secondary-ip=185.135.111.22

stun/stun-secondary-port[I]=7001

  1. additional setting of external ip/port

stun/stun-primary-external-ip=185.135.111.22

stun/stun-primary-external-port[I]=3479

stun/stun-secondary-external-ip=185.135.111.22

stun/stun-secondary-external-port[I]=7002

All ports is open in firewall, server started without errors.

But it isn't help me. I try change setting in Jitsi with all variants, but still cant resolve the issue.

Could you help me with this problem? It's very importable for me.

Thanks for any ideas.


Replies (12)

Added by Wojciech Kapcia TigaseTeam over 2 years ago

It definitely looks like NAT problem. Your configuration looks OK.

I think the best would be to ask on Jitsi forums to troubleshoot connectivity problem you are experiencing with their client.

Added by Alex Kobzar over 2 years ago

Could you explain me how i can add stun server component save/show log in Tigase?

At the moment i have got two problems.

When i try connect to 3478 port

@==> logs/tigase-console.log <==

2016-05-17 13:57:19.646 [Thread-4102] ThreadExceptionHandler.uncaughtException() SEVERE: Uncaught thread: "Thread-4102" exception

java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

    at de.javawi.jstun.header.MessageHeader.<clinit>(MessageHeader.java:41)

    at tigase.stun.StunServerReceiverThread.run(StunServerReceiverThread.java:69)

Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory

    at java.net.URLClassLoader.findClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    at de.javawi.jstun.header.MessageHeader.<clinit>(MessageHeader.java:41)

    at tigase.stun.StunServerReceiverThread.run(StunServerReceiverThread.java:69)

==> logs/tigase.log.0 <==

2016-05-17 13:57:19.646 [Thread-4102] ThreadExceptionHandler.uncaughtException() SEVERE: Uncaught thread: "Thread-4102" exception

java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

    at de.javawi.jstun.header.MessageHeader.<clinit>(MessageHeader.java:41)

    at tigase.stun.StunServerReceiverThread.run(StunServerReceiverThread.java:69)

Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory

    at java.net.URLClassLoader.findClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    at de.javawi.jstun.header.MessageHeader.<clinit>(MessageHeader.java:41)

    at tigase.stun.StunServerReceiverThread.run(StunServerReceiverThread.java:69)@

And this when connect to 7001

@==> logs/tigase-console.log <==

2016-05-17 13:57:45.535 [Thread-4103] ThreadExceptionHandler.uncaughtException() SEVERE: Uncaught thread: "Thread-4103" exception

java.lang.NoClassDefFoundError: Could not initialize class de.javawi.jstun.header.MessageHeader

    at tigase.stun.StunServerReceiverThread.run(StunServerReceiverThread.java:69)

==> logs/tigase.log.0 <==

2016-05-17 13:57:45.535 [Thread-4103] ThreadExceptionHandler.uncaughtException() SEVERE: Uncaught thread: "Thread-4103" exception

java.lang.NoClassDefFoundError: Could not initialize class de.javawi.jstun.header.MessageHeader

    at tigase.stun.StunServerReceiverThread.run(StunServerReceiverThread.java:69)@

So, as i am understand i dont have some JAR files in tigase jar folder. I am use nightly build, so i was download the last tar.gz file and extract all files from jar directory to tigase jar folder.

After this i am restarted tigase, but when try connect to stun don't see any info in logs and can't connected.

I am do everything by this manual [[[https://projects.tigase.org/projects/stun/wiki/Configuration]]]

Added by Alex Kobzar over 2 years ago

After some setting and changes

i see this messages in logs

=> logs/tigase.log <==

2016-05-17 20:42:42,802 [Thread-4097] DEBUG d.javawi.jstun.header.MessageHeader - Binding Request received.

2016-05-17 20:42:44,661 [Thread-4097] DEBUG d.javawi.jstun.header.MessageHeader - Binding Request received.

2016-05-17 20:42:46,662 [Thread-4097] DEBUG d.javawi.jstun.header.MessageHeader - Binding Request received.

2016-05-17 20:42:48,665 [Thread-4097] DEBUG d.javawi.jstun.header.MessageHeader - Binding Request received.

But stun client still can't connected (get info from stun)

and results all time is

--> pystun -d -H chat.DOMAIN.com -P 3478

DEBUG:pystun:Do Test1

DEBUG:pystun:sendto: ('chat.DOMAIN.com', 3478)

DEBUG:pystun:sendto: ('chat.DOMAIN.com', 3478)

DEBUG:pystun:sendto: ('chat.DOMAIN.com', 3478)

DEBUG:pystun:sendto: ('chat.DOMAIN.com', 3478)

NAT Type: Blocked

External IP: None

External Port: None

Added by Alex Kobzar over 2 years ago

And one more question:

As i see, Tigase stun working only with IPv6.

How i can started it for IPv4 ? (i think issue in this place)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 2 years ago

Hi,

I think that you should use following config, however STUN protocol suggest using 2 IP addresses and may fail to work with single IP address.

--comp-name-4 = stun
--comp-class-4 = tigase.stun.StunComponent
stun/stun-primary-ip=185.135.111.22
stun/stun-primary-port[I]=3478
stun/stun-secondary-ip=185.135.111.22
stun/stun-secondary-port[I]=7001

As i see, Tigase stun working only with IPv6.

I do not see point in using STUN in IPv6 networks as STUN server is used to deal with NAT and in IPv6 networks there is no NAT.

We tested STUN in IPv4 networks and it worked fine, however if I remember correctly we used setup with 2 IP addresses, not single IP address as with single IP address it STUN protocol was not able to properly deal with some types of NAT

Added by Alex Kobzar over 2 years ago

I don't know how are you testing...

But if i try use short configuration (without external)

i see the same messages in tigase logs

==> logs/tigase.log <==

2016-05-18 15:57:52,362 [Thread-4103] DEBUG d.javawi.jstun.header.MessageHeader - Binding Request received.

And next results with netstat

`--# netstat -an|grep 3478

udp6 0 0 127.0.0.1:3478 :::*

udp6 0 0 185.135.111.22:3478 :::*

As you can see, stun is worked, but with udp6 protocol. So, it's problem.

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 2 years ago

Here are my results from test which I just executed on my local machine (OSX):

udp4       0      0  172.16.0.2.3578        *.*                               
udp4       0      0  172.16.0.2.7000        *.*                               
udp4       0      0  127.0.0.1.3578         *.*                               
udp4       0      0  127.0.0.1.7000         *.*   

As you can see proper UDP ports are opened using udp4. I got this results with following configuration:

--comp-name-3=stun
--comp-class-3=tigase.stun.StunComponent

stun/stun-primary-ip=127.0.0.1
stun/stun-primary-port[I]=7000
stun/stun-secondary-ip=172.16.0.2
stun/stun-secondary-port[I]=3578
stun/stun-primary-external-port[I]=8000
stun/stun-secondary-external-port[I]=9000

Due to that I suppose that this issue must be caused by system configuration, JVM version or wrong IP configuration.

Could you post your OS name and version, JVM name and version and configuration of IP addresses (result of ipconfig or @ifconfig@)?

Added by Alex Kobzar over 2 years ago

Centos 7 x64

`--# java -version

java version "1.8.0_91"

Java(TM) SE Runtime Environment (build 1.8.0_91-b14)

Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

`--# hostname

chat.mydomain.com

`--# cat /etc/hosts

127.0.0.1 localhost chat chat.mydomain.com

185.135.111.22 chat.mydomain.com

`--# ifconfig

enp2s0f0: flags=4163 mtu 1500

    inet 185.135.111.22  netmask 255.255.255.228  broadcast 185.135.111.100

    inet6 2xxx:xx0:xx:0:185.135.111.22  prefixlen 48  scopeid 0x0<global>

    inet6 fe80::xxx:xxx:xxxx:xxxx  prefixlen 64  scopeid 0x20<link>

    ether 00:xx:xx:x0:xx:x6  txqueuelen 1000  (Ethernet)

    RX packets 91743516  bytes 14194323403 (3.2 GiB)

    RX errors 0  dropped 3822370  overruns 0  frame 0

    TX packets 116344994  bytes 86909430445 (0.9 GiB)

    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    device memory 0xfdsf80000-feb9ffff

Added by Alex Kobzar over 2 years ago

Any updates?

And can i use STUN with user auth (jid+pass)???

Added by Alex Kobzar over 2 years ago

Updates?

Added by Wojciech Kapcia TigaseTeam over 2 years ago

First of all - please avoid bumping the threads - there is absolutely no need for it!

As for the issue at hand - can you append following JVM property -Djava.net.preferIPv4Stack=true to the JAVA startup parameter list and check if that worked for you?

Added by Alex Kobzar over 2 years ago

Yes! This is fixed my problem. Thanks for the support.

    (1-12/12)