jitsi / docker-jitsi-meet

Jitsi Meet on Docker
https://hub.docker.com/u/jitsi/
Apache License 2.0
3.09k stars 1.37k forks source link

Jitsi-Meet (Docker) behind NAT. External users worked, internal users after 30seconds get reconecting =( How fix it? #651

Open arpsyapathy opened 4 years ago

arpsyapathy commented 4 years ago

Hi all! We have last Jitsi-Meet docker. internal ip - 172.18.20.15 (example) extternal ip - 30.134.40.23 (example)

for internal users i open 443/tcp,4443/tcp,10000udp from internet by external ip i have the same ports opened.

In my .env:

# Public URL for the web service
PUBLIC_URL=https://mydomain.com

# IP address of the Docker host
# See the "Running behind NAT or on a LAN environment" section in the README
DOCKER_HOST_ADDRESS=30.134.40.23

External users worked, internal users after 30seconds get reconecting Apparently something else needs to be done? Any settings for jvb?

Help me please. Thanks in advance

sip-communicator.properties:
org.jitsi.videobridge.SINGLE_PORT_HARVESTER_PORT=10000
    org.jitsi.videobridge.DISABLE_TCP_HARVESTER=true
    org.jitsi.videobridge.TCP_HARVESTER_PORT=4443
    org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES=<secret>:443
    org.jitsi.videobridge.xmpp.user.shard.HOSTNAME=<secret>
    org.jitsi.videobridge.xmpp.user.shard.DOMAIN=<secret>
    org.jitsi.videobridge.xmpp.user.shard.USERNAME=<secret>
    org.jitsi.videobridge.xmpp.user.shard.PASSWORD=<secret>
    org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS=<secret>
    org.jitsi.videobridge.xmpp.user.shard.MUC_NICKNAME=<secret>
    org.jitsi.videobridge.xmpp.user.shard.DISABLE_CERTIFICATE_VERIFICATION=true
    org.jitsi.videobridge.ENABLE_STATISTICS=true
    org.jitsi.videobridge.STATISTICS_TRANSPORT=muc
    org.jitsi.videobridge.STATISTICS_INTERVAL=5000
pca-homsi commented 4 years ago

I had a similar problem. After some network traffic capture i found that jitsi meet is trying to connect to internal docker network jvb ip address 172.XXX which is not reachable from the lan. The solution was to let the container run directly on network_mode: host I hope it will help

@bgrozev

arpsyapathy commented 4 years ago

I had a similar problem. After some network traffic capture i found that jitsi meet is trying to connect to internal docker network jvb ip address 172.XXX which is not reachable from the lan. The solution was to let the container run directly on network_mode: host I hope it will help

@bgrozev

Thank you. I will try it. Only jvb container need network mode host,or all components? (Prosody etc)

pca-homsi commented 4 years ago

I had a similar problem. After some network traffic capture i found that jitsi meet is trying to connect to internal docker network jvb ip address 172.XXX which is not reachable from the lan. The solution was to let the container run directly on network_mode: host I hope it will help @bgrozev

Thank you. I will try it. Only jvb container need network mode host,or all components? (Prosody etc)

Only jvb But make sure jvb can connect to prosody somehow : I did it with /etc/hosts file

bluikko commented 4 years ago

@pca-homsi Are you using traefik? I am using it with traefik and have doubts that the example traefik configuration is correct. For example the TCP_HARVESTER_PORT doesn't seem to work at all. So your solution to run jvb on host sounds interesting.

@arpsyapathy I believe DOCKER_HOST_ADDRESS should not be the NAT public IP address. It should be the Docker host IP address without translation (i.e. the private IP address configured on Docker host external interface). There is a recent separate issue #657.

pca-homsi commented 4 years ago

@pca-homsi Are you using traefik? I am using it with traefik and have doubts that the example traefik configuration is correct. For example the TCP_HARVESTER_PORT doesn't seem to work at all. So your solution to run jvb on host sounds interesting.

@arpsyapathy I believe DOCKER_HOST_ADDRESS should not be the NAT public IP address. It should be the Docker host IP address without translation (i.e. the private IP address configured on Docker host external interface). There is a recent separate issue #657.

No i'm not using traefik

cilcil97 commented 4 years ago

@arpsyapathy could you please share the /etc host idea . I have a different approach, i am setting up the docker network as external so I could have more jvb's for scalability and redundancy .Thanks in advance

pca-homsi commented 3 years ago

@arpsyapathy could you please share the /etc host idea . I have a different approach, i am setting up the docker network as external so I could have more jvb's for scalability and redundancy .Thanks in advance

The idea is to run jvb on host and edit /etc/host to let jvb talk to prosody : 172.33.0.11 auth.meet.jitsi internal-muc.meet.jitsi xmpp.meet.jitsi

where X.X.X.X is the internal container ip of prosody

edit docker-compose like this : prosody: ... networks: meet.jitsi: ipv4_address: X.X.X.X