WebRTC error 1004 without internet. Stun server, freeswitch

1,621 views
Skip to first unread message

Сергей Боженин

unread,
Feb 16, 2017, 4:47:44 AM2/16/17
to BigBlueButton-Setup
Good afternoon.
I'm trying to configure BBB 1,1 on Ubuntu 16.04 for use on the local network, without internet access.
When a client attempts to connect the protocol WebRTC and he does not have access to the Internet is given an error WebRTC 1004. But when the client has access to the Internet connection goes well and without errors.
I found that when client try to connect by WebRTC , attempt to pass a request to "stun.freeswitch.org" on port 3478 (IP - 64.235.150.11 or 64.235.154.129), and if the request passes the connection runs fine, but if not then issued WebRTC error 1004.
BBB server and all clients are in the same subnet without any proxy or firewall.
Please tell me how I can fix it, and set up to work with the BBB clients WebRTC who do not have Internet access?

In the attachment logs obtained using firefox "about:webrtc" and firewall events.
Thank you.
Firewall_Events.csv
WebCRT with internet.txt
WebCRT without internet.txt

Сергей Боженин

unread,
Feb 16, 2017, 5:08:14 AM2/16/17
to BigBlueButton-Setup
And  bbb-conf --check
 
root@srvvconf:/home/adminroot# bbb-conf --check

BigBlueButton Server 1.1.0-beta (443)
                    Kernel version: 4.4.0-62-generic
                      Distribution: Ubuntu 16.04.2 LTS (64-bit)
                            Memory: 9999 MB

/var/www/bigbluebutton/client/conf/config.xml (bbb-client)
                Port test (tunnel): srvvconf.tmkb-soyuz.ru
                              red5: srvvconf.tmkb-soyuz.ru
              useWebrtcIfAvailable: true

/opt/freeswitch/etc/freeswitch/sip_profiles/external.xml (FreeSWITCH)
                    websocket port: 7443
                    WebRTC enabled: true

/etc/nginx/sites-available/bigbluebutton (nginx)
                       server name: srvvconf.tmkb-soyuz.ru
                              port: 80, [::]:80
                              port: 443 ssl
                    bbb-client dir: /var/www/bigbluebutton

/var/lib/tomcat7/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties                                    (bbb-web)
                      bbb-web host: srvvconf.tmkb-soyuz.ru

/var/www/bigbluebutton/check/conf/config.xml (client check)
                      client check: srvvconf.tmkb-soyuz.ru

/usr/share/red5/webapps/bigbluebutton/WEB-INF/red5-web.xml (red5)
                  voice conference: FreeSWITCH
                     capture video: true

/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml (record and playback)
                     playback host: srvvconf.tmkb-soyuz.ru


** Potential problems described below **

# Warning: The client self check is installed and accessible from:
#
#

HostBBB.com

unread,
Feb 16, 2017, 7:29:54 AM2/16/17
to BigBlueButton-Setup
Without an internet connection,  new computers may also have an issue pulling the flash .swc the first time when client loads, but that is another issue.

You can try to edit /opt/freeswitch/conf/vars and set the bindIp to the servers IP.   Also set the ext sip. and external rtp to that same IP address.

In your ice gathering i see a 10.x.x.x network, and a 192.x.x.x network.      Are all your users on the 10.x.x.x ?

If none of this works, the last resort is to run an internal stun/turn server your self.   But this should not be needed unless you have internal LAN segments that are nated, or have block udp ports.

regards,
Stephen

Fred Dixon

unread,
Feb 16, 2017, 7:30:38 AM2/16/17
to bigbluebu...@googlegroups.com
Hi,

The FreeSWITCH documentation on NAT is here


and we're using the default settings.  Instead of usgin stun:stun.freeswitch.org, you assign the internal IP address of the server to external_sip_ip and external_rtp_ip and then restart BigBlueButton.

Regards,.. Fred

--
You received this message because you are subscribed to the Google Groups "BigBlueButton-Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-setup+unsub...@googlegroups.com.
To post to this group, send email to bigbluebutton-setup@googlegroups.com.
Visit this group at https://groups.google.com/group/bigbluebutton-setup.
For more options, visit https://groups.google.com/d/optout.



--
BigBlueButton Developer
@bigbluebutton

Сергей Боженин

