YunoHost-Apps / galene_ynh

Galène package for YunoHost
https://galene.org/
GNU General Public License v3.0
10 stars 4 forks source link

Galene coturn server is not configured correctly: /relay-test fails #43

Closed jakobkilian closed 3 years ago

jakobkilian commented 3 years ago

Hey there. A big thx for your great work on Yunohost and Galene at first!

Describe the bug

Several users (mostly using non-chromium browsers and a mobile internet connection) have problems to join a Galene conference (they are visible in the sidebar but can't establish video/audio). While investigating into the issue (started a thread over at galene's repo ) I found out that my TURN server seems to be configured incorrectly: /relay-test in Galene fails: Relay test failed: Error: timeout

I checked if the server is running and read the configuration, but I can't find out what the problem is. So if you have a tip, I'd be very happy about it

Context

Steps to reproduce

Expected behavior

TURN server should be up and running. /relay-test should succeed.

Logs | What else I have done

I replaced the ip with ip.add.of.server and the url with myurl.org – hope that is ok. Of course I can privately share the IP if you want to perform a test or so.

Here are the logs of the coturn-galene service. I did some other things to understand what the problem is, but didn't really understand the implications.

lapineige commented 3 years ago

Thanks a lot for the super detailed and structured description of your issue :)

I suppose restarting both Galène and the TURN server did not work ? Could you share your Galène ICE config file, just in case ?

Do you have any other TURN server running ? (for instance the one from Matrix-Synapse app)

jakobkilian commented 3 years ago

Very welcome, it is me to say thx for the development of galene for ynh!

Right, restart didn't change the situation. Just found out that galene has this failure in its logs: May 03 14:26:39 galene[876]: 2021/05/03 14:26:39 client: websocket: close 1006 (abnormal closure): unexpected EOF Don't know it it is important...

My ./opt/yunohost/galene/data/ice-servers.json is:

[
    {
        "urls": [
            "turn:myurl.org:1194",
            "turn:myurl.org:1194?transport=tcp"
        ],
        "username": "galene",
        "credential": "XXXX"
    }
]

Two thoughts:

Tell me if I can do anything further...

lapineige commented 3 years ago

unexpected EOF

That means that the is an error in the End Of a File. Often an error with wrongly formatted json or such… Maybe that ICE config file has a bad syntax ?

jakobkilian commented 3 years ago

Hmmm, actually it really is the content i posted... Can't see any bad syntax in that file...

jech commented 3 years ago

@lapineige, no, in this case, the "unexpected EOF" means that a client disconnected without sending the close handshake. This may happen for example if a browser crashes, and is nothing to worry about.

The issue is somewhere else.

jakobkilian commented 3 years ago

Ok I tried to get myself deeper into how the turn server should work on my server. When I tried to make the turnserver listen to the default ports I got the message:

admin@XXX:/opt/yunohost/galene$ ./galene -http :8443
2021/05/10 10:23:53 Server: listen tcp :8443: bind: address already in use
admin@XXX:/opt/yunohost/galene$ ./galene -turn :1194
2021/05/10 10:24:06 Starting built-in TURN server on :1194
2021/05/10 10:24:06 Server: listen tcp :8443: bind: address already in use

Is this normal? 8443 is already inn use because of galene itself...

tcp6 0 0 :::8443 :::* LISTEN 29553/galene

Furthermore, even with coturn-galene turned off there seems to be another turnsever running. Where is this coming from (can't imagine another app using turn and din't configure it myself) and can this conflict with the coturn-galene?

