bigbluebutton / bigbluebutton-api-php

Offical @BigBlueButton PHP API
https://github.com/bigbluebutton/bigbluebutton/
GNU Lesser General Public License v3.0
182 stars 198 forks source link

BBB running with HAproxy and Cloudflare SSL #56

Closed emresaracoglu closed 4 years ago

emresaracoglu commented 4 years ago

Hello,

I installed BBB on Proxmox and forwarded the ip address with HAproxy but I see the BBP's Nginx page when I go to the domain

Adsız-1

How can I overcome this?

emresaracoglu commented 4 years ago

I made the change with bbb-conf --setip bbb.domain.com but now I get these errors on console.

Adsız-2

2 Minutes after:

Adsız-4

emresaracoglu commented 4 years ago
22:17:04.301 [22:17:04:0301]  WARN: clientLogger: Call to ping failed because Meteor is not connected https://bbb.domain.com/html5client/23acf17a7f66feccb643e681b6de9fd0361d4c3a.js?meteor_js_resource=true:125:1133138 23acf17a7f66feccb643e681b6de9fd0361d4c3a.js:9:342294
22:17:04.427 [22:17:04:0427]  WARN: clientLogger: Call to ping failed because Meteor is not connected https://bbb.domain.com/html5client/23acf17a7f66feccb643e681b6de9fd0361d4c3a.js?meteor_js_resource=true:125:1133138 23acf17a7f66feccb643e681b6de9fd0361d4c3a.js:9:342294
22:17:04.394 uncaught exception: Call to ping failed because Meteor is not connected
ffdixon commented 4 years ago

See the recent update in https://github.com/bigbluebutton/bigbluebutton-api-php/issues/54.

For the 500 error, when you type sudo bbb-conf --check do you see a checksum mismatch between the API demos and your server?

#
# Warning: API Shared Secret mismatch:
#
#  /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties  = fa9a105567e52e16eca328237bac4043
#  /var/lib/tomcat7/webapps/demo/bbb_api_conf.jsp               = J1rF2PwyL92G8tKiS5F3VvuQ4FO3qKz0iq9fF4nZkVI
#
# You need to edit bbb_api_conf.jsp to have the same shared secret defined in bigbluebutton.properties
#

Follow the steps given in the output to make the shared secrets match, then try connecting again through the API demo.

emresaracoglu commented 4 years ago

Thank you for answer @ffdixon

root@o2o:~# sudo bbb-conf --check

BigBlueButton Server 2.2.0-rc-3 (1651)
                    Kernel version: 4.4.0-142-generic
                      Distribution: Ubuntu 16.04.6 LTS (64-bit)
                            Memory: 8174 MB
                         CPU cores: 2

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

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

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

/opt/freeswitch/etc/freeswitch/vars.xml (FreeSWITCH)
                       local_ip_v4: 192.168.1.113
                   external_rtp_ip: stun:stun.freeswitch.org
                   external_sip_ip: stun:stun.freeswitch.org

/opt/freeswitch/etc/freeswitch/sip_profiles/external.xml (FreeSWITCH)
                        ext-rtp-ip: $${local_ip_v4}
                        ext-sip-ip: $${local_ip_v4}
                        ws-binding: :5066
                       wss-binding: :7443

/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml (record and playback)
                     playback_host: bbb.domain.com
                 playback_protocol: http
                            ffmpeg: 4.2.2-1bbb1~ubuntu16.04

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

/usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml (Kurento SFU)
                        kurento.ip: 192.168.1.113
                       kurento.url: ws://127.0.0.1:8888/kurento
                    localIpAddress: 192.168.1.113
               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: 815
                        kurentoUrl: wss://bbb.domain.com/bbb-webrtc-sfu
                  enableListenOnly: true

# Potential problems described below
# IP does not match:
#                           IP from ifconfig: 192.168.1.113
#   /etc/nginx/sites-available/bigbluebutton: bbb.domain.com
# Warning: API URL IPs do not match host:
#
#                                IP from ifconfig: 192.168.1.113
#  /var/lib/tomcat7/demo/bbb_api_conf.jsp: bbb.domain.com

# Not running:  tomcat7 or grails
................................................................................
# Error: Could not connect to the configured hostname/IP address
#
#    https://bbb.domain.com/
#
# If your BigBlueButton server is behind a firewall, see FAQ.

# Warning: The API demos are installed and accessible from:
#
#    https://bbb.domain.com
#
# and
#
#    https://bbb.domain.com/demo/demo1.jsp
#
# 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:
#
#    apt-get purge bbb-demo

# Error: Unable to reach default URL for presentation:
#
#    https://bbb.domain.com/default.pdf
#
# Check value for beans.presentationService.defaultUploadedPresentation in
#   /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
# Warning: found only 2 cores, whereas this server should have (at least) 4 CPU cores
# to run BigBlueButton in production.
#
#   https://docs.bigbluebutton.org/install/install.html#minimum-server-requirements
#
# Warning: You have this server defined for https, but in
#
#   /etc/bigbluebutton/nginx/sip.nginx
#
#  did not find the use of https in definition for proxy_pass
#
#            proxy_pass http://192.168.1.113:5066;
#

# Warning: You have this server defined for https, but in
#
#   /etc/bigbluebutton/nginx/sip.nginx
#
#  did not find the use of port 7443 in definition for proxy_pass
#
#            proxy_pass http://192.168.1.113:5066;
#
root@o2o:~#

/var/lib/tomcat7/webapps/demo/bbb_api_conf.jsp & /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties files, updated with secret code

Sorry, the result is the same.

ffdixon commented 4 years ago

Hmm ... if your intending to use HAProxy to manage a pool of BigBlueButton servers, there is a level of logic that is missing to manage and track the incoming API calls. For example, a load balancer would need to track meetings on servers and pass through API calls to the same meeting.

Is it an option to first setup this server without any front-end proxy? The error messages indicate parts of this server is configured for HTTPS

# Error: Could not connect to the configured hostname/IP address
#
#    https://bbb.domain.com/

but other parts are not

# Warning: You have this server defined for https, but in
#
#   /etc/bigbluebutton/nginx/sip.nginx
#
#  did not find the use of https in definition for proxy_pass

If you can setup this server with a SSL certificate without HAProxy, see

http://docs.bigbluebutton.org/2.2/install.html#configure-ssl-on-your-bigbluebutton-server

then you start with a working system.

GhaziTriki commented 4 years ago

@emresaracoglu This is a great discussion. If you could create a thread in the forums https://groups.google.com/forum/#!forum/bigbluebutton-install and share your findings with the community it would be great.

varma-nexge commented 4 years ago

can any one tel me, is there any haproxy available for bbb