unread,
Feb 17, 2017, 3:18:46 AM2/17/17
to BigBlueButton-Setup
Hi,
For experimentation, I tried to change the stun server lines
<X-PRE-PROCESS cmd = "set" data = "external_rtp_ip = stun: stun.freeswitch.org" />
<X-PRE-PROCESS cmd = "set" data = "external_sip_ip = stun: stun.freeswitch.org" />
on
<X-PRE-PROCESS cmd = "set" data = "external_rtp_ip = stun: stun.voiparound.com" />
<X-PRE-PROCESS cmd = "set" data = "external_sip_ip = stun: stun.voiparound.com" />
but in firewall logs i can see that the UDP request to port 3478 is still on the ip address stun.freeswitch.org
Maybe there are some settings that need to be change?
Thank you.

четверг, 16 февраля 2017 г., 15:29:54 UTC+3 пользователь HostBBB.com написал:

Fred Dixon

unread,
Feb 17, 2017, 7:19:32 AM2/17/17
to bigbluebu...@googlegroups.com
Hi,

Stephen Dame had asked

> In your ice gathering i see a 10.x.x.x network, and a 192.x.x.x network.      Are all your users on the 10.x.x.x ?

Does your BigBlueButton server have two IP addresses -- a private IP and an internal IP.  You'll need to configure FreeSWITCH to use the internal IP as that would be the IP address that presumably is reachable by other computers.

This configuration is similar to an EC2 instance (which as a private/public IP, but here the public IP is the internal IP which is public to your internal network).  See


Try the above configuration and let us know if that gets you going. 


Regards,... Fred

--
You received this message because you are subscribed to the Google Groups "BigBlueButton-Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-setup+unsub...@googlegroups.com.
To post to this group, send email to bigbluebutton-setup@googlegroups.com.
Visit this group at https://groups.google.com/group/bigbluebutton-setup.
For more options, visit https://groups.google.com/d/optout.

Chad Pilkey

unread,
Feb 17, 2017, 5:54:03 PM2/17/17
to BigBlueButton-Setup
That is how you configure the server STUN setting, but there's a requirement for STUN on the client side. You can find the STUN information that client fetches here, https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-web/grails-app/conf/spring/turn-stun-servers.xml.

Сергей Боженин

unread,
Feb 20, 2017, 6:46:09 AM2/20/17
to BigBlueButton-Setup
Tell me how to disable turn/stun at all? Since it is not necessary because all the clients and the server are on the same subnet (10.10.1.0/24). In the "/opt/freeswitch/conf/vars" values are given:
<X-PRE-PROCESS cmd = "set" data = "bind_server_ip =BBB server IP address"/>
<X-PRE-PROCESS cmd = "set" data = "external_rtp_ip =BBB server IP address" />
<X-PRE-PROCESS cmd = "set" data = "external_sip_ip =BBB server IP address" />

BBB server has only one IP address.

суббота, 18 февраля 2017 г., 1:54:03 UTC+3 пользователь Chad Pilkey написал:

Fred Dixon

unread,
Feb 20, 2017, 8:22:51 AM2/20/17
to bigbluebu...@googlegroups.com
Hi 

Did you edit the file that Chad described in his previous post.  It's located at

  /var/lib/tomcat7/webapps/bigbluebutton/WEB-INF/spring/turn-stun-servers.xml

It's the file that instructs the client to try a stun server.  The default settings are

    <bean id="stun1" class="org.bigbluebutton.web.services.turn.StunServer">

        <constructor-arg index="0" value="stun:stun.freeswitch.org"/>

    </bean>


Try commenting out the above lines, restart BigBlueButton, and try the loading the client again.

Regards,... Fred

--
You received this message because you are subscribed to the Google Groups "BigBlueButton-Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-setup+unsubscribe...@googlegroups.com.

To post to this group, send email to bigbluebutton-setup@googlegroups.com.
Visit this group at https://groups.google.com/group/bigbluebutton-setup.
For more options, visit https://groups.google.com/d/optout.

Сергей Боженин

unread,
Feb 21, 2017, 12:56:04 AM2/21/17
to BigBlueButton-Setup
If I comment out the line that the error is issued when loading BBB:

** Potential problems described below **
....................
# Error: Could not connect to the configured hostname/IP address
#
#
# If your BigBlueButton server is behind a firewall, see FAQ.

# Warning: The client self check is installed and accessible from:
#
#


понедельник, 20 февраля 2017 г., 16:22:51 UTC+3 пользователь Fred Dixon написал:
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-setup+unsub...@googlegroups.com.
To post to this group, send email to bigbluebu...@googlegroups.com.

Fred Dixon

unread,
Feb 21, 2017, 6:46:30 AM2/21/17
to bigbluebu...@googlegroups.com
Hi,