tcp        0      0 myIP4ADDR:3478          0.0.0.0:*               LISTEN      951/turnserver      
tcp        0      0 127.0.0.1:3478          0.0.0.0:*               LISTEN      951/turnserver      
tcp        0      0 myIP4ADDR:3478          0.0.0.0:*               LISTEN      951/turnserver      
tcp        0      0 127.0.0.1:3478          0.0.0.0:*               LISTEN      951/turnserver      
tcp        0      0 myIP4ADDR:3478          0.0.0.0:*               LISTEN      951/turnserver      
tcp        0      0 127.0.0.1:3478          0.0.0.0:*               LISTEN      951/turnserver      
tcp        0      0 myIP4ADDR:3478          0.0.0.0:*               LISTEN      951/turnserver      
tcp        0      0 127.0.0.1:3478          0.0.0.0:*               LISTEN      951/turnserver            
tcp        0      0 myIP4ADDR:3479          0.0.0.0:*               LISTEN      951/turnserver      
tcp        0      0 127.0.0.1:3479          0.0.0.0:*               LISTEN      951/turnserver      
tcp        0      0 myIP4ADDR:3479          0.0.0.0:*               LISTEN      951/turnserver      
tcp        0      0 127.0.0.1:3479          0.0.0.0:*               LISTEN      951/turnserver      
tcp        0      0 myIP4ADDR:3479          0.0.0.0:*               LISTEN      951/turnserver      
tcp        0      0 127.0.0.1:3479          0.0.0.0:*               LISTEN      951/turnserver      
tcp        0      0 myIP4ADDR:3479          0.0.0.0:*               LISTEN      951/turnserver      
tcp        0      0 127.0.0.1:3479          0.0.0.0:*               LISTEN      951/turnserver   
tcp6       0      0 ::1:3478                :::*                    LISTEN      951/turnserver      
tcp6       0      0 myIP6ADDR:3478          :::*                    LISTEN      951/turnserver      
tcp6       0      0 ::1:3478                :::*                    LISTEN      951/turnserver      
tcp6       0      0 myIP6ADDR:3478          :::*                    LISTEN      951/turnserver      
tcp6       0      0 ::1:3478                :::*                    LISTEN      951/turnserver      
tcp6       0      0 myIP6ADDR:3478          :::*                    LISTEN      951/turnserver      
tcp6       0      0 ::1:3478                :::*                    LISTEN      951/turnserver      
tcp6       0      0 myIP6ADDR:3478          :::*                    LISTEN      951/turnserver      
tcp6       0      0 ::1:3479                :::*                    LISTEN      951/turnserver      
tcp6       0      0 myIP6ADDR:3479          :::*                    LISTEN      951/turnserver      
tcp6       0      0 ::1:3479                :::*                    LISTEN      951/turnserver      
tcp6       0      0 myIP6ADDR:3479          :::*                    LISTEN      951/turnserver      
tcp6       0      0 ::1:3479                :::*                    LISTEN      951/turnserver      
tcp6       0      0 myIP6ADDR:3479          :::*                    LISTEN      951/turnserver      
tcp6       0      0 ::1:3479                :::*                    LISTEN      951/turnserver      
tcp6       0      0 myIP6ADDR:3479          :::*                    LISTEN      951/turnserver   
udp        0      0 myIP4ADDR:3478          0.0.0.0:*                           951/turnserver      
udp        0      0 myIP4ADDR:3478          0.0.0.0:*                           951/turnserver      
udp        0      0 myIP4ADDR:3478          0.0.0.0:*                           951/turnserver      
udp        0      0 myIP4ADDR:3478          0.0.0.0:*                           951/turnserver      
udp        0      0 127.0.0.1:3478          0.0.0.0:*                           951/turnserver      
udp        0      0 127.0.0.1:3478          0.0.0.0:*                           951/turnserver      
udp        0      0 127.0.0.1:3478          0.0.0.0:*                           951/turnserver      
udp        0      0 127.0.0.1:3478          0.0.0.0:*                           951/turnserver      
udp        0      0 myIP4ADDR:3479          0.0.0.0:*                           951/turnserver      
udp        0      0 myIP4ADDR:3479          0.0.0.0:*                           951/turnserver      
udp        0      0 myIP4ADDR:3479          0.0.0.0:*                           951/turnserver      
udp        0      0 myIP4ADDR:3479          0.0.0.0:*                           951/turnserver      
udp        0      0 127.0.0.1:3479          0.0.0.0:*                           951/turnserver      
udp        0      0 127.0.0.1:3479          0.0.0.0:*                           951/turnserver      
udp        0      0 127.0.0.1:3479          0.0.0.0:*                           951/turnserver      
udp        0      0 127.0.0.1:3479          0.0.0.0:*                           951/turnserver      
udp6       0      0 ::1:3478                :::*                                951/turnserver      
udp6       0      0 ::1:3478                :::*                                951/turnserver      
udp6       0      0 ::1:3478                :::*                                951/turnserver      
udp6       0      0 ::1:3478                :::*                                951/turnserver      
udp6       0      0 myIP6ADDR:3478          :::*                                951/turnserver      
udp6       0      0 myIP6ADDR:3478          :::*                                951/turnserver      
udp6       0      0 myIP6ADDR:3478          :::*                                951/turnserver      
udp6       0      0 myIP6ADDR:3478          :::*                                951/turnserver      
udp6       0      0 ::1:3479                :::*                                951/turnserver      
udp6       0      0 ::1:3479                :::*                                951/turnserver      
udp6       0      0 ::1:3479                :::*                                951/turnserver      
udp6       0      0 ::1:3479                :::*                                951/turnserver      
udp6       0      0 myIP6ADDR:3479          :::*                                951/turnserver      
udp6       0      0 myIP6ADDR:3479          :::*                                951/turnserver      
udp6       0      0 myIP6ADDR:3479          :::*                                951/turnserver      
udp6       0      0 myIP6ADDR:3479          :::*                                951/turnserver      

When co-turn is started the server appears with netstat -tulpn as "9500/turnserver " I also checked the Firewall and the ports (1194 and 8443) are open.

What could I check next? Or is my knowledge just to low to proceed any further? ;-)

And just to add: issue can also be reproduced by using a guest network of a Fritz.Box (Maybe the higher ports are prohibited there too?

ericgaspar commented 3 years ago

@jakobkilian Sorry for the late reply. You can test this other repo which uses Galène with its integrated TURN server. it doesn't work with ipv6 i believe. sudo yunohost app install https://github.com/YunoHost-Apps/galene_ynh/tree/without-turn Tell me if you are able to ping the TURN server with /relay-test

jakobkilian commented 3 years ago

Wow. It works out of the box! Thank you so much! Also tried to set up an own server with instructions by my hoster, but naw, didn't work and I still don't really understand the whole topic -.- But for now, this works, thx!

ericgaspar commented 3 years ago

Someone add the same error with a different app this week. I have no idea of the problem...