Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 339
khoa_chung_89 Avatar asked Mar 15 '17 04:03

khoa_chung_89


1 Answers

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
like image 161
Nefi López Avatar answered Jan 01 '23 01:01

Nefi López