Unable to connect to stun/turn server and thus the user is not able to make the audio connection.
- Steps to reproduce the behavior:
- I used the automatic deployment setup script with 2 application instances and 1 turn instance.
- When I run the "sudo bbb-conf --check" on my application instance, it displays this warning.
- When I execute this command it said "Primary: Blocked or could not reach STUN server"
root@ip-:/var/snap/amazon-ssm-agent/6312# stun
tu-abc.xyz.com
STUN client version 0.97
Primary: Blocked or could not reach STUN server
Return value is 0x00001c
But able to reach to google stun server.
root@ip-:/var/snap/amazon-ssm-agent/6312# stun
stun.l.google.com
STUN client version 0.97
Primary: Open
Return value is 0x000001
- I logged into turn instance and check the available port.
root@ip-:/var/snap/amazon-ssm-agent/6312# netstat -eanp --ip
Active Internet connections (servers and established)
**Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name**
tcp 0 0
127.0.0.53:53 0.0.0.0:* LISTEN 101 18415 436/systemd-resolve
tcp 0 0
0.0.0.0:22 0.0.0.0:* LISTEN 0 24738 1230/sshd: /usr/sbi
tcp 0 0 <primary-ip>:57438
52.94.177.131:443 ESTABLISHED 0 244052 1239/ssm-agent-work
tcp 0 0 <primary-ip>:48300
54.240.254.186:443 ESTABLISHED 0 244030 27070/ssm-session-w
tcp 0 0 <primary-ip>:52992
52.94.181.45:443 ESTABLISHED 0 227594 1239/ssm-agent-work
tcp 0 0 <primary-ip>:35018
44.234.123.127:443 ESTABLISHED 997 244062 18258/amazon-cloudw
tcp 0 0 <primary-ip>:49314
44.234.123.80:443 TIME_WAIT 0 0 -
tcp 0 0 <primary-ip>:36230
44.234.123.87:443 TIME_WAIT 0 0 -
tcp 0 336 <primary-ip>:48312
54.240.254.186:443 ESTABLISHED 0 244033 27070/ssm-session-w
udp 0 0
127.0.0.53:53 0.0.0.0:* 101 18414 436/systemd-resolve
udp 0 0
10.1.16.217:68 0.0.0.0:* 100 239214 433/systemd-network
logs are displaying this error:
root@ip-<primary-ip>:/var/snap/amazon-ssm-agent/6312# cat /var/log/turnserver/turnserver.log
0: log file opened: /var/log/turnserver/turnserver.log
0: pid file created: /run/turnserver/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 <public-ip> initialization...
0: relay <public-ip> initialization done
0: Relay ports initialization done
0: IO method (general relay thread): epoll (with changelist)
0: turn server id=0 created
0: Trying to bind fd 12 to <public-ip:3478>: errno=99
0: Cannot bind TLS/TCP listener socket to addr public-ip:3478
0: Trying to bind TLS/TCP listener socket to addr public-ip:3478, again...
0: IO method (general relay thread): epoll (with changelist)
0: turn server id=1 created
0: Trying to bind fd 18 to <public-ip:3478>: errno=99
0: Cannot bind TLS/TCP listener socket to addr public-ip:3478
0: Trying to bind TLS/TCP listener socket to addr public-ip:3478, again...
0: Trying to bind fd 17 to <public-ip:3478>: errno=99
0: Cannot bind DTLS/UDP listener socket to addr public-ip:3478
0: Trying to bind DTLS/UDP listener socket to addr public-ip:3478, again..
Expected behavior
The application should be able to reach to turn server.
Additional context
turn-stun configuration file on the application instance.
root@ip-:/var/snap/amazon-ssm-agent/6312# cat /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml
Please help me how to resolve this.