The `sudo bbb-conf --check` command is trying to access your server from the server itself.  If this returns an error, it is likely due to the inability for the command (specifically wget) to validate your server's certificates. 

You can try this command at the command line


and see the full error.  The real test is whether you are able to access it from your browser.  When you try to open
  

Are you able to load the client?

Regards,... Fred

To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-setup+unsubscribe...@googlegroups.com.
To post to this group, send email to bigbluebu...@googlegroups.com.
Visit this group at https://groups.google.com/group/bigbluebutton-setup.
For more options, visit https://groups.google.com/d/optout.



--
BigBlueButton Developer
@bigbluebutton

--
You received this message because you are subscribed to the Google Groups "BigBlueButton-Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-setup+unsub...@googlegroups.com.
To post to this group, send email to bigbluebutton-setup@googlegroups.com.

Сергей Боженин

unread,
Feb 21, 2017, 8:12:53 AM2/21/17
to BigBlueButton-Setup
Hi,
In an attachment, the results of the wget https://srvvconf.tmkb-soyuz.ru/ and sudo bbb-conf --check. And  I normally come on the page https://srvvconf.tmkb-soyuz.ru/.
It's all at the line commented out in turn-stun-servers.xml file.
Thank you.

вторник, 21 февраля 2017 г., 14:46:30 UTC+3 пользователь Fred Dixon написал:
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-setup+unsub...@googlegroups.com.
To post to this group, send email to bigbluebu...@googlegroups.com.
Visit this group at https://groups.google.com/group/bigbluebutton-setup.
For more options, visit https://groups.google.com/d/optout.



--
BigBlueButton Developer
@bigbluebutton

--
You received this message because you are subscribed to the Google Groups "BigBlueButton-Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-setup+unsub...@googlegroups.com.
To post to this group, send email to bigbluebu...@googlegroups.com.
Visit this group at https://groups.google.com/group/bigbluebutton-setup.
For more options, visit https://groups.google.com/d/optout.
wget.txt
bbb-conf --check.txt

Сергей Боженин

unread,
Feb 21, 2017, 2:53:18 PM2/21/17
to BigBlueButton-Setup
I'm sorry, I will specify. Normally loaded start page of BBB, but the client will not boot.

Chad Pilkey

unread,
Feb 21, 2017, 5:24:58 PM2/21/17
to BigBlueButton-Setup
You probably have some sort of typo that is stopping bbb-web from starting correctly. I just tried doing what I had suggested and commented out the line in "/var/lib/tomcat7/webapps/
bigbluebutton/WEB-INF/spring/turn-stun-servers.xml" that reads "<ref bean="stun1" />". Commenting that line out will stop the stun server from being sent in the response. When I restarted everything the client loads fine and an empty STUN list is received and no STUN is used on the client side.

It doesn't actually work though. Everything on the client is fine, but on the server side FreeSWITCH looks through the SDP that is sent to it from the client and decides whether or not it's acceptable. And when the STUN server is removed FreeSWITCH rejects the call with an "INCOMPATIBLE_DESTINATION" message. When I looked into the FreeSWITCH logs it's being rejected with this log message:
2017-02-21 17:07:06.075660 [DEBUG] switch_core_media.c:3043 Set Codec sofia/external/a2wjswi0b7wl...@192.168.247.140 opus/48000 20 ms 960 samples 0 bits 2 channels
2017-02-21 17:07:06.075660 [DEBUG] switch_core_codec.c:111 sofia/external/a2wjswi0b7wl...@192.168.247.140 Original read codec set to opus:116
2017-02-21 17:07:06.075660 [WARNING] switch_core_media.c:3421 NO candidate ACL defined, Defaulting to wan.auto
2017-02-21 17:07:06.075660 [DEBUG] switch_core_media.c:3451 Save audio Candidate cid: 1 proto: UDP type: host addr: 10.46.52.53:57776
2017-02-21 17:07:06.075660 [DEBUG] switch_core_media.c:3451 Save audio Candidate cid: 1 proto: UDP type: host addr: 192.168.81.1:57777
2017-02-21 17:07:06.075660 [DEBUG] switch_core_media.c:3451 Save audio Candidate cid: 1 proto: UDP type: host addr: 192.168.247.1:57778
2017-02-21 17:07:06.075660 [DEBUG] switch_core_media.c:3451 Save audio Candidate cid: 2 proto: UDP type: host addr: 10.46.52.53:57779
2017-02-21 17:07:06.075660 [DEBUG] switch_core_media.c:3451 Save audio Candidate cid: 2 proto: UDP type: host addr: 192.168.81.1:57780
2017-02-21 17:07:06.075660 [DEBUG] switch_core_media.c:3451 Save audio Candidate cid: 2 proto: UDP type: host addr: 192.168.247.1:57781
2017-02-21 17:07:06.075660 [DEBUG] switch_core_media.c:3493 Searching for rtp candidate.
2017-02-21 17:07:06.075660 [DEBUG] switch_core_media.c:3493 Searching for rtcp candidate.
2017-02-21 17:07:06.075660 [DEBUG] switch_core_media.c:3537 sofia/external/a2wjswi0b7wl...@192.168.247.140 no suitable candidates found.
2017-02-21 17:07:06.075660 [DEBUG] switch_core_media.c:4696 sofia/external/a2wjswi0b7wl...@192.168.247.140 Set 2833 dtmf send payload to 101 recv payload to 101
2017-02-21 17:07:06.075660 [NOTICE] switch_channel.c:3811 Hangup sofia/external/a2wjswi0b7wl...@192.168.247.140 [CS_EXECUTE] [INCOMPATIBLE_DESTINATION]
2017-02-21 17:07:06.075660 [DEBUG] switch_core_session.c:2797 sofia/external/a2wjswi0b7wl...@192.168.247.140 skip receive message [APPLICATION_EXEC_COMPLETE] (channel is hungup already)
2017-02-21 17:07:06.075660 [DEBUG] switch_core_state_machine.c:650 (sofia/external/a2wjswi0b7wl...@192.168.247.140) State EXECUTE going to sleep
2017-02-21 17:07:06.075660 [DEBUG] switch_core_state_machine.c:584 (sofia/external/a2wjswi0b7wl...@192.168.247.140) Running State Change CS_HANGUP (Cur 1 Tot 3)

