Ошибка при настройке сервера Coturn на экземпляре виртуальной машины Google Compute Cloud

Я пытаюсь настроить сервер coturn на экземпляре виртуальной машины Google Compute Cloud с Ubuntu 14.04. Я думаю, что это проблема брандмауэра, но я открыл порт tcp: 3478 и udp: 3478 в настройках брандмауэра. На порте 3478 не запущены никакие другие процессы. Кто-нибудь пробовал установить это на gcloud? Что я делаю неправильно.

$ sudo turnserver -a -v -n -r north.gov -L 35.189.173.237
0: log file opened: /var/log/turn_2564_2017-07-06.log
0: 
RFC 3489/5389/5766/5780/6062/6156 STUN/TURN Server
Version Coturn-4.5.0.6 'dan Eider'
0: 
Max number of open files/sockets allowed for this process: 65536
0: 
Due to the open files/sockets limitation,
max supported number of TURN Sessions possible is: 32500 (approximately)
0: 

==== Show him the instruments, Practical Frost: ====

0: TLS supported
0: DTLS supported
0: DTLS 1.2 supported
0: TURN/STUN ALPN supported
0: Third-party authorization (oAuth) supported
0: GCM (AEAD) supported
0: OpenSSL compile-time version: OpenSSL 1.0.2g  1 Mar 2016 (0x1000207f)
0: 
0: SQLite supported, default database location is /usr/local/var/db/turndb
0: Redis is not supported
0: PostgreSQL is not supported
0: MySQL is not supported
0: MongoDB is not supported
0: 
0: Default Net Engine version: 3 (UDP thread per CPU core)

=====================================================

0: Listener address to use: 35.189.173.237
0: Domain name: 
0: Default realm: north.gov
0: WARNING: cannot find certificate file: turn_server_cert.pem (1)
0: WARNING: cannot start TLS and DTLS listeners because certificate file is not set properly
0: WARNING: cannot find private key file: turn_server_pkey.pem (1)
0: WARNING: cannot start TLS and DTLS listeners because private key file is not set properly
0: Relay address to use: 35.189.173.237
0: pid file created: /var/run/turnserver.pid
0: IO method (main listener thread): epoll (with changelist)
0: WARNING: I cannot support STUN CHANGE_REQUEST functionality because only one IP address is provided
0: Wait for relay ports initialization...
0:   relay 35.189.173.237 initialization...
0:   relay 35.189.173.237 initialization done
0: Relay ports initialization done
0: IO method (general relay thread): epoll (with changelist)
0: turn server id=1 created
bind: Cannot assign requested address
0: IO method (general relay thread): epoll (with changelist)
0: turn server id=0 created
bind: Cannot assign requested address
bind: Cannot assign requested address
0: Trying to bind fd 16 to <35.189.173.237:3478>: errno=99
Cannot bind local socket to addr: Cannot assign requested address
0: Trying to bind fd 20 to <35.189.173.237:3478>: errno=99
Cannot bind local socket to addr: Cannot assign requested address
0: Cannot bind DTLS/UDP listener socket to addr 35.189.173.237:3478
0: Trying to bind DTLS/UDP listener socket to addr 35.189.173.237:3478, again...
0: Cannot bind TLS/TCP listener socket to addr 35.189.173.237:3478
0: Trying to bind TLS/TCP listener socket to addr 35.189.173.237:3478, again...
0: Trying to bind fd 18 to <35.189.173.237:3478>: errno=99
Cannot bind local socket to addr: Cannot assign requested address
0: Cannot bind TLS/TCP listener socket to addr 35.189.173.237:3478
0: Trying to bind TLS/TCP listener socket to addr 35.189.173.237:3478, again...
bind: Cannot assign requested address
0: Trying to bind fd 20 to <35.189.173.237:3478>: errno=99
Cannot bind local socket to addr: Cannot assign requested address
0: Cannot bind DTLS/UDP listener socket to addr 35.189.173.237:3478
0: Trying to bind DTLS/UDP listener socket to addr 35.189.173.237:3478, again...
bind: Cannot assign requested address
0: Trying to bind fd 16 to <35.189.173.237:3478>: errno=99
bind: Cannot assign requested address
0: Trying to bind fd 18 to <35.189.173.237:3478>: errno=99
Cannot bind local socket to addr: Cannot assign requested address
Cannot bind local socket to addr: Cannot assign requested address
0: Cannot bind TLS/TCP listener socket to addr 35.189.173.237:3478
0: Trying to bind TLS/TCP listener socket to addr 35.189.173.237:3478, again...
0: Cannot bind TLS/TCP listener socket to addr 35.189.173.237:3478
0: Trying to bind TLS/TCP listener socket to addr 35.189.173.237:3478, again...
bind: Cannot assign requested address
0: Trying to bind fd 20 to <35.189.173.237:3478>: errno=99
Cannot bind local socket to addr: Cannot assign requested address
0: Cannot bind DTLS/UDP listener socket to addr 35.189.173.237:3478
0: Trying to bind DTLS/UDP listener socket to addr 35.189.173.237:3478, again...
bind: Cannot assign requested address
bind: Cannot assign requested address

person Aayush Aarwal    schedule 06.07.2017    source источник


Ответы (1)


Я понял, что использовал неправильную команду для запуска Turnserver. Если у кого-то возникают проблемы с настройкой coturn-сервера на AmazaonEC2 / GCloud, мне это очень помогло: https://blog.knoldus.com/2013/10/24/configure-turn-server-for-webrtc-on-amazon-ec2/

person Aayush Aarwal    schedule 06.07.2017