Содержание
- Two way audio error websocket disconnected
- Introduction
- Recording
- Recording not processing after upgrading
- mediasoup
- Webcams/screen sharing aren’t working
- Configure mediasoup to use IPv6
- I’m having troubles seeing webcams or screen sharing in Firefox
- How often does this Firefox issue happens?
- Where can I track progress on a definitive solution or better workaround?
- Why isn’t forceRelayOnFirefox enabled by default?
- How do I know if mediasoup is being used?
- mediasoup is the default in 2.5. Why is Kurento still around?
- Is single-core performance still important with mediasoup?
- How can I control the number of mediasoup workers?
- mediasoup.workers
- mediasoup.dedicatedMediaTypeWorkers
- Can I scale the number of streams up indefinitely with mediasoup?
- Kurento
- WebRTC video not working with Kurento
- Unit kurento-media-server.service is masked
- Unable to share webcam
- FreeSWITCH
- Configure BigBluebutton/FreeSWITCH to support IPV6
- FreeSWITCH fails to bind to IPV4
- Forward calls from an Asterisk server to FreeSWITCH
- Changes to your Asterisk server
- Changes to your BigBlueButton/FreeSWITCH server
- FreeSWITCH fails to bind to port 8021
- FreeSWITCH fails to start with a SETSCHEDULER error
- Users not able to join Listen Only mode
- Unable to connect using fs_cli
- Echo test hangs upgrading BigBlueButton 2.2
- FreeSWITCH using default stun server
- HTML5 Server
- bbb-html5 fails to start with a SETSCHEDULER error
- Installation and packages
- The following packages have unmet dependencies
- No Symbolic Link
- Package install fails with sed error
- Errors with packages
- WebRTC errors (1001, 1002,…)
- Networking
- Server running behind NAT
- Could not get your microphone for a WebRTC call
- The browser is not supported
- Tomcat shows “Cannot assign requested address on startup”
- nginx not running
- “Welcome to nginx”
- bbb-web
- 404 Error when loading the client
- Blank presentation area on create or upload
- Unable to create presentation
- Too many open files
- bbb-web takes a long time to startup
- Error installing bbb-web
- Other errors
- Root partition too small
- BigBlueButton does not load
- Running within an LXD Container
- Unable to connect to redis
- 500 Internal Server Error
- Legacy errors
- Conference not found errors
Two way audio error websocket disconnected
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
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
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
Источник
Successfully integrating different systems can be complex, especially when handling real-time audio. When you begin to work with Deepgram’s live streaming API, you may encounter some errors. If you do, don’t worry—we’re here to help!
Our streaming test suite provides sample code to help you get started. Before you begin to build your own integration, we recommend running our test suite code at least once to ensure that you can successfully stream sample audio to Deepgram.
WebSocket Connections
WebSocket is a protocol that makes it possible to open a two-way interactive communication session between a user’s browser and a server. When a WebSocket connection is established, you can send messages to a server and receive event-driven responses from the server without having to poll the server for a reply. WebSocket can be useful when you want to work with any real-time updated or continuous streams of data that are being transmitted over the network.
Establishing a WebSocket Connection
To initiate a WebSocket connection, the client sends an HTTP handshake request to the server asking the server to upgrade the connection to a WebSocket connection. This request may contain configuration options passed as URL query parameters. If operating on the server side, the request may also contain additional headers that can be used for authentication or other purposes. (For security reasons, browser-based WebSocket libraries restrict access to sending and receiving headers.)
Most WebSocket libraries abstract the handshake process. A developer only needs to call websockets.connect
(or the library’s equivalent), and the library handles the rest of the implementation of the HTTP upgrade.
If the server thinks the HTTP request and any provided configuration options or credentials are valid, it responds with an HTTP 101
code, indicating that the connection is accepted and that the server plans to switch the connection to the WebSocket protocol. After the HTTP 101
response is sent, the client can start to send and receive data from the WebSocket as usual.
If something in the HTTP request doesn’t seem right, the server rejects the request and does not complete the upgrade from HTTP to WebSocket. If the server cannot upgrade an HTTP request to a WebSocket connection, you will receive an error in the form of an HTTP 4xx
or 5xx
response.
Closing the WebSocket Connection
A successfully opened WebSocket connection will stay alive until it is eventually closed by either the client or the server. When this occurs, a WebSocket Close frame (WebSocket Protocol specification, section 5.5.1) will be returned. The body of the Close frame will indicate the reason for closing using one of the specification’s pre-defined status codes followed by a UTF-8-encoded payload that represents the reason for the error. After sending a Close message, the endpoint considers the WebSocket connection closed and will close the underlying TCP connection.
Debugging Websocket Errors
Websocket errors that you may experience fall into two major categories:
- Failure to connect to Deepgram
- Abrupt closure of the WebSocket connection after it has been established
Failure to Connect to Deepgram
If you’re unable to connect to Deepgram, then during the upgrade process, the Deepgram API provides custom HTTP headers that contain debugging information:
- Regardless of the success or failure of the WebSocket upgrade, all requests include the
dg-request-id
HTTP header, which contains the request ID. - Requests that do not successfully upgrade to a WebSocket connection also include the
dg-error
HTTP header, which contains a detailed error message concerning why the connection could not be upgraded. This error message is also sent back in the body of the HTTP response.
The level of access you have to the custom HTTP headers returned by the Deepgram API depends on the WebSocket library you are using. For example, for security reasons, browser-based WebSocket libraries like the JavaScript WebSocket library only allow access to HTTP header information for successful WebSocket connections.
Code Samples
In the following code samples, be sure to replace YOUR_DEEPGRAM_API_KEY
with your Deepgram API Key. (You can generate one using the Deepgram Console). Otherwise, the code will fail with an Invalid credentials
error.
Abrupt WebSocket Closures
If Deepgram encounters an error during real-time streaming, the Deepgram API returns a WebSocket Close frame (WebSocket Protocol specification, section 5.5.1). The body of the Close frame indicates the reason for closing using one of the specification’s pre-defined status codes followed by a UTF-8-encoded payload that represents the reason for the error. Current codes and payloads in use include:
Code | Payload | Description |
---|---|---|
1008 |
DATA-0000 |
The payload cannot be decoded as audio. The payload either is not audio data or is a codec unsupported by Deepgram. |
1011 |
NET-0000 |
The service has not transmitted a Text frame to the client within the timeout window. This may indicate an internal issue with Deepgram’s systems, or Deepgram may have not received enough audio data to transcribe a frame. |
1011 |
NET-0001 |
The service has not received a Binary frame from the client within the timeout window. This may indicate an internal issue with Deepgram’s systems, the client’s systems, or the network connecting them. |
After sending the Close message, our endpoint considers the WebSocket connection closed and will close the underlying TCP connection.
Troubleshooting 1008
— DATA-0000
WebSocket Errors
If you’re receiving a 1008
code with a DATA-0000
payload, Deepgram can’t decode the audio data you’re sending.
Often, this error is caused because the data you intend to send to Deepgram is not being sent. To troubleshoot:
-
Start by closely inspecting the data being sent to Deepgram. One way to do this is by writing the audio data to a file to make sure it contains the expected audio and can be played back.
-
If the audio data is valid, check whether the audio being sent is raw or containerized. If the audio is raw, frequently this error occurs because the encoding and sample rate parameters have not been set explicitly or have been set incorrectly, either of which will cause Deepgram to be unable to decode the audio. To learn more, see our guide on determining your audio format.
Troubleshooting 1011
— NET-0000
WebSocket Errors
If you’re receiving a 1011
code with a NET-0000
payload, Deepgram wasn’t able to generate a transcript for the audio data you’re sending before the system timed out. To troubleshoot:
-
Check the status of Deepgram’s systems to confirm that Deepgram is operational.
-
If all Deepgram systems are green, contact Support. When contacting support, be sure to include:
- the error received
- the request ID
- a sample of your audio
- any related code you’re able to share.
Troubleshooting 1011
— NET-0001
WebSocket Errors
If you’re receiving a 1011
code with a NET-0001
payload, Deepgram didn’t receive any audio from you before the system timed out.
As with the 1008
code, often this error is caused because the data you intend to send to Deepgram is not being sent. In some cases, if there is a period of time before your system begins to send audio, you may need to send silent audio to Deepgram to keep the connection open.
Other reasons for this error include potential network issues. To troubleshoot, test your network by making a cURL request to Deepgram using a Deepgram-hosted audio file. To learn how to do this, you can follow along with our guide on generating transcripts from the terminal. If you’re unable to get a transcript using this method, something in your network may be preventing you from connecting to Deepgram.
Another way to check that audio is successfully leaving your network is to capture a sample of your network traffic using a packet sniffer and network analysis tool like Wireshark.
Providing Feedback
If you would like to provide general feedback about our products, please start a new GitHub Discussion.
Some related guides that may be of interest include:
- Determining Your Audio Format for Live Streaming Audio
- Understanding Endpointing and Interim Results When Transcribing Live Streaming Audio
- Recovering from Connection Errors and Timeouts When Live Streaming Audio
- Measuring Latency
instead of relying on Blob/CreateObjectURL, try to rely on binary transfer by arrayBuffer as done in https://github.com/Ivan-Feofanov/ws-audio-api.
You’ll need also an encoder and a _resampler.
Relevant code to look at
https://github.com/Ivan-Feofanov/ws-audio-api/blob/master/src/ws-audio-api.js
Streamer: function(config, socket) {
navigator.getUserMedia = (navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia);
this.config = {};
this.config.codec = this.config.codec || defaultConfig.codec;
this.config.server = this.config.server || defaultConfig.server;
this.sampler = new Resampler(44100, this.config.codec.sampleRate, 1, this.config.codec.bufferSize);
this.parentSocket = socket;
this.encoder = new OpusEncoder(this.config.codec.sampleRate, this.config.codec.channels, this.config.codec.app, this.config.codec.frameDuration);
var _this = this;
this._makeStream = function(onError) {
navigator.getUserMedia({ audio: true }, function(stream) {
_this.stream = stream;
_this.audioInput = audioContext.createMediaStreamSource(stream);
_this.gainNode = audioContext.createGain();
_this.recorder = audioContext.createScriptProcessor(_this.config.codec.bufferSize, 1, 1);
_this.recorder.onaudioprocess = function(e) {
var resampled = _this.sampler.resampler(e.inputBuffer.getChannelData(0));
var packets = _this.encoder.encode_float(resampled);
for (var i = 0; i < packets.length; i++) {
if (_this.socket.readyState == 1) _this.socket.send(packets[i]);
}
};
_this.audioInput.connect(_this.gainNode);
_this.gainNode.connect(_this.recorder);
_this.recorder.connect(audioContext.destination);
}, onError || _this.onError);
}
}
Streaming start
WSAudioAPI.Streamer.prototype.start = function(onError) {
var _this = this;
if (!this.parentSocket) {
this.socket = new WebSocket('wss://' + this.config.server.host + ':' + this.config.server.port);
} else {
this.socket = this.parentSocket;
}
this.socket.binaryType = 'arraybuffer';
if (this.socket.readyState == WebSocket.OPEN) {
this._makeStream(onError);
} else if (this.socket.readyState == WebSocket.CONNECTING) {
var _onopen = this.socket.onopen;
this.socket.onopen = function() {
if (_onopen) {
_onopen();
}
_this._makeStream(onError);
}
} else {
console.error('Socket is in CLOSED state');
}
var _onclose = this.socket.onclose;
this.socket.onclose = function() {
if (_onclose) {
_onclose();
}
if (_this.audioInput) {
_this.audioInput.disconnect();
_this.audioInput = null;
}
if (_this.gainNode) {
_this.gainNode.disconnect();
_this.gainNode = null;
}
if (_this.recorder) {
_this.recorder.disconnect();
_this.recorder = null;
}
_this.stream.getTracks()[0].stop();
console.log('Disconnected from server');
};
};
Player
WSAudioAPI.Player.prototype.start = function() {
var _this = this;
this.audioQueue = {
buffer: new Float32Array(0),
write: function(newAudio) {
var currentQLength = this.buffer.length;
newAudio = _this.sampler.resampler(newAudio);
var newBuffer = new Float32Array(currentQLength + newAudio.length);
newBuffer.set(this.buffer, 0);
newBuffer.set(newAudio, currentQLength);
this.buffer = newBuffer;
},
read: function(nSamples) {
var samplesToPlay = this.buffer.subarray(0, nSamples);
this.buffer = this.buffer.subarray(nSamples, this.buffer.length);
return samplesToPlay;
},
length: function() {
return this.buffer.length;
}
};
this.scriptNode = audioContext.createScriptProcessor(this.config.codec.bufferSize, 1, 1);
this.scriptNode.onaudioprocess = function(e) {
if (_this.audioQueue.length()) {
e.outputBuffer.getChannelData(0).set(_this.audioQueue.read(_this.config.codec.bufferSize));
} else {
e.outputBuffer.getChannelData(0).set(_this.silence);
}
};
this.gainNode = audioContext.createGain();
this.scriptNode.connect(this.gainNode);
this.gainNode.connect(audioContext.destination);
if (!this.parentSocket) {
this.socket = new WebSocket('wss://' + this.config.server.host + ':' + this.config.server.port);
} else {
this.socket = this.parentSocket;
}
//this.socket.onopen = function () {
// console.log('Connected to server ' + _this.config.server.host + ' as listener');
//};
var _onmessage = this.parentOnmessage = this.socket.onmessage;
this.socket.onmessage = function(message) {
if (_onmessage) {
_onmessage(message);
}
if (message.data instanceof Blob) {
var reader = new FileReader();
reader.onload = function() {
_this.audioQueue.write(_this.decoder.decode_float(reader.result));
};
reader.readAsArrayBuffer(message.data);
}
};
//this.socket.onclose = function () {
// console.log('Connection to server closed');
//};
//this.socket.onerror = function (err) {
// console.log('Getting audio data error:', err);
//};
};
Помогите пожалуйста!
Имею ошибку :
WebSocket connection to ‘ws://pixelknight.ru:2000/’ failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
var wsUri = "ws://pixelknight.ru:2000/"; var websocket = new WebSocket(wsUri);
В виде ссылки пробовал localhost, и прокладывал пути до серверного скрипта и IP писал, вообщем что я туда только не писал…
Код серверного скрипта на Ratchet PHP
require __DIR__ .'/../vendor/autoload.php'; use RatchetServerIoServer; use RatchetHttpHttpServer; use RatchetWebSocketWsServer; $server = IoServer::factory(new HttpServer(new WsServer(new Chat)), 2000); $server->run();
В консоли скрипт ошибок не вызывает!
Попробовал на всякий случай через socket_connect(); в итоге подключился успешно!
Так же на всякий случай проверил WebSocket и подключился к ws://echo.websocket.org/ успешно…
Пробовал в iptables VDS сервера добавить -A INPUT -p tcp -m tcp —dport 2000 -j ACCEPT
Не помогло.
Подскажите , что ещё можно попробовать и в чем причина.
Похожие вопросы
Ошибка: DeprecationWarning: use options instead of chrome_options
Здравствуйте! У меня не хочет работать скрипт,
выдает ошибку: DeprecationWarning: use options instead of chrome_options
В коде появились строчки:
options = webdriver.ChromeOptions()
options.add_argument(‘headless’)
options.add_argument(f’window-size={1920},{1080}’)
options.add_argument(‘hide-scrollbars’)…
Не могу обновиться с версии Joomla 3.9.27 на 3.10.11 и сменить версию PHP 7.4 на 8.0
1 вопрос:
Скачал файлы через VPN, пробую через консоль. Выдаёт при загрузке ошибку «500». Никак не могу обновить сайт. Пакеты есть, а сайт не хочет их принять.
2-й вопрос:
Сайт просит сменить версию PHP c 7.4 на 8.0 и выше. Но…
Съезжает картинка, прошу помощи.
Здравствуйте, проблема с сайтом. После редактирования документа PHP, появилась проблема с корректным отображением карты ТЦ. Проблемный 1й этаж. Но после перехода между разными этажами всё становится номально.
<div><img class=»image»…
Я использую getUserMedia()
для записи аудио сообщений. Я хочу записать аудио, а затем передать его с помощью веб-сокета другому пиру. Как я могу это сделать? Я искал на SO, и я нашел только несколько интересных вопросов, но ничего, что не может привести меня к рабочему решению. Я использую Pusher API для веб-сокета моего приложения. Вот код, который я тестирую.
$(document).on("click", ".audio-chat",function(){
console.log('clicked');
var channel = $('input[name="channelName"]').val();
navigator.mediaDevices.getUserMedia({
audio: true
})
.then(function(stream){
var mediaRecorder = new MediaRecorder(stream);
mediaRecorder.start();
console.log(mediaRecorder.state);
console.log("recorder started");
mediaRecorder.ondataavailable = function(e) {
chunks.push(e.data);
console.log(chunks);
}
setTimeout(function(){
mediaRecorder.stop();
console.log(mediaRecorder.state);
console.log("recorder stopped");
var blob = new Blob(chunks, {'type':'audio/webm; codecs=opus'});
//console.log(blob);
chunks = [];
const audioUrl = window.URL.createObjectURL(blob);
var data = {channel:channel,message:audioUrl,socketId:socketId}
$.post('api/message.php', data);
}, 10000);
});
});
2 ответа
Лучший ответ
Вместо того чтобы полагаться на Blob / CreateObjectURL, попробуйте использовать двоичную передачу с помощью arrayBuffer, как это сделано в https : //github.com/Ivan-Feofanov/ws-audio-api.
Вам также понадобится кодировщик и _resampler.
Соответствующий код для просмотра
https: / /github.com/Ivan-Feofanov/ws-audio-api/blob/master/src/ws-audio-api.js
Streamer: function(config, socket) {
navigator.getUserMedia = (navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia);
this.config = {};
this.config.codec = this.config.codec || defaultConfig.codec;
this.config.server = this.config.server || defaultConfig.server;
this.sampler = new Resampler(44100, this.config.codec.sampleRate, 1, this.config.codec.bufferSize);
this.parentSocket = socket;
this.encoder = new OpusEncoder(this.config.codec.sampleRate, this.config.codec.channels, this.config.codec.app, this.config.codec.frameDuration);
var _this = this;
this._makeStream = function(onError) {
navigator.getUserMedia({ audio: true }, function(stream) {
_this.stream = stream;
_this.audioInput = audioContext.createMediaStreamSource(stream);
_this.gainNode = audioContext.createGain();
_this.recorder = audioContext.createScriptProcessor(_this.config.codec.bufferSize, 1, 1);
_this.recorder.onaudioprocess = function(e) {
var resampled = _this.sampler.resampler(e.inputBuffer.getChannelData(0));
var packets = _this.encoder.encode_float(resampled);
for (var i = 0; i < packets.length; i++) {
if (_this.socket.readyState == 1) _this.socket.send(packets[i]);
}
};
_this.audioInput.connect(_this.gainNode);
_this.gainNode.connect(_this.recorder);
_this.recorder.connect(audioContext.destination);
}, onError || _this.onError);
}
}
Начало трансляции
WSAudioAPI.Streamer.prototype.start = function(onError) {
var _this = this;
if (!this.parentSocket) {
this.socket = new WebSocket('wss://' + this.config.server.host + ':' + this.config.server.port);
} else {
this.socket = this.parentSocket;
}
this.socket.binaryType = 'arraybuffer';
if (this.socket.readyState == WebSocket.OPEN) {
this._makeStream(onError);
} else if (this.socket.readyState == WebSocket.CONNECTING) {
var _onopen = this.socket.onopen;
this.socket.onopen = function() {
if (_onopen) {
_onopen();
}
_this._makeStream(onError);
}
} else {
console.error('Socket is in CLOSED state');
}
var _onclose = this.socket.onclose;
this.socket.onclose = function() {
if (_onclose) {
_onclose();
}
if (_this.audioInput) {
_this.audioInput.disconnect();
_this.audioInput = null;
}
if (_this.gainNode) {
_this.gainNode.disconnect();
_this.gainNode = null;
}
if (_this.recorder) {
_this.recorder.disconnect();
_this.recorder = null;
}
_this.stream.getTracks()[0].stop();
console.log('Disconnected from server');
};
};
< Сильный > Игрок
WSAudioAPI.Player.prototype.start = function() {
var _this = this;
this.audioQueue = {
buffer: new Float32Array(0),
write: function(newAudio) {
var currentQLength = this.buffer.length;
newAudio = _this.sampler.resampler(newAudio);
var newBuffer = new Float32Array(currentQLength + newAudio.length);
newBuffer.set(this.buffer, 0);
newBuffer.set(newAudio, currentQLength);
this.buffer = newBuffer;
},
read: function(nSamples) {
var samplesToPlay = this.buffer.subarray(0, nSamples);
this.buffer = this.buffer.subarray(nSamples, this.buffer.length);
return samplesToPlay;
},
length: function() {
return this.buffer.length;
}
};
this.scriptNode = audioContext.createScriptProcessor(this.config.codec.bufferSize, 1, 1);
this.scriptNode.onaudioprocess = function(e) {
if (_this.audioQueue.length()) {
e.outputBuffer.getChannelData(0).set(_this.audioQueue.read(_this.config.codec.bufferSize));
} else {
e.outputBuffer.getChannelData(0).set(_this.silence);
}
};
this.gainNode = audioContext.createGain();
this.scriptNode.connect(this.gainNode);
this.gainNode.connect(audioContext.destination);
if (!this.parentSocket) {
this.socket = new WebSocket('wss://' + this.config.server.host + ':' + this.config.server.port);
} else {
this.socket = this.parentSocket;
}
//this.socket.onopen = function () {
// console.log('Connected to server ' + _this.config.server.host + ' as listener');
//};
var _onmessage = this.parentOnmessage = this.socket.onmessage;
this.socket.onmessage = function(message) {
if (_onmessage) {
_onmessage(message);
}
if (message.data instanceof Blob) {
var reader = new FileReader();
reader.onload = function() {
_this.audioQueue.write(_this.decoder.decode_float(reader.result));
};
reader.readAsArrayBuffer(message.data);
}
};
//this.socket.onclose = function () {
// console.log('Connection to server closed');
//};
//this.socket.onerror = function (err) {
// console.log('Getting audio data error:', err);
//};
};
2
Mosè Raguzzini
6 Сен 2019 в 10:14
Двоичные данные намного более эффективны, чем JSON, я не рекомендую выбирать этот путь
1
Mosè Raguzzini
6 Сен 2019 в 11:25