Ошибка 1002 не удалось установить соединение websocket

Originally reported on Google Code with ID 1880 hi there, have any of you have the same problem with me, i am using BBB 0.9.0 beta with ubuntu 14.04 64bit and when i started to launch the web confe...

Comments

@bigbluebutton-issue-import

Originally reported on Google Code with ID 1880

hi there, have any of you have the same problem with me, 
i am using BBB 0.9.0 beta with ubuntu 14.04 64bit and when i started to launch the
web conference suddenly there is an error WebRTC issue: Error 1002: Could not make
a WebSocket connection. it suggested me to use flash player but i cannot make it too..
the point is i cant reached my voice through my microphone.

Reported by hardi.zip on 2015-02-15 06:28:34

@bigbluebutton-issue-import

Hi Hardi,

We just updated how webRTC connects to reduce the connection time.  Doing this changed
how the client connects and you need to make two corresponding changes to FreeSWITCH
configuration if your building the client on Master.  

See this enhancement for details

  https://code.google.com/p/bigbluebutton/issues/detail?id=1881


Reported by ffdixon on 2015-02-15 16:33:21

@bigbluebutton-issue-import

Check out the documentation at

  https://code.google.com/p/bigbluebutton/wiki/090InstallationUbuntu#Client_WebRTC_Error_Codes

For reasons why this error occurs.  In short, it's likely a firewall issue between
the user and the BigBlueButton server, not an issue with BigBlueButton itself.

Reported by ffdixon on 2015-03-23 23:19:01

  • Status changed: WontFix

@GopalSharma

I’m writing this to help those who still not figred out hot to resolve this issue.
You need to perform one extra steps when server is behind NAT(network address translation).
You need to configre Kurento to use stun server, which you can get from the link kurento documentation,
you need to edit /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini and uncomment and assign values for stunServerAddress and stunServerPort.

For example, to use the STUN server at 64.233.177.127 with port 19302, edit the lines with stunServerAddress and stunServerPort as follows:

stunServerAddress=64.233.177.127
stunServerPort=19302

Next, this is very important

edit /opt/freeswitch/conf/sip_profiles/external.xml and ensure the value for wss-binding uses the external IP address

<param name="wss-binding" value="EXTERNAL_IP_ADDRESS:7443"/>
At this point, restart your BigBlueButton server with bbb-conf --restart, then try connecting to the WebRTC media again.

If the issue stile not resolved then edit the following files and substitute EXTERNAL_IP_ADDRESS for the external IP address (not the external hostname).

Edit /opt/freeswitch/conf/vars.xml, and
change <X-PRE-PROCESS cmd="set" data="external_rtp_ip=stun:stun.freeswitch.org"/>
To <X-PRE-PROCESS cmd="set" data="external_rtp_ip=EXTERNAL_IP_ADDRESS"/>

Change <X-PRE-PROCESS cmd="set" data="external_sip_ip=stun:stun.freeswitch.org"/>
To <X-PRE-PROCESS cmd="set" data="external_sip_ip=EXTERNAL_IP_ADDRESS"/>

Next, edit /opt/freeswitch/conf/sip_profiles/external.xml and change
<param name="ext-rtp-ip" value="$${local_ip_v4}"/>
<param name="ext-sip-ip" value="$${local_ip_v4}"/>
to
<param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
<param name="ext-sip-ip" value="$${external_sip_ip}"/>

Next, edit /usr/share/red5/webapps/sip/WEB-INF/bigbluebutton-sip.properties, and make sure the values of bbb.sip.app.ip and freeswitch.ip have the internal IP address.

bbb.sip.app.ip=<internal_ip>
bbb.sip.app.port=5070

freeswitch.ip=<internal_ip>
freeswitch.port=5060

Edit /etc/bigbluebutton/nginx/sip.nginx to connect to the external IP address.

If you have configured SSL, use port 7443:

location /ws {
        proxy_pass https://EXTERNAL_IP_ADDRESS:7443;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_read_timeout 6h;
        proxy_send_timeout 6h;
        client_body_timeout 6h;
        send_timeout 6h;
}

If enableListenOnly is set to true in /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml, as in

$ grep enableListenOnly /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml
    enableListenOnly: true

edit /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml change the value to ip to match the external IP address of the server, and the value of sip_ip to match the internal IP address of the server (where FreeSWITCH is listening to port 5066). For example, if the servers external IP address is 203.0.113.1 and the internal IP address is 172.30.1.145 then edit default.yml and change the values for ip and sip_ip as follows:

freeswitch:
    ip: 203.0.113.1
    sip_ip: 172.30.1.145
    port: 5066

After making the above changes, restart BigBlueButton.

$ bbb-conf --restart

@gayan4u

Even with all the above settings, Im still getting the WebRTC 1004 failurer

@matiasilva

@bipintulo

video tuitorial of setting STUN Server for BBB

@smithagustin

good day! im from the Philippines. Im done with the setting up of bbb server. the only problem Im encountering now is the error 1002 websocket connection problem. with regards to the camera sharing, i can successfully share the camera but the other person outside our network is unable to see me. i already conducted a test on https://test.bigbluebutton.org where I can successfully access camera and microphone without any issue. kindly help me on this. thank you!

@matiasilva

@smithagustin

@matiasilva

@smithagustin no worries, but that link contains this excerpt:

If you find that the problem still persists or you have any other questions, you can ask other users in the mailing lists. If you suspect that your issue is a bug, you can post on our issue tracker, otherwise refrain from using the GitHub issue tracker for general queries.

@smithagustin

@matiasilva

The ones linked in the link I originally gave you.

@divinityindia

This comment has been minimized.

@ibrahim-quraishi

Hi, All I followed all these steps and still getting 1002 error. I managed to get this working couple of time but the cpu was only 2 so I decided to delete and start again. ever since I am struggling to get this running all the ports are open on Azure. If I don’t configure this I was getting ICE error 1007 but the firewall is open. and it annoys me that it worked a couple of time and stoped working. I have installed this 8 times for 2 days and still not able to get it to work.

To be exact, I have followed everything from https://docs.bigbluebutton.org/2.2/configure-firewall

22 TCP | Any | Any | Allow |  
443 | TCP | Any | Any | Allow |  
80 | TCP | Any | Any | Allow |  
16384-32768 | UDP | Any | Any | Allow |  
5060-5070 | UDP | Any | Any | Allow |  
7443 | TCP | Any | Any | Allow |  
1935 TCP | Any | Any | Allow |  

Any help will be greatly appreciated.

root@dev02:/home/azureuser# bbb-conf —check

BigBlueButton Server 2.2.29 (2244)
Kernel version: 4.15.0-1098-azure
Distribution: Ubuntu 16.04.7 LTS (64-bit)
Memory: 16426 MB
CPU cores: 4

/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties (bbb-web)
bigbluebutton.web.serverURL: https://dev02.theagileops.com
defaultGuestPolicy: ALWAYS_ACCEPT
svgImagesRequired: true

/etc/nginx/sites-available/bigbluebutton (nginx)
server name: dev02.theagileops.com
port: 80, [::]:80
port: 443 ssl
bbb-client dir: /var/www/bigbluebutton

/var/www/bigbluebutton/client/conf/config.xml (bbb-client)
Port test (tunnel): rtmp://dev02.theagileops.com
red5: dev02.theagileops.com
useWebrtcIfAvailable: true

/opt/freeswitch/etc/freeswitch/vars.xml (FreeSWITCH)
local_ip_v4: 10.0.6.6
external_rtp_ip: 20.75.72.65
external_sip_ip: 20.75.72.65

/opt/freeswitch/etc/freeswitch/sip_profiles/external.xml (FreeSWITCH)
ext-rtp-ip: 20.75.72.65
ext-sip-ip: 20.75.72.65
ws-binding: :5066
wss-binding: 10.0.6.6:7443

/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml (record and playback)
playback_host: dev02.theagileops.com
playback_protocol: https
ffmpeg: 4.2.4-1ubuntu0.1bbb1~16.04.1

/etc/bigbluebutton/nginx/sip.nginx (sip.nginx)
proxy_pass: 20.75.72.65

/usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml (Kurento SFU)
kurento.ip: 10.0.6.6
kurento.url: ws://127.0.0.1:8888/kurento
kurento.sip_ip: 10.0.6.6
localIpAddress: 10.0.6.6
recordScreenSharing: true
recordWebcams: true
codec_video_main: VP8
codec_video_content: VP8

/usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml (HTML5 client)
build: 1081
kurentoUrl: wss://dev02.theagileops.com/bbb-webrtc-sfu
enableListenOnly: true

Potential problems described below
IP does not match:
IP from ifconfig: 10.0.6.6
/etc/nginx/sites-available/bigbluebutton: dev02.theagileops.com

Error: Unable to connect to port 1935 (RTMP) on dev02.theagileops.com

Warning: The setting of 20.75.72.65 for proxy_pass in

/etc/bigbluebutton/nginx/sip.nginx

does not match the local IP address (10.0.6.6).
(This is OK if you’ve manually changed the values)

docker run —rm —env-file .env bigbluebutton/greenlight:v2 bundle exec rake conf:check

Checking environment: Passed
Checking Connection: Passed
Checking Secret: Passed

I have not deleted this installation to work with any developer who can help me I will be available to run and test or make any changes to this setup to get this to work.
Thanks in advance.

@evaristorivi

Escribo esto para ayudar a aquellos que aún no se han dado cuenta de ello a resolver este problema.
Debe realizar un paso adicional cuando el servidor está detrás de NAT (traducción de direcciones de red).
Debe configurar Kurento para usar el servidor de aturdimiento, que puede obtener del enlace de la documentación de kurento ,
debe editar /etc/kurento/modules/kurento/WebRtcEndpoint.conf.iniy descomentar y asignar valores para stunServerAddressy stunServerPort.

Por ejemplo, para usar el servidor STUN en 64.233.177.127con puerto 19302, edite las líneas con stunServerAddress y stunServerPort de la siguiente manera:

stunServerAddress= 64.233.177.127
stunServerPort = 19302

A continuación, esto es muy importante

edite /opt/freeswitch/conf/sip_profiles/external.xml y asegúrese de que el valor para el enlace wss use la dirección IP externa

<param name="wss-binding" value="EXTERNAL_IP_ADDRESS:7443"/>
En este punto, reinicie su servidor BigBlueButton con bbb-conf --restart, luego intente conectarse a los medios WebRTC nuevamente.

Si el problema no se resuelve, edite los siguientes archivos y sustituya EXTERNAL_IP_ADDRESS por la dirección IP externa ( no el nombre de host externo ).

Editar /opt/freeswitch/conf/vars.xmly
cambiar <X-PRE-PROCESS cmd="set" data="external_rtp_ip=stun:stun.freeswitch.org"/>
a<X-PRE-PROCESS cmd="set" data="external_rtp_ip=EXTERNAL_IP_ADDRESS"/>

Cambiar <X-PRE-PROCESS cmd="set" data="external_sip_ip=stun:stun.freeswitch.org"/>
a<X-PRE-PROCESS cmd="set" data="external_sip_ip=EXTERNAL_IP_ADDRESS"/>

A continuación, edite /opt/freeswitch/conf/sip_profiles/external.xmly cambie
<param name="ext-rtp-ip" value="$${local_ip_v4}"/>
<param name="ext-sip-ip" value="$${local_ip_v4}"/>
a
<param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
<param name="ext-sip-ip" value="$${external_sip_ip}"/>

A continuación, edite /usr/share/red5/webapps/sip/WEB-INF/bigbluebutton-sip.propertiesy asegúrese de que los valores de bbb.sip.app.ipy freeswitch.iptengan la dirección IP interna.

bbb.sip.app.ip=<internal_ip>
bbb.sip.app.port=5070

freeswitch.ip=<internal_ip>
freeswitch.port=5060

Edite /etc/bigbluebutton/nginx/sip.nginx para conectarse a la dirección IP externa.

Si ha configurado SSL, use el puerto 7443 :

location /ws {
        proxy_pass https://EXTERNAL_IP_ADDRESS:7443;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_read_timeout 6h;
        proxy_send_timeout 6h;
        client_body_timeout 6h;
        send_timeout 6h;
}

