设置在EC2上打开服务器

时间:2020-07-08 10:14:34

标签: amazon-ec2 webrtc stun turn screensharing

我正在使用EC2(Amazon Linux 2)。我创建了Turn服务器

0: log file opened: /var/log/turn_8708_2020-07-08.log
0: 
RFC 3489/5389/5766/5780/6062/6156 STUN/TURN Server
Version Coturn-4.5.0.3 'dan Eider'
0: 
Max number of open files/sockets allowed for this process: 300000
0: 
Due to the open files/sockets limitation,
max supported number of TURN Sessions possible is: 150000 (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.2k-fips  26 Jan 2017
0: 
0: SQLite is not supported
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: Config file found: /usr/local/etc/turnserver.conf
0: log file opened: /var/log/turnserver_2020-07-08.log
0: Config file found: /usr/local/etc/turnserver.conf
0: Domain name: 
0: Default realm: meetmocha.com
0: 
CONFIGURATION ALERT: you specified long-term user accounts, (-u option) 
    but you did not specify the long-term credentials option
    (-a or --lt-cred-mech option).
    I am turning --lt-cred-mech ON for you, but double-check your configuration.
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: NO EXPLICIT LISTENER ADDRESS(ES) ARE CONFIGURED
0: ===========Discovering listener addresses: =========
0: Listener address to use: 127.0.0.1
0: Listener address to use: 172.26.193.9
0: Listener address to use: ::1
0: =====================================================
0: Total: 1 'real' addresses discovered
0: =====================================================
0: NO EXPLICIT RELAY ADDRESS(ES) ARE CONFIGURED
0: ===========Discovering relay addresses: =============
0: Relay address to use: 172.26.193.9
0: Relay address to use: ::1
0: =====================================================
0: Total: 2 relay addresses discovered
0: =====================================================
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 172.26.193.9 initialization...
0:   relay 172.26.193.9 initialization done
0:   relay ::1 initialization...
0:   relay ::1 initialization done
0: Relay ports initialization done
0: IO method (general relay thread): epoll (with changelist)
0: turn server id=1 created
0: IPv4. SCTP listener opened on : 127.0.0.1:3478
0: IPv4. TCP listener opened on : 127.0.0.1:3478
0: IPv4. TCP listener opened on : 172.26.193.9:3478
0: IPv6. SCTP listener opened on : ::1:3478
0: IPv6. TCP listener opened on : ::1:3478
0: IO method (general relay thread): epoll (with changelist)
0: turn server id=0 created
0: IPv4. TCP listener opened on : 127.0.0.1:3478
0: IPv4. TCP listener opened on : 172.26.193.9:3478
0: IPv6. TCP listener opened on : ::1:3478
0: IPv4. UDP listener opened on: 127.0.0.1:3478
0: IPv4. UDP listener opened on: 172.26.193.9:3478
0: IPv6. UDP listener opened on: ::1:3478
0: Total General servers: 2
0: IO method (admin thread): epoll (with changelist)
0: IPv4. CLI listener opened on : 127.0.0.1:5766
0: IO method (auth thread): epoll (with changelist)
0: IO method (auth thread): epoll (with changelist)

我已经在Trickle ICE页面上测试了我的转弯服务器:

enter image description here 但是,当我使用Javascript代码调用Turn服务器时,如果我在同一网络上进行的连接却无法成功建立连接,则仍然无法在其他网络上进行屏幕共享连接。

例如,我将笔记本电脑的屏幕共享到我的手机上,并且两个设备都连接了相同的wifi,但无法正常工作,但是如果互联网连接不同于正常工作,那么我在EC2服务器上设置了Turn服务器。将Turn server添加到我的Javascript代码后,我无法在其他网络上共享屏幕。

请问有人可以帮我吗?

0 个答案:

没有答案