I highlighted the error message and the return code.

When I connect with a STUN server enabled the client will send along an additional server reflexive candidate that contains my public IP and that candidate is selected by FreeSWITCH and the call is accepted. I'm not really sure why FreeSWITCH is rejecting the call when the STUN isn't included as the call should be able to proceed fine. The FreeSWITCH logs of a call with and without a STUN server would probably have to posted to the FreeSWITCH message list and they might be able to shine some light on the issue.

Calvin Walton

unread,
Feb 24, 2017, 1:43:00 PM2/24/17
to bigbluebu...@googlegroups.com
On Tue, 2017-02-21 at 14:24 -0800, Chad Pilkey wrote:
> You probably have some sort of typo that is stopping bbb-web from
> starting 
> correctly. I just tried doing what I had suggested and commented out
> the 
> line in "/var/lib/tomcat7/webapps/
> bigbluebutton/WEB-INF/spring/turn-stun-servers.xml" that reads "<ref 
> bean="stun1" />". Commenting that line out will stop the stun server
> from 
> being sent in the response. When I restarted everything the client
> loads 
> fine and an empty STUN list is received and no STUN is used on the
> client 
> side.

Just to note - removing all of the stun servers from the turn-stun-
servers.xml file does *not* disable STUN. The library that we are using
for WebRTC will fall back to using Google's STUN server if you don't
provide anything else.

--
Calvin Walton <calvin...@kepstin.ca>
BigBlueButton Developer

Calvin Walton

unread,
Feb 24, 2017, 2:09:58 PM2/24/17
to bigbluebu...@googlegroups.com
On Fri, 2017-02-24 at 13:42 -0500, Calvin Walton wrote:
> On Tue, 2017-02-21 at 14:24 -0800, Chad Pilkey wrote:
> > You probably have some sort of typo that is stopping bbb-web from
> > starting 
> > correctly. I just tried doing what I had suggested and commented
> > out
> > the 
> > line in "/var/lib/tomcat7/webapps/
> > bigbluebutton/WEB-INF/spring/turn-stun-servers.xml" that reads
> > "<ref 
> > bean="stun1" />". Commenting that line out will stop the stun
> > server
> > from 
> > being sent in the response. When I restarted everything the client
> > loads 
> > fine and an empty STUN list is received and no STUN is used on the
> > client 
> > side.

Ah, sorry, turns out this is wrong:

> Just to note - removing all of the stun servers from the turn-stun-
> servers.xml file does *not* disable STUN. The library that we are
> using
> for WebRTC will fall back to using Google's STUN server if you don't
> provide anything else.

Due to an earlier (now-fixed) bug in BBB, we were hitting this
behaviour - but I've confirmed with Chad that disabling all stun/turn
servers does work correctly with the current code.
Reply all
Reply to author
Forward
0 new messages