I am going to tell you how to fix this complain for good. No more 1007 or 1020!
Running the BigBlueButton client requires a wide range of UDP ports to be available for WebRTC communication.
However, in some network restricted sites, such as those behind NAT or a corporate firewall that restricts UDP connections, users may be unable to make outgoing UDP connections to your BigBlueButton server. These are the users who get 1007 and 1020 errors.
By setting up a separate TURN server, you can allow users to have the TURN server (connected via port 443) proxy their UDP-based WebRTC media (audio, webcam, and screen share) to the BigBlueButton server.
We recommend Ubuntu 20.04 as it has a newer version of Coturn than Ubuntu 16.04.
The server does not need to be very powerful as it will only relay communications from the BigBlueButton client to the BigBlueButton server when necessary. A dual core server virtual server should be sufficient for a dozen BigBlueButton servers.
Installing a Turn server is super simple with bbb-install.sh, which installs and configures the Coturn server that acts as both Stun and Turn server.
wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -c
With this straightforward installation and some optimizations (LimitNOFILE=1048576), you will be able to get rid of 1007/1020 errors for almost 100%.
Don’t forget to test whether your Turn server is working:
- You can force using the TURN on Firefox browser.
- Open a Firefox tab and type
about:config. Search for
- Set it to true. At this moment Firefox only use TURN relay.
- Now join a BigBlueButton session for this Firefox browser to see Turn server in action.
- In another tab on Firefox, type
about:webrtcto see the status of webrtc.
- Click on
show detailsto see the url of stun/turn server being used with
In some cases you may still get 1007/1020 complains!
That happens when your Turn server fails!
Either Turn server is down or is overwhelmed by hundreds of simultaneous user requests.
For high-availability of your Turn server, use dns round robin routing on AWS Route 53.
- First install two Turn servers as directed above with two ‘A’ records in Route 53: turn1.higheredlab.com and turn2.higheredlab.com. Ensure that you setup Turn servers in the region that is closer to your users to avoid network latency.
- Second, create another ‘A’ record in Route 53, for example turn.higheredlab.com, that does weightage routing to the two Turn Servers.
- Add Health Check so that if one Turn server goes down, requests are directed to the other Turn server.
- Setup SNS notification so that you get an email alert right away that one of your Turn server is down.
I hope this helps in conducting better online classes on BigBlueButton!