Si enableListenOnly se establece en true en /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml, como en

$ grep enableListenOnly /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml
    enableListenOnly: true

editar /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.ymlcambie el valor a ippara que coincida con la dirección IP externa del servidor, y el valor de sip_ippara que coincida con la dirección IP interna del servidor (donde FreeSWITCH está escuchando el puerto 5066). Por ejemplo, si la dirección IP externa del servidor es 203.0.113.1y la dirección IP interna es 172.30.1.145, edite default.yml y cambie los valores de ip y sip_ip de la siguiente manera:

freeswitch:
    ip: 203.0.113.1
    sip_ip: 172.30.1.145
    port: 5066

Después de realizar los cambios anteriores, reinicie BigBlueButton.

$ bbb-conf --restart

Thank you very much, I did it this way:

sed -i s/OLD_EXTERNAL_IP_ADDRESS/NEW_EXTERNAL_IP_ADDRESS/g /opt/freeswitch/conf/sip_profiles/external.xml

sed -i s/OLD_EXTERNAL_IP_ADDRESS/NEW_EXTERNAL_IP_ADDRESS/g /opt/freeswitch/conf/vars.xml

sed -i s/OLD_EXTERNAL_IP_ADDRESS/NEW_EXTERNAL_IP_ADDRESS/g /opt/freeswitch/conf/sip_profiles/external.xml

sed -i s/OLD_EXTERNAL_IP_ADDRESS/NEW_EXTERNAL_IP_ADDRESS/g /usr/share/red5/webapps/sip/WEB-INF/bigbluebutton-sip.properties

sed -i s/OLD_EXTERNAL_IP_ADDRESS/NEW_EXTERNAL_IP_ADDRESS/g /etc/bigbluebutton/nginx/sip.nginx

sed -i s/OLD_EXTERNAL_IP_ADDRESS/NEW_EXTERNAL_IP_ADDRESS/g /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml

bbb-conf --restart

@erselbey

I’m writing this to help those who still not figred out hot to resolve this issue.
You need to perform one extra steps when server is behind NAT(network address translation).
You need to configre Kurento to use stun server, which you can get from the link kurento documentation,
you need to edit /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini and uncomment and assign values for stunServerAddress and stunServerPort.

For example, to use the STUN server at 64.233.177.127 with port 19302, edit the lines with stunServerAddress and stunServerPort as follows:

stunServerAddress=64.233.177.127
stunServerPort=19302

Next, this is very important

edit /opt/freeswitch/conf/sip_profiles/external.xml and ensure the value for wss-binding uses the external IP address

<param name="wss-binding" value="EXTERNAL_IP_ADDRESS:7443"/>
At this point, restart your BigBlueButton server with bbb-conf --restart, then try connecting to the WebRTC media again.

If the issue stile not resolved then edit the following files and substitute EXTERNAL_IP_ADDRESS for the external IP address (not the external hostname).

Edit /opt/freeswitch/conf/vars.xml, and
change <X-PRE-PROCESS cmd="set" data="external_rtp_ip=stun:stun.freeswitch.org"/>
To <X-PRE-PROCESS cmd="set" data="external_rtp_ip=EXTERNAL_IP_ADDRESS"/>

Change <X-PRE-PROCESS cmd="set" data="external_sip_ip=stun:stun.freeswitch.org"/>
To <X-PRE-PROCESS cmd="set" data="external_sip_ip=EXTERNAL_IP_ADDRESS"/>

Next, edit /opt/freeswitch/conf/sip_profiles/external.xml and change
<param name="ext-rtp-ip" value="$${local_ip_v4}"/>
<param name="ext-sip-ip" value="$${local_ip_v4}"/>
to
<param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
<param name="ext-sip-ip" value="$${external_sip_ip}"/>

Next, edit /usr/share/red5/webapps/sip/WEB-INF/bigbluebutton-sip.properties, and make sure the values of bbb.sip.app.ip and freeswitch.ip have the internal IP address.

bbb.sip.app.ip=<internal_ip>
bbb.sip.app.port=5070

freeswitch.ip=<internal_ip>
freeswitch.port=5060

Edit /etc/bigbluebutton/nginx/sip.nginx to connect to the external IP address.

If you have configured SSL, use port 7443:

location /ws {
        proxy_pass https://EXTERNAL_IP_ADDRESS:7443;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_read_timeout 6h;
        proxy_send_timeout 6h;
        client_body_timeout 6h;
        send_timeout 6h;
}

If enableListenOnly is set to true in /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml, as in

$ grep enableListenOnly /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml
    enableListenOnly: true

edit /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml change the value to ip to match the external IP address of the server, and the value of sip_ip to match the internal IP address of the server (where FreeSWITCH is listening to port 5066). For example, if the servers external IP address is 203.0.113.1 and the internal IP address is 172.30.1.145 then edit default.yml and change the values for ip and sip_ip as follows:

freeswitch:
    ip: 203.0.113.1
    sip_ip: 172.30.1.145
    port: 5066

After making the above changes, restart BigBlueButton.

$ bbb-conf --restart

helped me solve my problem.

@andrekutianski

@TommyTeaVee

On my side I had to configure /etc/bigbluebutton/nginx/sip.nginx and set the:
proxy_pass to https instead of http

@john1726

Please note that I followed the posts above but didn’t get the issue resolved until I ran the following command:

$ wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-22 -s myserver.com -c turn.myserver.com:1004a200000000004cb3f2d6f000d85d -e johndoe@myserver.com -d -g | tee bbb-install.log

@MBM1607

Issue persisted for me even after all these changes and bbb-install command.

This was because the local_ip_v4 in /opt/freeswitch/etc/freeswitch/vars.xml was set to the wrong value. Correcting that resolved the issue.

You might have this issue if the following warning appears on sudo bbb-conf —restart

