Install rfc5766-turn-server, Trying to bind fd to <ip address>: errno=99
Asked Answered
M

2

6

I'm using an Ubuntu 14.04 (an Azure VPS actually) so i have to installed rfc5766-turn-server not the latest coturn version. I have following this guide.

At the last step, i cannot start turnserver. My command to start:

turnserver -n -L <my_server_public_IP> -X <my_server_public_IP> -E <my_server_public_IP> -a -f -r my-domain.com --cert /myPath/TurnServerCerts/turnserver.crt --pkey /myPath/TurnServerCerts/turnserver.key

I got from the log:

........
bind: Cannot assign requested address
0: Trying to bind fd 14 to <my_server_public_IP:3478>: errno=99
Cannot bind local socket to addr: Cannot assign requested address
0: Cannot bind UDP/DTLS listener socket to addr <my_server_public_IP:3478>:3478
0: Trying to bind UDP/DTLS listener socket to addr <my_server_public_IP:3478>:3478, again...
0: Trying to bind fd 15 to <my_server_public_IP:3478>: errno=99
Cannot bind local socket to addr: Cannot assign requested address
........

I have tried remove the listening IP (the -L parameter) from the command and the turnserver can start. However, in that case, turnserver just listen on local IP address. How can i make it listen to public IP address?

Monosymmetric answered 15/3, 2017 at 4:53 Comment(0)
B
7

Hi never I've used rfc5766-turn-server, but I had this same problem with coturn server and it's a fork, change the relay ip for your local IP, and listening IP for local IP

this is my config file

listening-port=3478
tls-listening-port=5349

listening-ip=192.168.1.20

relay-ip=192.168.1.20
external-ip=PUBLIC-IP_ADDRESS

realm=domainname.com
server-name=servername

lt-cred-mech
userdb=/etc/turnuserdb.conf

cert=/etc/ssl/certificate.pem
pkey=/etc/ssl/private.key

no-stdout-log
Baier answered 20/3, 2017 at 19:56 Comment(1)
Just for clarity, public ip for external, private ip for listening/relay. Public ip can be found with curl https://ipinfo.io/ip and private ip with hostname -I. Also, if you're behind a NAT (many EC2 users will be) your external ip config should be set as external-ip=$PUBLIC_IP/$PRIVATE_IPImpolitic
E
1

Just comment out 'relay-ip' and 'listeing-ip'. CoTurn will get it automatically. Also make sure, you're allowing incoming/outgoing udp requests. That was my fault and I wasted a couple of hours.

Emmet answered 30/9, 2019 at 15:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.