Blocked or could not reach STUN server

157 views
Skip to first unread message

arpit tiwari

unread,
Jan 20, 2023, 11:04:32 AM1/20/23
to BigBlueButton-dev

Unable to connect to stun/turn server and thus the user is not able to make the audio connection.

Steps to reproduce the behavior:

  1. I used the automatic deployment setup script with 2 application instances and 1 turn instance.
  2. When I run the "sudo bbb-conf --check" on my application instance, it displays this warning.
Potential problems described below Warning: Failed to verify STUN server at tu-abc.xyz.com with command stun tu-abc.xyz.com
  1. 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
  1. 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

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> <bean id="stun0" class="org.bigbluebutton.web.services.turn.StunServer"> <constructor-arg index="0" value="stun:tu-abc.xyz.com"/> </bean> <bean id="turn0" class="org.bigbluebutton.web.services.turn.TurnServer"> <constructor-arg index="0" value="<XXXXXXXXXXXX>"/> <constructor-arg index="1" value="turns:tu-abc.xyz.com:443?transport=tcp"/> <constructor-arg index="2" value="86400"/> </bean> <bean id="turn1" class="org.bigbluebutton.web.services.turn.TurnServer"> <constructor-arg index="0" value="<XXXXXXXXXXXX>"/> <constructor-arg index="1" value="turn:tu-abc.xyz.com:443?transport=tcp"/> <constructor-arg index="2" value="86400"/> </bean> <bean id="stunTurnService" class="org.bigbluebutton.web.services.turn.StunTurnService"> <property name="stunServers"> <set> <ref bean="stun0"/> </set> </property> <property name="turnServers"> <set> <ref bean="turn0"/> <ref bean="turn1"/> </set> </property> </bean> </beans>

Please help me how to resolve this.

Reply all
Reply to author
Forward
0 new messages