........
# Warning: The setting of 172.31.0.66 for local_ip_v4 in
#
#    /opt/freeswitch/etc/freeswitch/vars.xml
#
# does not match the local IP address (172.31.15.131).
# (This is OK if you've manually changed the values)

    If you encountered any problems with the installation of BigBlueButton, this section covers how to resolve many of the common issues.

    If you have not already done so, read through the getting help section.

    Introduction

    Start here: run sudo bbb-conf --check

    We’ve built in a BigBlueButton configuration utility, called bbb-conf, to help you configure your BigBlueButton server and troubleshoot your setup if something doesn’t work right.

    If you think something isn’t working correctly, the first step is enter the following command.

    This will check your setup to ensure the correct processes are running, the BigBlueButton components have correctly started, and look for common configuration problems that might prevent BigBlueButton from working properly.

    If you see text after the line ** Potential problems described below **, then it may be warnings (which you can ignore if you’ve change settings) or errors with the setup.

    Recording

    Recording not processing after upgrading

    If after updating from BigBlueButton 2.0 to BigBlueButton 2.2 your recordings are not processing, and if you are seeing Permission denied errors in /var/log/bigbluebutton/bbb-rap-worker.log

    I, [2019-06-07T14:26:09.034878 #14808]  INFO -- : /usr/lib/ruby/2.5.0/logger.rb:754:in `initialize': Permission denied @ rb_sysopen - /var/log/bigbluebutton/presentation/process-02feca80700b3e95b877af85db972904397857a1-1559909318977.log (Errno::EACCES)
    

    You can resolve the errors with the following command

    $ sudo chown -hR bigbluebutton:bigbluebutton /var/log/bigbluebutton/presentation /var/log/bigbluebutton/screenshare
    

    and then rebuild the recordings that had not yet processed. You can see the list of recordings with

    and then to rebuild a recording, use sudo bbb-record --rebuild <internal_meeting_id>, as in

    $ sudo bbb-record --rebuild 298b06603719217df51c5d030b6e9417cc036476-1559314745219
    

    Webcams/screen sharing aren’t working

    Certify that appropriate external addresses have been set for mediasoup. When installed via packages, mediasoup IPs are normally misconfigured. If installed via bbb-install, then IPv4 is generally correct, but IPv6 might be absent.

    Nonetheless, we recommend double-checking the instructions in Updating mediasoup.

    Configure mediasoup to use IPv6

    mediasoup (bbb-webrtc-sfu) does not come with a IPv6 enabled by default when installed either via packages or bbb-install.

    To configure IPv6, bbb-webrtc-sfu’s override configuration file (located in /etc/bigbluebutton/bbb-webrtc-sfu/production.yml) should be used.

    See Updating mediasoup for instructions and examples on how to do so.

    I’m having troubles seeing webcams or screen sharing in Firefox

    That’s usually the symptom of a known Firefox issue where it doesn’t comply with ICE-lite implementations (and mediasoup is one).

    This issue can be worked around by forcing TURN usage in Firefox user agents. To achieve that, set the public.kurento.forceRelayOnFirefox configuration to true in /etc/bigbluebutton/bbb-html5.yml. For example:

    public:
      kurento:
        forceRelayOnFirefox: true
    

    How often does this Firefox issue happens?

    Short (non) answer: that’s difficult to measure.

    Every Firefox installation is prone to the lack of ICE-lite spec compliance. However, the issue doesn’t manifest itself on all Firefox installations as it is dependent on how the end user’s network topology is organized. It’s generally a small subset of Firefox users, but that can vary depending on the user base.

    Where can I track progress on a definitive solution or better workaround?

    This is a Firefox bug, so the best place to get an overview on progress and what the issue is about is Mozilla’s issue.

    You can also track BigBlueButton’s issue for updates on additional workarounds.

    Why isn’t forceRelayOnFirefox enabled by default?

    It’s not on by default because bigbluebutton does not come with a TURN server by default, and that’s what versioned-in-code setting presumes.

    How do I know if mediasoup is being used?

    The most direct and precise way to figure out whether mediasoup is being used is checking about:webrtc (Firefox) or chrome://webrtc-internals. For example: open one of those, share a camera. Look for the remote description (SDP); see if it contains mediasoup-client in the SDP header. If it does, you’re using mediasoup.

    Regardless of that: mediasoup is the default in 2.5 and should always be used unless default settings were explicitly changed.

    mediasoup is the default in 2.5. Why is Kurento still around?

    Because Kurento is still used for stream recording. It should be removed as a dependency as soon as this issue is addressed.

    Is single-core performance still important with mediasoup?

    Yes.

    How can I control the number of mediasoup workers?

    To control the number of mediasoup workers, bbb-webrtc-sfu’s override configuration file (located in /etc/bigbluebutton/bbb-webrtc-sfu/production.yml) should be used.

    There are a couple of configurations of interest here:

    mediasoup.workers

    This configuration controls the number of mediasoup workers intended for general use (media type agnostic, shared pool).

    Accepted values are:

    • "auto" (default): creates ceil((min(nproc,32) * 0.8) + (max(0, nproc - 32) / 2)) workers;
    • "cores": creates workers up to the host’s core count (as provided by os.cpus().length);
    • <Number>: overrides the number of workers with a fixed value;
    • The default and fallback values are auto.

    For example:

    • To set the number of workers to cores: yq w -i /etc/bigbluebutton/bbb-webrtc-sfu/production.yml mediasoup.workers "cores"

    mediasoup.dedicatedMediaTypeWorkers

    This configuration controls the number of mediasoup workers to be used by specific media types.
    If a dedicated pool is set, streams of its media type will always land on it. Otherwise, they will use the shared pool.

    The configuration is an object of the following format:

    mediasoup.dedicatedMediaTypeWorkers:
       audio: "auto"|"cores"|<Number>
       main: "auto"|"cores"|<Number>
       content: "auto"|"cores"|<Number>
    

    The semantics of auto, cores and Number are the same as in the mediasoup.workers configuration. Default values for all media types are 0 (no dedicated workers).

    The media types semantics are:

    • audio: audio (listen only, microphone) streams;
    • main: webcam video streams;
    • content: screen sharing streams (audio and video).

    For example:

    • To set the number of dedicated audio workers to auto: yq w -i /etc/bigbluebutton/bbb-webrtc-sfu/production.yml mediasoup.dedicatedMediaTypeWorkers.audio "auto"

    Can I scale the number of streams up indefinitely with mediasoup?

    No. Scalability improves a lot with mediasoup, but there are still a couple of bottlenecks that can be hit as far as far as the media stack is concerned. Namely:

    • The signaling server (bbb-webrtc-sfu): it does not scale vertically indefinitely. There’s always work ongoing on this area that can be tracked in this issue;
    • The mediasoup worker balancing algorithm implemented by bbb-webrtc-sfu is still focused on multiparty meetings with a restrained number of users. If your goal is thousand-user 1-N (streaming-like) meetings, you may max out CPU usage on certain mediasoup workers even though there are other idle oworkers free.

    Kurento

    WebRTC video not working with Kurento

    Check the value for /proc/sys/net/ipv4/tcp_syncookies that it contains the value 1.

    $ cat /proc/sys/net/ipv4/tcp_syncookies
    1
    

    If not, edit /etc/sysctl.conf and set the value for net.ipv4.tcp_syncookies to 1.

    net.ipv4.tcp_syncookies = 1
    

    Save the file and restart.

    Unit kurento-media-server.service is masked

    If sudo bbb-conf --check returns the warning

    Restarting BigBlueButton 2.0.0-RC9 (and cleaning out all log files) ...
    Stopping BigBlueButton
     ... cleaning log files
    Starting BigBlueButton
    Failed to start kurento-media-server.service: Unit kurento-media-server.service is masked.
    

    You can unmask Kurento using the command

    $ systemctl unmask kurento-media-server.service
    

    The default installation of BigBlueButton should work in most netowrk configurations; however, if your users ae behind a restrictive network that blocks outgoing UDP connections, they may encounter 1020 errors (media unable to reach server).

    If you get reports of these errors, setup TURN server to help their browsers send WebRTC audio and video streams via TCP over port 443 to the TURN server. The TURN server will then relay the media to your BigBlueButton server.

    See Configure TURN.

    FreeSWITCH

    Configure BigBluebutton/FreeSWITCH to support IPV6

    The HTML5 client now enables users on mobile devices to connect to a BigBlueButton server. However, on some cellular networks iOS devices only receive an IPV6 address.

    To enable BigBlueButton (FreeSWITCH) to accept incoming web socket connections on IPV6, the BigBlueButton server must have an IPV6 address. You also need to make the following changes to the server.

    First, create the file /etc/nginx/conf.d/bigbluebutton_sip_addr_map.conf with this content:

    map $remote_addr $freeswitch_addr {
        "~:"    [2001:db8::1];
        default    192.0.2.1;
    }
    

    replacing the ip addresses 192.0.2.1 with the system’s external IPV4 addresses, and replace 2001:db8::1 with the system’s external IPV6 address. Next, edit the file /etc/bigbluebutton/nginx/sip.nginx to have the following:

    proxy_pass https://$freeswitch_addr:7443;
    

    Next, ensure all of the following params are present in freeswitch’s sip_profiles/external-ipv6.xml:

    • ws-binding
    • wss-binding
    • rtcp-audio-interval-msec
    • rtcp-video-interval-msec
    • dtmf-type
    • liberal-dtmf
    • enable-3pcc

    If any are missing, copy them from sip_profiles/external.xml, then restart BigBlueButton (sudo bbb-conf --restart).

    FreeSWITCH fails to bind to IPV4

    In rare occasions after shutdown/restart, the FreeSWITCH database can get corrupted. This will cause FreeSWITCH to have problems binding to IPV4 address (you may see error 1006 when users try to connect).

    To check, look in /opt/freeswitch/var/log/freeswitch/freeswitch.log for errors related to loading the database.

    2018-10-25 11:05:11.444727 [ERR] switch_core_db.c:108 SQL ERR [unsupported file format]
    2018-10-25 11:05:11.444737 [ERR] switch_core_db.c:223 SQL ERR [unsupported file format]
    2018-10-25 11:05:11.444759 [NOTICE] sofia.c:5949 Started Profile internal-ipv6 [sofia_reg_internal-ipv6]
    2018-10-25 11:05:11.444767 [CRIT] switch_core_sqldb.c:508 Failure to connect to CORE_DB sofia_reg_external!
    2018-10-25 11:05:11.444772 [CRIT] sofia.c:3049 Cannot Open SQL Database [external]!
    

    If you see these errors, clear the FreeSWITCH database (BigBlueButton doesn’t use the database and FreeSWITCH will recreate it on startup).

    $ sudo systemctl stop freeswitch
    $ rm -rf /opt/freeswitch/var/lib/freeswitch/db/*
    $ sudo systemctl start freeswitch
    

    Forward calls from an Asterisk server to FreeSWITCH

    Let’s assume the following:

    asterisk server ip:          192.168.1.100
    bigbluebutton/freeswitch ip: 192.168.1.200
    

    Changes to your Asterisk server

    Setup your gateway to BigBlueButton/FreeSWITCH. in /etc/asterisk/sip.conf add

    [fs-gw]
    type=peer
    username=fs-gw
    insecure=very
    contactpermit=192.168.1.200/255.255.255.255
    qualify=no
    nat=yes
    host=192.168.1.200
    canreinvite=no
    disallow=all
    allow=ulaw
    

    Route the calls to the gateway. In /etc/asterisk/extensions.conf context where your calls are being handled, forward the calls to the gateway. Here, when someone dials 85001, the call is sent to the fs-gw defined above.

    exten => 85001,1,Dial(SIP/fs-gw/${EXTEN})
    exten => 85001,2,Hangup
    

    Changes to your BigBlueButton/FreeSWITCH server

    In BigBlueButton/FreeSWITCH, make the following changes:

    Lock down so that only Asterisk can forward calls to FreeSWITCH. In /opt/freeswitch/conf/autoload_configs/acl.conf.xml, add the following ACL. We also need to allow BigBlueButton to call into FreeSWITCH, that’s why we add the IP of BigBlueButton/FreeSWITCH into the ACL.

        <list name="asterisk-gw" default="deny">
           <node type="allow" cidr="192.168.1.200/32"/>
           <node type="allow" cidr="192.168.1.100/32"/>
           <node type="allow" cidr="127.0.0.1/32"/>
        </list>
    

    Then we apply the ACL into the profile that receives the calls from external gateways. In /opt/freeswitch/conf/sip_profiles/external.xml, add the ACL under <settings>

      <settings>
        <!-- Apply ACL from asterisk-gw -->
        <param name="apply-inbound-acl" value="asterisk-gw"/>
    ...
    </settings>
    

    To debug, try connecting to FS CLI and increase logging level. Once connected, make your call and see what the logs say.

    $ /opt/freeswitch/bin/fs_cli -p $(xmlstarlet sel -t -m 'configuration/settings/param[@name="password"]' -v @value /opt/freeswitch/etc/freeswitch/autoload_configs/event_socket.conf.xml)
    
      Once connected:
      help -- shows the available commands
      console loglevel <level> -- change log level
    
      Ctrl-D to exit
    

    FreeSWITCH fails to bind to port 8021

    FreeSWITCH supports both IPV4 and IPV6. However, if your server does not support IPV6, FreeSWITCH will be unable to bind to port 8021. If you run sudo bbb-conf --check and see the following error

    # Error: Found text in freeswitch.log:
    #
    #    Thread ended for mod_event_socket
    #
    # FreeSWITCH may not be responding to requests on port 8021 (event socket layer)
    # and users may have errors joining audio.
    #
    

    it might be that your server has IPV6 disabled (or does not support it). You can check this by running the following command

    $ sudo ip addr | grep inet6
    inet6 ::1/128 scope host
    ...
    

    If you do not see the line inet6 ::1/128 scope host, then your server has IPV6 disabled. In this case, we need to disable FreeSWITCH’s support for IPV6. First, edit /opt/freeswitch/etc/freeswitch/autoload_configs/event_socket.conf.xml and change the line

        <param name="listen-ip" value="::"/>
    

    to

        <param name="listen-ip" value="127.0.0.1"/>
    

    This tells FreeSWITCH that instead of binding port 8021 to the local IPV6 address, bind to the IPV4 address 127.0.0.1. Next, execute the following two commands

    $ sudo mv /opt/freeswitch/etc/freeswitch/sip_profiles/internal-ipv6.xml /opt/freeswitch/etc/freeswitch/sip_profiles/internal-ipv6.xml_
    $ sudo mv /opt/freeswitch/etc/freeswitch/sip_profiles/external-ipv6.xml /opt/freeswitch/etc/freeswitch/sip_profiles/external-ipv6.xml_
    

    and then restart BigBlueButton with the commands

    $ sudo bbb-conf --clean
    $ sudo bbb-conf --check
    

    FreeSWITCH fails to start with a SETSCHEDULER error

    When running in a container (like a chroot, OpenVZ or LXC), it might not be possible for FreeSWITCH to set its CPU priority to real-time round robin. If not, it will result in lower performance compared to a non-virtualized installation.

    If you running BigBlueButton in a container and an error starting FreeSWITCH, try running systemctl status freeswitch.service and see if you see the error related to SETSCHEDULER

    $ systemctl status freeswitch.service
    ● freeswitch.service - freeswitch
       Loaded: loaded (/lib/systemd/system/freeswitch.service; enabled; vendor preset: enabled)
       Active: inactive (dead) (Result: exit-code) since Mon 2017-10-02 16:17:29 UTC; 18s ago
      Process: 10967 ExecStart=/opt/freeswitch/bin/freeswitch -u freeswitch -g daemon -ncwait $DAEMON_OPTS (code=exited, status=214/SETSCHEDULER)
     Main PID: 3327 (code=exited, status=0/SUCCESS)
    
    Oct 02 16:17:29 scw-9e2305 systemd[1]: Failed to start freeswitch.
    Oct 02 16:17:29 scw-9e2305 systemd[1]: freeswitch.service: Unit entered failed state.
    Oct 02 16:17:29 scw-9e2305 systemd[1]: freeswitch.service: Failed with result 'exit-code'.
    Oct 02 16:17:29 scw-9e2305 systemd[1]: freeswitch.service: Service hold-off time over, scheduling restart.
    Oct 02 16:17:29 scw-9e2305 systemd[1]: Stopped freeswitch.
    Oct 02 16:17:29 scw-9e2305 systemd[1]: freeswitch.service: Start request repeated too quickly.
    Oct 02 16:17:29 scw-9e2305 systemd[1]: Failed to start freeswitch.
    

    If you see SETSCHEDULER in the error message, edit /lib/systemd/system/freeswitch.service and comment out the line containing CPUSchedulingPolicy=rr (round robin)

    IOSchedulingPriority=2
    #CPUSchedulingPolicy=rr
    CPUSchedulingPriority=89
    

    Save the file, run systemctl daemon-reload, and then restart BigBlueButton. FreeSWITCH should now startup without error.

    Users not able to join Listen Only mode

    When doing sudo bbb-conf --check, you may see the warning

    voice Application failed to register with sip server
    

    This error occurs when bbb-apps-sip isn’t able to make a SIP call to FreeSWITCH. You’ll see this in BigBlueButton when users click the headset icon and don’t join the voice conference.

    One possible cause for this is you have just installed BigBlueButton, but not restarted it. The packages do not start up the BigBlueButton components in the right order. To restart BigBlueButton, do the following:

    $ sudo bbb-conf --restart
    $ sudo bbb-conf --check
    

    If you don’t want FreeSWITCH to bind to 127.0.0.1, you need to figure out which IP address its using. First, determine the IP address FreeSWITCH is monitoring for incoming SIP calls with the following command:

    $ netstat -ant | grep 5060
    

    You should see an output such as

    tcp        0      0 234.147.116.3:5060    0.0.0.0:*               LISTEN
    

    In this example, FreeSWITCH is listening on IP address 234.147.116.3. The IP address on your server will be different.

    Next, edit /usr/share/red5/webapps/sip/WEB-INF/bigbluebutton-sip.properties and set the value for sip.server.host to the IP address returned from the above command. Save the changes (you’ll need to edit the file as root to save changes).

    Restart BigBlueButton using the commands and run the built-in diagnostics checks.

    $ sudo bbb-conf --clean
    $ sudo bbb-conf --check
    

    Unable to connect using fs_cli

    As of BigBlueButton 2.2.18, the packaging now replaces the default ClueCon password for connecting to the FreeSWITCH command line interface (fs_cli) with a random password.

    (By default, FreeSWITCH only allowed unauthenticated connections from 127.0.0.1, but it’s still good security practice to not use default passwords).

    To connect to fs_cli, use the following command which supplies the password for authenticating.

    /opt/freeswitch/bin/fs_cli -p $(xmlstarlet sel -t -m 'configuration/settings/param[@name="password"]' -v @value /opt/freeswitch/etc/freeswitch/autoload_configs/event_socket.conf.xml)
    

    We also added /usr/local/bin/fs_clibbb with the contents

    #!/bin/bash
    
    /opt/freeswitch/bin/fs_cli -p $(xmlstarlet sel -t -m 'configuration/settings/param[@name="password"]' -v @value /opt/freeswitch/etc/freeswitch/autoload_configs/event_socket.conf.xml)
    

    that will let you type fs_clibbb at the command prompt to get into FreeSWITCH console.

    Echo test hangs upgrading BigBlueButton 2.2

    The install scripts now change the default CLI password for FreeSWITCH and the other parts of BigBlueButton need to use this new password. For a new installation, the install scripts will automatically set this new password.

    If you upgrade using bbb-install.sh, the script will update the FreeSWITCH password using sudo bbb-conf --setip <hostname>.

    If you upgraded using manual steps, be sure to do ao sudo bbb-conf --setip <hostname> to sync all the FreeSWITCH passwords.

    FreeSWITCH using default stun server

    For many years, in BigBlueButton’s FreeSWITCH configuration file /opt/freeswitch/etc/freeswitch/vars.xml, the default value for external_rtp_ip was stun.freeswitch.org

      <X-PRE-PROCESS cmd="set" data="external_rtp_ip=stun:stun.freeswitch.org"/>
    

    However, this is not a reliable choice for stun server. Recommend either changing it to your servers external IP address or setup your own stun/turn server. For example, if your server has an external IP at 234.32.3.3

      <X-PRE-PROCESS cmd="set" data="external_rtp_ip=234.32.3.3"/>
    

    You can add a line in /etc/bigbluebutton/bbb-conf/apply-conf.sh to always apply this value even if the FreeSWITCH package upgrades.

    xmlstarlet edit --inplace --update '//X-PRE-PROCESS[@cmd="set" and starts-with(@data, "external_rtp_ip=")]/@data' --value "external_rtp_ip=234.32.3.3" /opt/freeswitch/conf/vars.xml
    

    Note: If your server has an internal/exteral IP address, such as on AWS EC2 server, be sure to set it to the external IP address configure a dummy network interface card (see Update FreeSWITCH).

    HTML5 Server

    bbb-html5 fails to start with a SETSCHEDULER error

    As of 2.2.31, the systemd unit file for bbb-html5.service now contains the following lines

    CPUSchedulingPolicy=fifo
    Nice=19
    

    You can override this with creating the following directory

    mkdir /etc/systemd/system/bbb-html5.service.d
    

    and creating /etc/systemd/system/bbb-html5.service.d/override.conf with the following contents

    [Service]
    CPUSchedulingPolicy=other
    Nice=-10
    

    Then do systemctl daemon-reload and restart BigBlueButton.

    Installation and packages

    The following packages have unmet dependencies

    When installing the latest build of BigBlueButton, the package bbb-conf now uses yq to manage YAML files.

    You need to add the repository ppa:rmescandon/yq to your server. For steps on how to do this, see Update your server in the BigBlueButton 2.2 install guide.

    Alternatively, if you have not made any customizations to BigBlueButton (outside of using bbb-conf), you can use bbb-install.sh to install/upgrade to the latest version (the bbb-install.sh script will automatically install the repository for yq).

    No Symbolic Link

    If you’ve installed/uninstalled BigBlueButton packages, you may get a No Symbolic Link warning from bbb-conf --check:

    ** Potential Problems **
        nginx (conf): no symbolic link in /etc/nginx/sites-enabled for bigbluebutton
    

    To solve this, add a symbolic link to nginx for the BigBlueButton site:

    $ sudo ln -s /etc/nginx/sites-available/bigbluebutton /etc/nginx/sites-enabled/bigbluebutton
    $ sudo /etc/init.d/nginx restart
    

    Package install fails with sed error

    Some of the BigBlueButton packages use sed scripts to extract contents from configuration files. If the file does not exist at the time of the script’s execution, or the sed script matches multiple entries in a file (such as when a configuration line is commented out), you can see an error such as

    Setting up bbb-client (1:2.0.0-374) ...
    sed: -e expression #1, char 42: unterminated `s' command
    dpkg: error processing package bbb-client (--configure):
     subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of bbb-config:
     bbb-config depends on bbb-client; however:
      Package bbb-client is not configured yet.
    
    dpkg: error processing package bbb-config (--configure):
     dependency problems - leaving unconfigured
    Errors were encountered while processing:
     bbb-client
     bbb-config
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    

    In the above example, the /var/lib/dpkg/info/bbb-client.postinst failed to finish. To debug, edit this file and change the first line to read

    and run

    $ sudo apt-get install -f
    

    You should now see each command in bbb-conf.postinst as it executes upto the line in which the error occurs. Post this output to https://groups.google.com/forum/#!forum/bigbluebutton-setup for help in resolving the issue.

    Errors with packages

    Some hosting providers do not provide a complete /etc/apt/source.list. If you are finding your are unable to install a package, try replacing your /etc/apt/sources.list with the following

    deb https://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
    deb https://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
    deb https://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
    

    then do

    and try installing BigBlueButton again from the beginning.

    WebRTC errors (1001, 1002,…)

    WebRTC offers very high-quality audio. However, the user’s network settings (or firewall) may not allow WebRTC to connect (or keep connected).

    Here are the following lists the possible WebRTC error messages that a user may encounter:

    • 1001: WebSocket disconnected — The WebSocket had connected successfully and has now disconnected. Possible Causes:
      • Loss of internet connection
      • Nginx restarting can cause this
    • 1002: Could not make a WebSocket connection — The initial WebSocket connection was unsuccessful. Possible Causes:
      • Firewall blocking ws protocol
      • Server is down or improperly configured
      • See potential solution here.
    • 1003: Browser version not supported — Browser doesn’t implement the necessary WebRTC API methods. Possible Causes:
      • Out of date browser
    • 1004: Failure on call — The call was attempted, but failed. Possible Causes:
      • For a full list of causes refer here
      • There are 24 different causes so I don’t really want to list all of them
      • Solution for this issue outlined here.
    • 1005: Call ended unexpectedly — The call was successful, but ended without user requesting to end the session. Possible Causes:
      • Unknown
    • 1006: Call timed out — The library took too long to try and connect the call. Possible Causes:
      • Previously caused by Firefox 33-beta on Mac. We’ve been unable to reproduce since release of FireFox 34
    • 1007: ICE negotiation failed — The browser and FreeSWITCH try to negotiate ports to use to stream the media and that negotiation failed. Possible Causes:
      • NAT is blocking the connection
      • Firewall is blocking the UDP connection/ports
    • 1008: Call transfer failed — A timeout while waiting for FreeSWITCH to transfer from the echo test to the real conference. This might be caused by a misconfiguration in FreeSWITCH, or there might be a media error and the DTMF command to transfer didn’t go through (In this case, the voice in the echo test probably didn’t work either.)
    • 1009: Could not fetch STUN/TURN server information — This indicates either a BigBlueButton bug (or you’re using an unsupported new client/old server combination), but could also happen due to a network interruption.
    • 1010: ICE negotiation timeout — After the call is accepted the client’s browser and the server try and negotiate a path for the audio data. In some network setups this negotiation takes an abnormally long time to fail and this timeout is set to avoid the client getting stuck.
    • 1020: Media cloud could not reach the server — See how to solve this here.

    Networking

    Server running behind NAT

    The following issue might be helpful in debugging if you run into errors and your server is behind NAT.

    Could not get your microphone for a WebRTC call

    Chrome requires (As of Chrome 47) that to access the user’s microphone for WebRTC your site must be serving pages via HTTPS (that is, nginx is configured with a SSL certificate).

    If the user attempts to share their microphone and your BigBlueButton sever is not configured for SSL, Chrome will block access and BigBlueButton will report the following error

    WebRTC Audio Failure: Detected the following WebRTC issue: Could not get your microphone for a WebRTC call. Do you want to try flash instead?

    To enable Chrome to access the user’s microphone, see Configure HTTPS on BigBlueButton.

    The browser is not supported

    When you attempt to join a BigBlueButton session, the client looks for supported browsers before fully loading. The client gets its list of supported browsers from /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml. You can see the list of supported browsers at the bottom. For example,

    - browser: mobileSafari
      version:
        - 11
        - 1
    

    states that Mobile Safari version 11.1 or later is supported (notice the first letter is lower case and concatenated with the remainder of the browser name).

    To add a browser to the list, first find your browser’s useragent. You could use a tool like https://wtools.io/check-my-user-agent as well. For example, with the Vivaldi browser you might see

    Vivaldi 2.8.1664 / Linux 0.0.0
    

    Next, to add this as a supported browser, append to settings.yml

    - browser: vivaldi
      version:
        - 2
        - 8
    

    save the updated settings.yml file, and then restart your BigBlueButton server with sudo bbb-conf --restart. Note any browser you add must support WebRTC libraries (not all do), so be sure to check it first with https://test.webrtc.org/.

    Tomcat shows “Cannot assign requested address on startup”

    If your server has multiple IP addresses, Tomcat might not pick the right address to bind. This could throw an error on installation when tomcat is attempting to install.

    Check /var/log/tomcat7/catalina.out for the following error

    Jan 30, 2018 9:17:37 AM org.apache.catalina.core.StandardServer await
    SEVERE: StandardServer.await: create[localhost:8005]:
    java.net.BindException: Cannot assign requested address (Bind failed)
     at java.net.PlainSocketImpl.socketBind(Native Method)
    

    If you see this, first ensure that there isn’t another copy of tomcat running by doing ps -aef | grep tomcat7. If you do see another copy running, try killing it and then restarting tomcat.

    If you still see the same error in catalina.out, then /etc/tomcat7/server.xml and change

    <Server port="8005" shutdown="SHUTDOWN">
    
    <Server address="0.0.0.0" port="8005" shutdown="SHUTDOWN">
    

    Restart tomcat7 again and it should start normally.

    nginx not running

    The common reasons for nginx not running are inability to bind to port 80 and configuration errors. To check if port 80 is already in use, use

    to see if any process is currently bound to port 80. If so, check to see if another web server is installed. If so, then stop the web server and try to restart nginx. One of the server requirements before you install BigBlueButton is that port 80 is not in use by another application (such as Apache). For details on why this is a requirements, see We recommend running BigBlueButton on port 80.

    If port 80 is free, check if your nginx configuration file has errors. Try a restart of nginx

    $ sudo systemctl restart nginx
    

    and look for the output of

       [ OK ]
    

    If you see [ Fail ], then your nginx configuration files might have a syntax error. Check the syntax of the nginx configuration files using the command

    and see if it reports any errors. You can also check the error.log file for nginx to see what errors it gives on startup

    $ sudo cat /var/log/nginx/error.log
    

    “Welcome to nginx”

    During installation of BigBlueButton the packaging scripts attempt to assign the correct IP address during setup. However, if the IP address changes (such as when rebooting a VM), or the first IP address was not the correct IP address for the server, you may see a “Welcome to nginx” page.

    To reconfigure the BigBlueButton to use the correct IP address or hostname, see BigBlueButton does not load.

    bbb-web

    404 Error when loading the client

    BigBlueButton 2.2 requires Java 8 as the default Java. Recently, some Ubuntu 16.04 distributions have switched the default version of Java to Java 9 (or later).

    Use java -version to check that the default version of 1.8.0.

    ~/dev$ java -version
    openjdk version "1.8.0_242"
    OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~16.04-b08)
    OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
    

    If not, do the following

    sudo apt-get install openjdk-8-jre
    update-alternatives --config java  # Choose java-8 as default
    

    Run java -version and confirm it now shows the default as 1.8.0, and then restart BigBlueButton with sudo bbb-conf --restart

    Blank presentation area on create or upload

    If you join a meeting and the default presentation is not visible or your uploaded presentation doesn’t display, then this is most likely due to a permissions error. To solve this, ensure that /var/bigbluebutton/ is owned by bigbluebutton rather than root or any other account. See this issue for more explanation.

    Unable to create presentation

    If you see the following error in /var/log/bigbluebutton/bbb-web.log

      failed to map segment from shared object: Operation not permitted
    

    use the command mount to check that the /tmp director does not have noexec permissions (which would prevent executables from running in the /tmp directory). If you see noexec for /tmp, you need to remount the directory with permissions that enable processes (such as the slide conversion) to execute in the /tmp directory.

    Too many open files

    On servers with greater than 8 CPU cores, bbb-web log (/var/log/bigbluebutton/bbb-web.log) may throw an error of Too many open files

    Caused by: java.io.IOException: Too many open files
    

    To resolve, create an override file that increases the number of open files for bbb-web

    $  sudo mkdir -p /etc/systemd/system/bbb-web.service.d/
    $  sudo cat > /etc/systemd/system/bbb-web.service.d/override.conf << HERE
    [Service]
    LimitNOFILE=
    LimitNOFILE=8192
    HERE
    $  sudo systemctl daemon-reload
    

    bbb-web takes a long time to startup

    bbb-web relies on the SecureRandom class (which uses available entropy) to provide random values for its session IDs. On a virtualized server, however, the available entropy can run low and cause bbb-web to block for a long period before it finishes it’s startup sequence (see Slow startup of tomcat).

    To provide bbb-web with more entropy, you can install haveged

    $ sudo apt-get install haveged
    

    For more information see How to Setup Additional Entropy for Cloud Servers Using Haveged.

    Error installing bbb-web

    If you get the following error during upgrade to BigBlueButton

    Unpacking bbb-web (1:2.2.0-67) over (1:2.2.0-66) ...
    dpkg: error processing archive /var/cache/apt/archives/bbb-web_1%3a2.2.0-67_amd64.deb (--unpack):
     trying to overwrite '/etc/bigbluebutton/nginx/web', which is also in package bbb-client 1:2.2.0-28
    dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Errors were encountered while processing:
     /var/cache/apt/archives/bbb-web_1%3a2.2.0-67_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)```
    

    Then first uninstall bbb-client

    $ sudo apt-get purge bbb-client
    

    and try installing BigBlueButton again.

    Other errors

    Root partition too small

    If the root partition on your BigBlueButton server is too small (for disk space requirements see Before you install), we recommend moving the following directories to an external partition with sufficient disk space.

    BigBlueButton processing and storage of recordings:

    Location of all media directories on disk available here.

    To make the move, we’ll first stop BigBlueButton, then move the above directories to a new location on the external partition, create symbolic links from the original locations to the new locations, and restart BigBlueButton.

    In the following example, the external partition is mounted on /mnt.

    $ sudo bbb-conf --stop
    
    $ sudo mv /var/freeswitch/meetings /mnt
    $ sudo ln -s /mnt/recordings /var/freeswitch/meetings
    
    $ sudo mv /usr/share/red5/webapps/video/streams /mnt
    $ sudo ln -s /mnt/streams /usr/share/red5/webapps/video/streams
    
    $ sudo /var/bigbluebutton /mnt
    $ sudo ln -s /mnt/bigbluebutton /var/bigbluebutton
    
    $ sudo bbb-conf --start
    

    BigBlueButton does not load

    If your has changed it’s network connection (such as on reboot), you can clean most of BigBlueButton’s configuration files with the following steps.

    $ sudo bbb-conf --setip <ip_address_or_hostname>
    
    $ sudo bbb-conf --clean
    $ sudo bbb-conf --check
    

    For more information see bbb-conf options.

    Running within an LXD Container

    LXD is a very powerful container system for Ubuntu lets you run full Ubuntu 16.04 servers within a container. Because you can easily clone and snapshot LXD containers, they are ideal for development and testing of BigBlueButton.

    However, if you install BigBlueButton within an LXD container, you will get the following error from sudo bbb-conf --check

    ** Potential problems described below **
    
    #
    # Error: Unable to connect to the FreeSWITCH Event Socket Layer on port 8021
    

    You’ll also get an error from starting FreeSWITCH with bbb-conf --restart. When you try systemctl status freeswitch.service, you’ll see an error with SETSCHEDULER.

    $ sudo systemctl status freeswitch.service
    ● freeswitch.service - freeswitch
       Loaded: loaded (/lib/systemd/system/freeswitch.service; enabled; vendor preset: enabled)
       Active: inactive (dead) (Result: exit-code) since Wed 2017-04-26 16:34:24 UTC; 23h ago
      Process: 7038 ExecStart=/opt/freeswitch/bin/freeswitch -u freeswitch -g daemon -ncwait $DAEMON_OPTS (code=exited, status=214/SETSCHEDULER)
    
    Apr 26 16:34:24 big systemd[1]: Failed to start freeswitch.
    Apr 26 16:34:24 big systemd[1]: freeswitch.service: Unit entered failed state.
    Apr 26 16:34:24 big systemd[1]: freeswitch.service: Failed with result 'exit-code'.
    Apr 26 16:34:24 big systemd[1]: freeswitch.service: Service hold-off time over, scheduling restart.
    Apr 26 16:34:24 big systemd[1]: Stopped freeswitch.
    Apr 26 16:34:24 big systemd[1]: freeswitch.service: Start request repeated too quickly.
    Apr 26 16:34:24 big systemd[1]: Failed to start freeswitch.
    

    This error occurs because the default systemd unit script for FreeSWITCH tries to run with permissions not available to the LXD container. To run FreeSWITCH within an LXD container, edit /lib/systemd/system/freeswitch.service and replace with the following

    [Unit]
    Description=freeswitch
    After=syslog.target network.target local-fs.target
    
    [Service]
    Type=forking
    PIDFile=/opt/freeswitch/var/run/freeswitch/freeswitch.pid
    Environment="DAEMON_OPTS=-nonat"
    EnvironmentFile=-/etc/default/freeswitch
    ExecStart=/opt/freeswitch/bin/freeswitch -u freeswitch -g daemon -ncwait $DAEMON_OPTS
    TimeoutSec=45s
    Restart=always
    WorkingDirectory=/opt/freeswitch
    User=freeswitch
    Group=daemon
    
    [Install]
    WantedBy=multi-user.target
    

    Then enter the following commands to load the new unit file and restart BigBlueButton.

    $ sudo systemctl daemon-reload
    $ sudo bbb-conf --restart
    

    You can run BigBlueButton within a LXD container.

    Unable to connect to redis

    The packages bbb-apps-akka, bbb-fsesl-akka, and bbb-transcode-akka are packaged by sbt, but they need to have redis-server running before they startup. If sudo bbb-conf --debug shows redis connection errors

    Sep 22 15:32:12 sv21 bbb-apps-akka[7804]: Exception in thread "main" io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379
    Sep 22 15:32:12 sv21 bbb-apps-akka[7804]: #011at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)
    Sep 22 15:32:12 sv21 bbb-apps-akka[7804]: #011at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)
    Sep 22 15:32:12 sv21 bbb-apps-akka[7804]: Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:6379
    Sep 22 15:32:12 sv21 bbb-apps-akka[7804]: Caused by: java.net.ConnectException: Connection refused
    Sep 22 15:32:12 sv21 bbb-fsesl-akka[7893]: Exception in thread "main" io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379
    Sep 22 15:32:12 sv21 bbb-fsesl-akka[7893]: #011at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)
    Sep 22 15:32:12 sv21 bbb-fsesl-akka[7893]: #011at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)
    Sep 22 15:32:12 sv21 bbb-fsesl-akka[7893]: Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:6379
    Sep 22 15:32:12 sv21 bbb-fsesl-akka[7893]: Caused by: java.net.ConnectException: Connection refused
    Sep 22 15:32:13 sv21 bbb-transcode-akka[8001]: Exception in thread "main" io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379
    Sep 22 15:32:13 sv21 bbb-transcode-akka[8001]: #011at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)
    Sep 22 15:32:13 sv21 bbb-transcode-akka[8001]: #011at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)
    Sep 22 15:32:13 sv21 bbb-transcode-akka[8001]: Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:6379
    Sep 22 15:32:13 sv21 bbb-transcode-akka[8001]: Caused by: java.net.ConnectException: Connection refused
    

    you can add overrides for these three packages to ensure they start after redis.server. Run the following script.

    #!/bin/bash
    
    mkdir -p /etc/systemd/system/bbb-apps-akka.service.d
    cat > /etc/systemd/system/bbb-apps-akka.service.d/override.conf <<HERE
    [Unit]
    Requires=redis-server.service
    After=redis-server.service
    HERE
    
    mkdir -p /etc/systemd/system/bbb-fsesl-akka.service.d
    cat > /etc/systemd/system/bbb-fsesl-akka.service.d/override.conf <<HERE
    [Unit]
    Requires=redis-server.service
    After=redis-server.service
    HERE
    
    
    mkdir -p /etc/systemd/system/bbb-transcode-akka.service.d
    cat > /etc/systemd/system/bbb-transcode-akka.service.d/override.conf <<HERE
    [Unit]
    Requires=redis-server.service
    After=redis-server.service
    HERE
    

    The script bbb-install now creates these overrides by default.

    500 Internal Server Error

    It is most likely an error on GreenLight. Check the log file according to Troubleshooting Greenlight.

    If this error occurrs on just a small number of PCs accessing a BigBlueButton server within a LAN through a proxy server and you find the description “Error::Unsafe Host Error (x.x.x.x is not a safe host)” (where x.x.x.x is an IP address) in the log file, check if the “Don’t use the proxy server for local (intranet) addresses” (in the Windows proxy setting) is ticked.

    Legacy errors

    Conference not found errors

    The command sudo bbb-conf --debug searches through the red5, tomcat7, and nginx logs looking for errors and exceptions. However, the messages such as

        -- ERRORS found in /usr/share/red5/log/* --
    /usr/share/red5/log/bigbluebutton.log:2015-05-02 13:50:37,681-04:00 [pool-17-thread-1] ERROR o.b.w.v.f.a.PopulateRoomCommand - Not XML: [Conference 78505 not found]
    

    are innocuous and can be ignored.

    WebSocket Закрыть Код 1002

    Я написал приложение, которое использует веб-сокеты для связи между сервером и клиентом. Я хотел бы обработать случай, когда клиент устарел (слишком старый) и, таким образом, неправильно интерпретирует/не обрабатывает сообщения. Я думаю, что если клиент слишком стар, я закрываю соединение и отправляю соответствующий код состояния. Я прочитал спецификацию, и кажется, что 1002 может быть подходящим кодом:

    Однако я действительно не знаю, что это значит (если он действительно ссылается на протокол веб-сокета и, следовательно, на ошибку более низкого уровня). Для этого подходит 1002, или я должен сделать код закрытого (прикладного) кода в области 4000-4999, как определено здесь: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent

    Код ошибки 1002 предназначен для нарушений протокола WebSocket на низком уровне. Например, сообщение WebSocket было текстовым сообщением, но полезная нагрузка содержала недопустимый UTF8. Вы не должны использовать это для ситуации. Ошибки 1002 обычно генерируются внутренними средствами реализации WebSocket, а не приложением, использующим WebSocket.

    Теперь в вашей ситуации у вас есть два варианта:

    Если клиент может быть идентифицирован как “слишком старый” уже во время установления рукопожатия открытия WebSocket, вы можете не выполнить рукопожатие, используя HTTP Bad Request 400.

    Вы можете разрешить рукопожатие завершить, выполнить обмен сообщениями в WebSocket, определяющий версию клиента, а затем закрыть соединение (выполняющее надлежащее квитирование с помощью WebSocket) с кодом ошибки из диапазона 4000-4999 . Да, этот диапазон был бы уместным. https://tools.ietf.org/html/rfc6455#section-7.4.2

    Последний более гибкий и дает клиенту лучшую обратную связь. В частности, JavaScript в браузере получит доступ только к закрытому коду (2), а не к HTTP-ошибке в (1).

    Еще один заметный аспект: соответствующая реализация WebSocket просто не позволит приложению запускать с помощью 1002 . Единственными закрытыми кодами, разрешенными для использования приложения, являются 1000 (который является “нормальным” ) и 3000 — 3999 (использование приложения, но зарегистрировано в IETF) и 4000 — 4999 (использование приложения, частная незарегистрированная).

    Источник

    Не удалось установить соединение websocket error 1002

    If you encountered any problems with the installation of BigBlueButton, this section covers how to resolve many of the common issues.

    If you have not already done so, read through the getting help section.

    Introduction

    Start here: run sudo bbb-conf —check

    We’ve built in a BigBlueButton configuration utility, called bbb-conf , to help you configure your BigBlueButton server and troubleshoot your setup if something doesn’t work right.

    If you think something isn’t working correctly, the first step is enter the following command.

    This will check your setup to ensure the correct processes are running, the BigBlueButton components have correctly started, and look for common configuration problems that might prevent BigBlueButton from working properly.

    If you see text after the line ** Potential problems described below ** , then it may be warnings (which you can ignore if you’ve change settings) or errors with the setup.

    Recording

    Recording not processing after upgrading

    If after updating from BigBlueButton 2.0 to BigBlueButton 2.2 your recordings are not processing, and if you are seeing Permission denied errors in /var/log/bigbluebutton/bbb-rap-worker.log

    You can resolve the errors with the following command

    and then rebuild the recordings that had not yet processed. You can see the list of recordings with

    and then to rebuild a recording, use sudo bbb-record —rebuild , as in

    mediasoup

    Webcams/screen sharing aren’t working

    Certify that appropriate external addresses have been set for mediasoup. When installed via packages, mediasoup IPs are normally misconfigured. If installed via bbb-install, then IPv4 is generally correct, but IPv6 might be absent.

    Nonetheless, we recommend double-checking the instructions in Updating mediasoup.

    Configure mediasoup to use IPv6

    mediasoup (bbb-webrtc-sfu) does not come with a IPv6 enabled by default when installed either via packages or bbb-install.

    To configure IPv6, bbb-webrtc-sfu’s override configuration file (located in /etc/bigbluebutton/bbb-webrtc-sfu/production.yml ) should be used.

    See Updating mediasoup for instructions and examples on how to do so.

    I’m having troubles seeing webcams or screen sharing in Firefox

    That’s usually the symptom of a known Firefox issue where it doesn’t comply with ICE-lite implementations (and mediasoup is one).

    This issue can be worked around by forcing TURN usage in Firefox user agents. To achieve that, set the public.kurento.forceRelayOnFirefox configuration to true in /etc/bigbluebutton/bbb-html5.yml . For example:

    How often does this Firefox issue happens?

    Short (non) answer: that’s difficult to measure.

    Every Firefox installation is prone to the lack of ICE-lite spec compliance. However, the issue doesn’t manifest itself on all Firefox installations as it is dependent on how the end user’s network topology is organized. It’s generally a small subset of Firefox users, but that can vary depending on the user base.

    Where can I track progress on a definitive solution or better workaround?

    This is a Firefox bug, so the best place to get an overview on progress and what the issue is about is Mozilla’s issue.

    You can also track BigBlueButton’s issue for updates on additional workarounds.

    Why isn’t forceRelayOnFirefox enabled by default?

    It’s not on by default because bigbluebutton does not come with a TURN server by default, and that’s what versioned-in-code setting presumes.

    How do I know if mediasoup is being used?

    The most direct and precise way to figure out whether mediasoup is being used is checking about:webrtc (Firefox) or chrome://webrtc-internals. For example: open one of those, share a camera. Look for the remote description (SDP); see if it contains mediasoup-client in the SDP header. If it does, you’re using mediasoup.

    Regardless of that: mediasoup is the default in 2.5 and should always be used unless default settings were explicitly changed.

    mediasoup is the default in 2.5. Why is Kurento still around?

    Because Kurento is still used for stream recording. It should be removed as a dependency as soon as this issue is addressed.

    Is single-core performance still important with mediasoup?

    How can I control the number of mediasoup workers?

    To control the number of mediasoup workers, bbb-webrtc-sfu’s override configuration file (located in /etc/bigbluebutton/bbb-webrtc-sfu/production.yml ) should be used.

    There are a couple of configurations of interest here:

    mediasoup.workers

    This configuration controls the number of mediasoup workers intended for general use (media type agnostic, shared pool).

    Accepted values are:

    • «auto» (default): creates ceil((min(nproc,32) * 0.8) + (max(0, nproc — 32) / 2)) workers;
    • «cores» : creates workers up to the host’s core count (as provided by os.cpus().length);
    • : overrides the number of workers with a fixed value;
    • The default and fallback values are auto .
    • To set the number of workers to cores : yq w -i /etc/bigbluebutton/bbb-webrtc-sfu/production.yml mediasoup.workers «cores»

    mediasoup.dedicatedMediaTypeWorkers

    This configuration controls the number of mediasoup workers to be used by specific media types. If a dedicated pool is set, streams of its media type will always land on it. Otherwise, they will use the shared pool.

    The configuration is an object of the following format:

    The semantics of auto , cores and Number are the same as in the mediasoup.workers configuration. Default values for all media types are 0 (no dedicated workers).

    The media types semantics are:

    • audio : audio (listen only, microphone) streams;
    • main : webcam video streams;
    • content : screen sharing streams (audio and video).
    • To set the number of dedicated audio workers to auto : yq w -i /etc/bigbluebutton/bbb-webrtc-sfu/production.yml mediasoup.dedicatedMediaTypeWorkers.audio «auto»

    Can I scale the number of streams up indefinitely with mediasoup?

    No. Scalability improves a lot with mediasoup, but there are still a couple of bottlenecks that can be hit as far as far as the media stack is concerned. Namely:

    • The signaling server (bbb-webrtc-sfu): it does not scale vertically indefinitely. There’s always work ongoing on this area that can be tracked in this issue;
    • The mediasoup worker balancing algorithm implemented by bbb-webrtc-sfu is still focused on multiparty meetings with a restrained number of users. If your goal is thousand-user 1-N (streaming-like) meetings, you may max out CPU usage on certain mediasoup workers even though there are other idle oworkers free.

    Kurento

    WebRTC video not working with Kurento

    Check the value for /proc/sys/net/ipv4/tcp_syncookies that it contains the value 1 .

    If not, edit /etc/sysctl.conf and set the value for net.ipv4.tcp_syncookies to 1 .

    Save the file and restart.

    Unit kurento-media-server.service is masked

    If sudo bbb-conf —check returns the warning

    You can unmask Kurento using the command

    Unable to share webcam

    The default installation of BigBlueButton should work in most netowrk configurations; however, if your users ae behind a restrictive network that blocks outgoing UDP connections, they may encounter 1020 errors (media unable to reach server).

    If you get reports of these errors, setup TURN server to help their browsers send WebRTC audio and video streams via TCP over port 443 to the TURN server. The TURN server will then relay the media to your BigBlueButton server.

    FreeSWITCH

    Configure BigBluebutton/FreeSWITCH to support IPV6

    The HTML5 client now enables users on mobile devices to connect to a BigBlueButton server. However, on some cellular networks iOS devices only receive an IPV6 address.

    To enable BigBlueButton (FreeSWITCH) to accept incoming web socket connections on IPV6, the BigBlueButton server must have an IPV6 address. You also need to make the following changes to the server.

    First, create the file /etc/nginx/conf.d/bigbluebutton_sip_addr_map.conf with this content:

    replacing the ip addresses 192.0.2.1 with the system’s external IPV4 addresses, and replace 2001:db8::1 with the system’s external IPV6 address. Next, edit the file /etc/bigbluebutton/nginx/sip.nginx to have the following:

    Next, ensure all of the following params are present in freeswitch’s sip_profiles/external-ipv6.xml :

    • ws-binding
    • wss-binding
    • rtcp-audio-interval-msec
    • rtcp-video-interval-msec
    • dtmf-type
    • liberal-dtmf
    • enable-3pcc

    If any are missing, copy them from sip_profiles/external.xml , then restart BigBlueButton ( sudo bbb-conf —restart ).

    FreeSWITCH fails to bind to IPV4

    In rare occasions after shutdown/restart, the FreeSWITCH database can get corrupted. This will cause FreeSWITCH to have problems binding to IPV4 address (you may see error 1006 when users try to connect).

    To check, look in /opt/freeswitch/var/log/freeswitch/freeswitch.log for errors related to loading the database.

    If you see these errors, clear the FreeSWITCH database (BigBlueButton doesn’t use the database and FreeSWITCH will recreate it on startup).

    Forward calls from an Asterisk server to FreeSWITCH

    Let’s assume the following:

    Changes to your Asterisk server

    Setup your gateway to BigBlueButton/FreeSWITCH. in /etc/asterisk/sip.conf add

    Route the calls to the gateway. In /etc/asterisk/extensions.conf context where your calls are being handled, forward the calls to the gateway. Here, when someone dials 85001, the call is sent to the fs-gw defined above.

    Changes to your BigBlueButton/FreeSWITCH server

    In BigBlueButton/FreeSWITCH, make the following changes:

    Lock down so that only Asterisk can forward calls to FreeSWITCH. In /opt/freeswitch/conf/autoload_configs/acl.conf.xml , add the following ACL. We also need to allow BigBlueButton to call into FreeSWITCH, that’s why we add the IP of BigBlueButton/FreeSWITCH into the ACL.

    Then we apply the ACL into the profile that receives the calls from external gateways. In /opt/freeswitch/conf/sip_profiles/external.xml , add the ACL under

    To debug, try connecting to FS CLI and increase logging level. Once connected, make your call and see what the logs say.

    FreeSWITCH fails to bind to port 8021

    FreeSWITCH supports both IPV4 and IPV6. However, if your server does not support IPV6, FreeSWITCH will be unable to bind to port 8021. If you run sudo bbb-conf —check and see the following error

    it might be that your server has IPV6 disabled (or does not support it). You can check this by running the following command

    If you do not see the line inet6 ::1/128 scope host , then your server has IPV6 disabled. In this case, we need to disable FreeSWITCH’s support for IPV6. First, edit /opt/freeswitch/etc/freeswitch/autoload_configs/event_socket.conf.xml and change the line

    This tells FreeSWITCH that instead of binding port 8021 to the local IPV6 address, bind to the IPV4 address 127.0.0.1. Next, execute the following two commands

    and then restart BigBlueButton with the commands

    FreeSWITCH fails to start with a SETSCHEDULER error

    When running in a container (like a chroot, OpenVZ or LXC), it might not be possible for FreeSWITCH to set its CPU priority to real-time round robin. If not, it will result in lower performance compared to a non-virtualized installation.

    If you running BigBlueButton in a container and an error starting FreeSWITCH, try running systemctl status freeswitch.service and see if you see the error related to SETSCHEDULER

    If you see SETSCHEDULER in the error message, edit /lib/systemd/system/freeswitch.service and comment out the line containing CPUSchedulingPolicy=rr (round robin)

    Save the file, run systemctl daemon-reload , and then restart BigBlueButton. FreeSWITCH should now startup without error.

    Users not able to join Listen Only mode

    When doing sudo bbb-conf —check , you may see the warning

    This error occurs when bbb-apps-sip isn’t able to make a SIP call to FreeSWITCH. You’ll see this in BigBlueButton when users click the headset icon and don’t join the voice conference.

    One possible cause for this is you have just installed BigBlueButton, but not restarted it. The packages do not start up the BigBlueButton components in the right order. To restart BigBlueButton, do the following:

    If you don’t want FreeSWITCH to bind to 127.0.0.1, you need to figure out which IP address its using. First, determine the IP address FreeSWITCH is monitoring for incoming SIP calls with the following command:

    You should see an output such as

    In this example, FreeSWITCH is listening on IP address 234.147.116.3. The IP address on your server will be different.

    Next, edit /usr/share/red5/webapps/sip/WEB-INF/bigbluebutton-sip.properties and set the value for sip.server.host to the IP address returned from the above command. Save the changes (you’ll need to edit the file as root to save changes).

    Restart BigBlueButton using the commands and run the built-in diagnostics checks.

    Unable to connect using fs_cli

    As of BigBlueButton 2.2.18, the packaging now replaces the default ClueCon password for connecting to the FreeSWITCH command line interface ( fs_cli ) with a random password.

    (By default, FreeSWITCH only allowed unauthenticated connections from 127.0.0.1, but it’s still good security practice to not use default passwords).

    To connect to fs_cli , use the following command which supplies the password for authenticating.

    We also added /usr/local/bin/fs_clibbb with the contents

    that will let you type fs_clibbb at the command prompt to get into FreeSWITCH console.

    Echo test hangs upgrading BigBlueButton 2.2

    The install scripts now change the default CLI password for FreeSWITCH and the other parts of BigBlueButton need to use this new password. For a new installation, the install scripts will automatically set this new password.

    If you upgrade using bbb-install.sh, the script will update the FreeSWITCH password using sudo bbb-conf —setip .

    If you upgraded using manual steps, be sure to do ao sudo bbb-conf —setip to sync all the FreeSWITCH passwords.

    FreeSWITCH using default stun server

    For many years, in BigBlueButton’s FreeSWITCH configuration file /opt/freeswitch/etc/freeswitch/vars.xml , the default value for external_rtp_ip was stun.freeswitch.org

    However, this is not a reliable choice for stun server. Recommend either changing it to your servers external IP address or setup your own stun/turn server. For example, if your server has an external IP at 234.32.3.3

    You can add a line in /etc/bigbluebutton/bbb-conf/apply-conf.sh to always apply this value even if the FreeSWITCH package upgrades.

    Note: If your server has an internal/exteral IP address, such as on AWS EC2 server, be sure to set it to the external IP address configure a dummy network interface card (see Update FreeSWITCH).

    HTML5 Server

    bbb-html5 fails to start with a SETSCHEDULER error

    As of 2.2.31, the systemd unit file for bbb-html5.service now contains the following lines

    You can override this with creating the following directory

    and creating /etc/systemd/system/bbb-html5.service.d/override.conf with the following contents

    Then do systemctl daemon-reload and restart BigBlueButton.

    Installation and packages

    The following packages have unmet dependencies

    When installing the latest build of BigBlueButton, the package bbb-conf now uses yq to manage YAML files.

    You need to add the repository ppa:rmescandon/yq to your server. For steps on how to do this, see Update your server in the BigBlueButton 2.2 install guide.

    Alternatively, if you have not made any customizations to BigBlueButton (outside of using bbb-conf ), you can use bbb-install.sh to install/upgrade to the latest version (the bbb-install.sh script will automatically install the repository for yq ).

    No Symbolic Link

    If you’ve installed/uninstalled BigBlueButton packages, you may get a No Symbolic Link warning from bbb-conf —check :

    To solve this, add a symbolic link to nginx for the BigBlueButton site:

    Package install fails with sed error

    Some of the BigBlueButton packages use sed scripts to extract contents from configuration files. If the file does not exist at the time of the script’s execution, or the sed script matches multiple entries in a file (such as when a configuration line is commented out), you can see an error such as

    In the above example, the /var/lib/dpkg/info/bbb-client.postinst failed to finish. To debug, edit this file and change the first line to read

    You should now see each command in bbb-conf.postinst as it executes upto the line in which the error occurs. Post this output to https://groups.google.com/forum/#!forum/bigbluebutton-setup for help in resolving the issue.

    Errors with packages

    Some hosting providers do not provide a complete /etc/apt/source.list . If you are finding your are unable to install a package, try replacing your /etc/apt/sources.list with the following

    and try installing BigBlueButton again from the beginning.

    WebRTC errors (1001, 1002,…)

    WebRTC offers very high-quality audio. However, the user’s network settings (or firewall) may not allow WebRTC to connect (or keep connected).

    Here are the following lists the possible WebRTC error messages that a user may encounter:

    • 1001: WebSocket disconnected — The WebSocket had connected successfully and has now disconnected. Possible Causes:
      • Loss of internet connection
      • Nginx restarting can cause this
    • 1002: Could not make a WebSocket connection — The initial WebSocket connection was unsuccessful. Possible Causes:
      • Firewall blocking ws protocol
      • Server is down or improperly configured
      • See potential solution here.
    • 1003: Browser version not supported — Browser doesn’t implement the necessary WebRTC API methods. Possible Causes:
      • Out of date browser
    • 1004: Failure on call — The call was attempted, but failed. Possible Causes:
      • For a full list of causes refer here
      • There are 24 different causes so I don’t really want to list all of them
      • Solution for this issue outlined here.
    • 1005: Call ended unexpectedly — The call was successful, but ended without user requesting to end the session. Possible Causes:
      • Unknown
    • 1006: Call timed out — The library took too long to try and connect the call. Possible Causes:
      • Previously caused by Firefox 33-beta on Mac. We’ve been unable to reproduce since release of FireFox 34
    • 1007: ICE negotiation failed — The browser and FreeSWITCH try to negotiate ports to use to stream the media and that negotiation failed. Possible Causes:
      • NAT is blocking the connection
      • Firewall is blocking the UDP connection/ports
    • 1008: Call transfer failed — A timeout while waiting for FreeSWITCH to transfer from the echo test to the real conference. This might be caused by a misconfiguration in FreeSWITCH, or there might be a media error and the DTMF command to transfer didn’t go through (In this case, the voice in the echo test probably didn’t work either.)
    • 1009: Could not fetch STUN/TURN server information — This indicates either a BigBlueButton bug (or you’re using an unsupported new client/old server combination), but could also happen due to a network interruption.
    • 1010: ICE negotiation timeout — After the call is accepted the client’s browser and the server try and negotiate a path for the audio data. In some network setups this negotiation takes an abnormally long time to fail and this timeout is set to avoid the client getting stuck.
    • 1020: Media cloud could not reach the server — See how to solve this here.

    Networking

    Server running behind NAT

    The following issue might be helpful in debugging if you run into errors and your server is behind NAT.

    Could not get your microphone for a WebRTC call

    Chrome requires (As of Chrome 47) that to access the user’s microphone for WebRTC your site must be serving pages via HTTPS (that is, nginx is configured with a SSL certificate).

    If the user attempts to share their microphone and your BigBlueButton sever is not configured for SSL, Chrome will block access and BigBlueButton will report the following error

    WebRTC Audio Failure: Detected the following WebRTC issue: Could not get your microphone for a WebRTC call. Do you want to try flash instead?

    To enable Chrome to access the user’s microphone, see Configure HTTPS on BigBlueButton.

    The browser is not supported

    When you attempt to join a BigBlueButton session, the client looks for supported browsers before fully loading. The client gets its list of supported browsers from /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml . You can see the list of supported browsers at the bottom. For example,

    states that Mobile Safari version 11.1 or later is supported (notice the first letter is lower case and concatenated with the remainder of the browser name).

    To add a browser to the list, first find your browser’s useragent. You could use a tool like https://wtools.io/check-my-user-agent as well. For example, with the Vivaldi browser you might see

    Next, to add this as a supported browser, append to settings.yml

    save the updated settings.yml file, and then restart your BigBlueButton server with sudo bbb-conf —restart . Note any browser you add must support WebRTC libraries (not all do), so be sure to check it first with https://test.webrtc.org/.

    Tomcat shows “Cannot assign requested address on startup”

    If your server has multiple IP addresses, Tomcat might not pick the right address to bind. This could throw an error on installation when tomcat is attempting to install.

    Check /var/log/tomcat7/catalina.out for the following error

    If you see this, first ensure that there isn’t another copy of tomcat running by doing ps -aef | grep tomcat7 . If you do see another copy running, try killing it and then restarting tomcat.

    If you still see the same error in catalina.out , then /etc/tomcat7/server.xml and change

    Restart tomcat7 again and it should start normally.

    nginx not running

    The common reasons for nginx not running are inability to bind to port 80 and configuration errors. To check if port 80 is already in use, use

    to see if any process is currently bound to port 80. If so, check to see if another web server is installed. If so, then stop the web server and try to restart nginx. One of the server requirements before you install BigBlueButton is that port 80 is not in use by another application (such as Apache). For details on why this is a requirements, see We recommend running BigBlueButton on port 80.

    If port 80 is free, check if your nginx configuration file has errors. Try a restart of nginx

    and look for the output of

    If you see [ Fail ] , then your nginx configuration files might have a syntax error. Check the syntax of the nginx configuration files using the command

    and see if it reports any errors. You can also check the error.log file for nginx to see what errors it gives on startup

    “Welcome to nginx”

    During installation of BigBlueButton the packaging scripts attempt to assign the correct IP address during setup. However, if the IP address changes (such as when rebooting a VM), or the first IP address was not the correct IP address for the server, you may see a “Welcome to nginx” page.

    To reconfigure the BigBlueButton to use the correct IP address or hostname, see BigBlueButton does not load.

    bbb-web

    404 Error when loading the client

    BigBlueButton 2.2 requires Java 8 as the default Java. Recently, some Ubuntu 16.04 distributions have switched the default version of Java to Java 9 (or later).

    Use java -version to check that the default version of 1.8.0 .

    If not, do the following

    Run java -version and confirm it now shows the default as 1.8.0 , and then restart BigBlueButton with sudo bbb-conf —restart

    Blank presentation area on create or upload

    If you join a meeting and the default presentation is not visible or your uploaded presentation doesn’t display, then this is most likely due to a permissions error. To solve this, ensure that /var/bigbluebutton/ is owned by bigbluebutton rather than root or any other account. See this issue for more explanation.

    Unable to create presentation

    If you see the following error in /var/log/bigbluebutton/bbb-web.log

    use the command mount to check that the /tmp director does not have noexec permissions (which would prevent executables from running in the /tmp directory). If you see noexec for /tmp , you need to remount the directory with permissions that enable processes (such as the slide conversion) to execute in the /tmp directory.

    Too many open files

    On servers with greater than 8 CPU cores, bbb-web log ( /var/log/bigbluebutton/bbb-web.log ) may throw an error of Too many open files

    To resolve, create an override file that increases the number of open files for bbb-web

    bbb-web takes a long time to startup

    bbb-web relies on the SecureRandom class (which uses available entropy) to provide random values for its session IDs. On a virtualized server, however, the available entropy can run low and cause bbb-web to block for a long period before it finishes it’s startup sequence (see Slow startup of tomcat).

    To provide bbb-web with more entropy, you can install haveged

    Error installing bbb-web

    If you get the following error during upgrade to BigBlueButton

    Then first uninstall bbb-client

    and try installing BigBlueButton again.

    Other errors

    Root partition too small

    If the root partition on your BigBlueButton server is too small (for disk space requirements see Before you install), we recommend moving the following directories to an external partition with sufficient disk space.

    BigBlueButton processing and storage of recordings:

    Location of all media directories on disk available here.

    To make the move, we’ll first stop BigBlueButton, then move the above directories to a new location on the external partition, create symbolic links from the original locations to the new locations, and restart BigBlueButton.

    In the following example, the external partition is mounted on /mnt .

    BigBlueButton does not load

    If your has changed it’s network connection (such as on reboot), you can clean most of BigBlueButton’s configuration files with the following steps.

    For more information see bbb-conf options.

    Running within an LXD Container

    LXD is a very powerful container system for Ubuntu lets you run full Ubuntu 16.04 servers within a container. Because you can easily clone and snapshot LXD containers, they are ideal for development and testing of BigBlueButton.

    However, if you install BigBlueButton within an LXD container, you will get the following error from sudo bbb-conf —check

    You’ll also get an error from starting FreeSWITCH with bbb-conf —restart . When you try systemctl status freeswitch.service , you’ll see an error with SETSCHEDULER.

    This error occurs because the default systemd unit script for FreeSWITCH tries to run with permissions not available to the LXD container. To run FreeSWITCH within an LXD container, edit /lib/systemd/system/freeswitch.service and replace with the following

    Then enter the following commands to load the new unit file and restart BigBlueButton.

    You can run BigBlueButton within a LXD container.

    Unable to connect to redis

    The packages bbb-apps-akka , bbb-fsesl-akka , and bbb-transcode-akka are packaged by sbt, but they need to have redis-server running before they startup. If sudo bbb-conf —debug shows redis connection errors

    you can add overrides for these three packages to ensure they start after redis.server. Run the following script.

    The script bbb-install now creates these overrides by default.

    500 Internal Server Error

    It is most likely an error on GreenLight. Check the log file according to Troubleshooting Greenlight.

    If this error occurrs on just a small number of PCs accessing a BigBlueButton server within a LAN through a proxy server and you find the description “Error::Unsafe Host Error (x.x.x.x is not a safe host)” (where x.x.x.x is an IP address) in the log file, check if the “Don’t use the proxy server for local (intranet) addresses” (in the Windows proxy setting) is ticked.

    Legacy errors

    Conference not found errors

    The command sudo bbb-conf —debug searches through the red5, tomcat7, and nginx logs looking for errors and exceptions. However, the messages such as

    Источник

    Вопрос:

    Я написал приложение, которое использует веб-сокеты для связи между сервером и клиентом. Я хотел бы обработать случай, когда клиент устарел (слишком старый) и, таким образом, неправильно интерпретирует/не обрабатывает сообщения. Я думаю, что если клиент слишком стар, я закрываю соединение и отправляю соответствующий код состояния. Я прочитал спецификацию, и кажется, что 1002 может быть подходящим кодом:

      1002 indicates that an endpoint is terminating the connection due
    to a protocol error.
    

    Однако я действительно не знаю, что это значит (если он действительно ссылается на протокол веб-сокета и, следовательно, на ошибку более низкого уровня). Для этого подходит 1002, или я должен сделать код закрытого (прикладного) кода в области 4000-4999, как определено здесь: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent

    Лучший ответ:

    Код ошибки 1002 предназначен для нарушений протокола WebSocket на низком уровне. Например, сообщение WebSocket было текстовым сообщением, но полезная нагрузка содержала недопустимый UTF8. Вы не должны использовать это для ситуации. Ошибки 1002 обычно генерируются внутренними средствами реализации WebSocket, а не приложением, использующим WebSocket.

    Теперь в вашей ситуации у вас есть два варианта:

    • Если клиент может быть идентифицирован как “слишком старый” уже во время установления рукопожатия открытия WebSocket, вы можете не выполнить рукопожатие, используя HTTP Bad Request 400.

    • Вы можете разрешить рукопожатие завершить, выполнить обмен сообщениями в WebSocket, определяющий версию клиента, а затем закрыть соединение (выполняющее надлежащее квитирование с помощью WebSocket) с кодом ошибки из диапазона 4000-4999. Да, этот диапазон был бы уместным. https://tools.ietf.org/html/rfc6455#section-7.4.2

    Последний более гибкий и дает клиенту лучшую обратную связь. В частности, JavaScript в браузере получит доступ только к закрытому коду (2), а не к HTTP-ошибке в (1).

    Еще один заметный аспект: соответствующая реализация WebSocket просто не позволит приложению запускать с помощью 1002. Единственными закрытыми кодами, разрешенными для использования приложения, являются 1000 (который является “нормальным” ) и 3000 - 3999 (использование приложения, но зарегистрировано в IETF) и 4000 - 4999 (использование приложения, частная незарегистрированная).

    Mark Lin

    unread,

    Mar 7, 2016, 3:44:57 PM3/7/16

    to BigBlueButton-Setup

    Hello,

    i installed the default BBB without https

    no fire wall

    getting in chrome & firefox the same error —

    Detected the following WebRTC issue: Error 1002: Could not make a WebSocket connection.

    what should i look fore?

    Thank you

    HostBBB.com

    unread,

    Mar 7, 2016, 3:54:02 PM3/7/16

    to BigBlueButton-Setup

    Mark,

    Do  ifconfig, does your server show the external ip, or an internal ip?

    You didn’t give us much details, is this .91 or 1.0beta?

    Also,  a simple  telnet yourserver.com 5066 will verify whether you can connect to websockets server.

    It wont work until this port can be accessed, and freeswitch answers.

    regards,

    Stephen

    mlin40613

    unread,

    Mar 7, 2016, 5:19:53 PM3/7/16

    to bigbluebu…@googlegroups.com

    Sorry about «much details»

    BBB 1.0 BETA

    Dedicated server

    bbb-conf —check

    BigBlueButton Server 1.0.0-beta (1028)

                        Kernel version: 3.19.0-28-generic

                          Distribution: Ubuntu 14.04.4 LTS (64-bit)

                                Memory: 3952 MB

    /var/www/bigbluebutton/client/conf/config.xml (bbb-client)

                    Port test (tunnel): Mydomain.com

                                  Red5: Mydomain.com

                  useWebrtcIfAvailable: true

    /opt/freeswitch/conf/sip_profiles/external.xml (FreeSWITCH)

                        websocket port: 5066

                        WebRTC enabled: true

    /etc/nginx/sites-available/bigbluebutton (nginx)

                           server name: Mydomain.com

                                  port: 80

                        bbb-client dir: /var/www/bigbluebutton

    /var/lib/tomcat7/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties (bbb-web)

                          bbb-web host: Mydomain.com

    /var/lib/tomcat7/webapps/demo/bbb_api_conf.jsp (API demos)

                                   url: Mydomain.com

    /var/www/bigbluebutton/check/conf/config.xml (client check)

                          client check: Mydomain.com

    /usr/share/red5/webapps/bigbluebutton/WEB-INF/red5-web.xml (red5)

                      voice conference: FreeSWITCH

                         capture video: true

                       capture desktop: true

    /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml (record and playback)

                         playback host: Mydomain.com

    ** Potential problems described below **

    # IP does not match:

    #                           IP from ifconfig: 104.xxx.39.xx

    #   /etc/nginx/sites-available/bigbluebutton: Mydomain.com

    # Warning: API URL IPs do not match host:

    #

    #                                IP from ifconfig: 104.xxx.39.xx

    #  /var/lib/tomcat7/webapps/demo/bbb_api_conf.jsp: Mydomain.com

    # Warning: The API demos are installed and accessible from:

    #

    #

    # These API demos allow anyone to access your server without authentication

    # to create/manage meetings and recordings. They are for testing purposes only.

    # If you are running a production system, remove them by running:

    #

    #    sudo apt-get purge bbb-demo

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

    #

    mlin40613

    unread,

    Mar 8, 2016, 7:13:42 PM3/8/16

    to bigbluebu…@googlegroups.com

    Chad Pilkey

    unread,

    Mar 8, 2016, 10:11:06 PM3/8/16

    to BigBlueButton-Setup

    mlin40613

    unread,

    Mar 9, 2016, 1:04:15 AM3/9/16

    to bigbluebu…@googlegroups.com

    but getting the same result.

    i do not no if it is related but when running: sudo bbb-conf —debug

       — Exceptions found in /var/lib/tomcat7/logs/ —

    /var/lib/tomcat7/logs/catalina.out:java.net.ConnectException: Connection refused

    /var/lib/tomcat7/logs/catalina.out:java.lang.NullPointerException

    Thank you

    Chad Pilkey

    unread,

    Mar 9, 2016, 1:31:12 AM3/9/16

    to BigBlueButton-Setup

    The websocket connection doesn’t go through tomcat so those logs won’t matter.

    What is the output of «cat /etc/bigbluebutton/nginx/sip.nginx»?

    What is the output of «ifconfig»?


    You received this message because you are subscribed to the Google Groups «BigBlueButton-Setup» group.

    mlin40613

    unread,

    Mar 9, 2016, 1:45:55 PM3/9/16

    to bigbluebu…@googlegroups.com

     cat /etc/bigbluebutton/nginx/sip.nginx

    location /ws {

            proxy_pass http://104.xxx.xx.50:5066;

            proxy_http_version 1.1;

            proxy_set_header Upgrade $http_upgrade;

            proxy_set_header Connection «Upgrade»;

            proxy_read_timeout 6h;

            proxy_send_timeout 6h;

            client_body_timeout 6h;

            send_timeout 6h;

    ifconfig

    eth0      Link encap:Ethernet  HWaddr 00:00:68:f5:27:32

              inet addr:104.xxx.xx.50  Bcast:104.xxx.xx.255  Mask:255.255.254.0

              inet6 addr: fe80::200:68ff:fef5:2732/64 Scope:Link

              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

              RX packets:7287 errors:0 dropped:0 overruns:0 frame:0

              TX packets:7336 errors:0 dropped:0 overruns:0 carrier:0

              collisions:0 txqueuelen:1000

              RX bytes:1152750 (1.1 MB)  TX bytes:4825900 (4.8 MB)

    lo        Link encap:Local Loopback

              inet addr:127.0.0.1  Mask:255.0.0.0

              inet6 addr: ::1/128 Scope:Host

              UP LOOPBACK RUNNING  MTU:65536  Metric:1

              RX packets:41721 errors:0 dropped:0 overruns:0 frame:0

              TX packets:41721 errors:0 dropped:0 overruns:0 carrier:0

              collisions:0 txqueuelen:0

              RX bytes:7026678 (7.0 MB)  TX bytes:7026678 (7.0 MB)

    HostBBB.com

    unread,

    Mar 9, 2016, 3:29:10 PM3/9/16

    to BigBlueButton-Setup

    Mark,  back to my question from few days ago,

    1) Is this your public ipaddress that your domain is mapped to?

    regards,

    Stephen


    You received this message because you are subscribed to the Google Groups «BigBlueButton-Setup» group.


    You received this message because you are subscribed to the Google Groups «BigBlueButton-Setup» group.

    mlin40613

    unread,

    Mar 9, 2016, 5:36:12 PM3/9/16

    to bigbluebu…@googlegroups.com

    1) «Is this your public ipaddress that your domain is mapped to?»

    Chad Pilkey

    unread,

    Mar 9, 2016, 6:42:33 PM3/9/16

    to BigBlueButton-Setup

    Can you connect to the WebRTC audio on http://demo.bigbluebutton.org? I think we’ve gone through all of the normal server configuration causes. I’m wondering if it’s a client side issue.


    You received this message because you are subscribed to the Google Groups «BigBlueButton-Setup» group.


    You received this message because you are subscribed to the Google Groups «BigBlueButton-Setup» group.


    You received this message because you are subscribed to the Google Groups «BigBlueButton-Setup» group.

    mlin40613

    unread,

    Mar 9, 2016, 7:05:23 PM3/9/16

    to bigbluebu…@googlegroups.com

    mlin40613

    unread,

    Mar 10, 2016, 7:44:40 PM3/10/16

    to bigbluebu…@googlegroups.com

    Tried to go thru the configuration recommended at- 

    and

    but it is seems that every thing in place.

    i want to manchen that i testeb bbb on VPS & Deticated server and i get the same result — 

    error1002.

    what are my option?

    Thank you

    mlin40613

    unread,

    Mar 11, 2016, 1:04:03 PM3/11/16

    to bigbluebu…@googlegroups.com

    Fred Dixon

    unread,

    Mar 11, 2016, 2:57:04 PM3/11/16

    to bigbluebu…@googlegroups.com

    Hi Mark,

    You’ve posted twice in the last 24 hours, which suggest you believe there is an implied service level agreement in these forums in which all messages are answered within X hours or Y days.

    There is not.

    These forums are for members to volunteer their time to help others.  There are over 2000 members in this forum.  Posting twice does *not* increase your chances for a response; rather, it just floods the mailbox of all members.

    If you are unable to wait for another member to volunteer their time, you have other support options at

    In any event, be patient.

    Regards,… Fred

    Понравилась статья? Поделить с друзьями:
  • Ошибка 1002 на телевизоре сони как исправить
  • Ошибка 1028 гта 5
  • Ошибка 1012 dns client events как исправить
  • Ошибка 1002 акси касса
  • Ошибка 1028 abgasrueckfuehr regelung