Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

TURNS (TURN with TLS/DTLS) socket buffer operation error #3299

Open
532910 opened this issue Sep 12, 2019 · 21 comments
Open

TURNS (TURN with TLS/DTLS) socket buffer operation error #3299

532910 opened this issue Sep 12, 2019 · 21 comments

Comments

@532910
Copy link
Contributor

532910 commented Sep 12, 2019

TURNS doesn't work.

With
turn_uris: [ "turns:domain.tld:5349?transport=udp", "turns:domain.tld:5349?transport=tcp" ]
or
turn_uris: [ "turns:domain.tld:3478?transport=udp", "turns:domain.tld:3478?transport=tcp" ]

turnserver reports an error: session closed ... reason: TLS/TCP socket buffer operation error (callback)

riot-web works fine, testssl.sh domain.tld:5349 and testssl.sh domain.tld:3478 also shows no errors.

@whoerau
Copy link

whoerau commented Oct 15, 2019

I had the same problem, I am using a free certificate (letscrypt)

@root562
Copy link

root562 commented Oct 15, 2019

No problem here. But I am using my own TURN server.

@532910
Copy link
Contributor Author

532910 commented Oct 15, 2019

You'd like to say you're using ssl'ed turn without any issues?

@whoerau
Copy link

whoerau commented Oct 15, 2019

@root562 yeah, I am also using my own TURN server . When I use non-ssl mode ( turn:yourdomain), it can be used, but ssl mode( turns:yourdomain ) will report an error

@root562
Copy link

root562 commented Oct 15, 2019

No SSL on my TURN. My Turn server is only accessible by VPN.

@532910
Copy link
Contributor Author

532910 commented Oct 15, 2019

No SSL on my TURN. My Turn server is only accessible by VPN.

So, what the reason to reply have no problem if you even don't use TURNS?

@madpsy
Copy link

madpsy commented Oct 26, 2019

I'm also seeing this with coturn 4.5.0.7-1ubuntu2.18.04. This is with riot 0.9.8 on Android 9.

I had no-tlsv1 and no-tlsv1_1 set in turnserver.conf but even after disabling those (thinking maybe the Android client only supports TLS 1.1) the issue remained. I'm using a very compatible cipher-list.

Can confirm it works flawlessly without TLS and that Nextcloud Talk works with the same coturn server using TLS.

@ghost
Copy link

ghost commented Jan 12, 2020

Exact same issue here: (D)TLS does not work, only unencrypted communication works.

I am running coturn 4.5.1.1 from Debian and riot-android 0.9.9 on Android 9
Any workaround to have DTLS working ? Any news from the developpers ?

@bahur142
Copy link

Same problem by me. DTLS does not work. Only unencrypted.
Debian Buster
coturn-4.5.1.1
matrix-synapse 1.7.3

@mjattiot
Copy link

mjattiot commented Feb 3, 2020

On riot-web I've got the same error but still, the voice is working ...

@agherzan
Copy link

I can confirm the same issue on riot android when using coturn with SSL. Unencrypted works fine. Do we know if this is in anyone's radar to fix?

@brknkfr
Copy link

brknkfr commented Mar 28, 2020

I had the same problem on a debian buster system … My advice: double check the certificates on the coturn server (are they really valid?) an the paths to the certificates specified in turnserver.conf, make them accessible by the user running coturn.

@faenil
Copy link

faenil commented Apr 13, 2020

same problem here.
The android Riot app does not seem to be trusting the LetsEncrypt certificate.
The coturn server is offering LetsEncrypt's fullchain.pem but Android's Riot.im is failing with TLS Alert "Unknown CA" when trying to contact the turns server.

It works fine through the Linux (riot-web) client.

Can any developer shed some light on which certificates store is used on the Android app to trigger the turns connection?

@djrzulf
Copy link

djrzulf commented Apr 13, 2020

I've SSL cert from CA authority other than LetsEncrypt's and SSL and TURN server doesn't works properly with iOS and WEB Client. For workaround to work this i'm temporally disabled SSL with parameters at turnserver.conf:

no-sslv3
no-tlsv1
no-tlsv1_1
no-tlsv1_2

And works perfectly with audio and audio/video one-one via Riot client.

@faenil
Copy link

faenil commented Apr 13, 2020

@djrzulf do you also get an Unknown CA TLS Alert in the packets dump? If so, which CA is your cert signed by?

@localguru
Copy link

Some problem here, using coturn with jitsi. Does it have something to do with the CA-file option?

@ghost
Copy link

ghost commented May 15, 2020

same problem heare
origin <>, local 127.0.0.1:4445, remote 127.0.0.1:38116, reason: TLS/TCP socket buffer operation error (callback)

lifetime=0, cipher=TLS_AES_256_GCM_SHA384, method=UNKNOWN

@PepeLopez
Copy link

Actually, a still open issue. Have the same problems with coturn & BBB on Debian Buster, TLS ON = error, OFF = working.
However, SSL/TLS ON => audio is working!?

@mawoka-myblock
Copy link

I also have the problem, but it also doesn't work for me if I deactivate ssl/tls in my config. The it seems as the webclient connects succesfull, but the android app still fails.

@prijindal
Copy link

Able to reproduce. works perfectly with turn:, not working with turns:.
Problem only visible in android and ios. works perfectly from mobile browsers(tested with firefox)

@nirgal
Copy link

nirgal commented Jul 9, 2021

Very similar to jitsi/jitsi-meet#6383 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests