bigbluebutton / greenlight

A really simple end-user interface for your BigBlueButton server.
GNU Lesser General Public License v3.0
794 stars 3.8k forks source link

Server Error - Invalid BigBlueButton Endpoint and Secret #970

Closed ahmedelfaleh closed 4 years ago

ahmedelfaleh commented 4 years ago

I put the secret key many of times in .env file, and still the error exists. When type the url in https then login it redirect me to non https

Checking environment: Passed Checking Connection: Passed Checking Secret: Failed Could not get a valid response from BigBlueButton server -

FAILED checksumError You did not pass the checksum security check

Kindly help me, I am trying to solve the issue for 5 hours.

ahmedelfaleh commented 4 years ago

This warning appears to me /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated

ahmedelfaleh commented 4 years ago

bundler: failed to load command: rake (/usr/src/app/vendor/bundle/ruby/2.5.0/bin/rake) Bundler::GemNotFound: Could not find bigbluebutton-api-ruby-1.7.0 in any of the sources /usr/local/lib/ruby/site_ruby/2.5.0/bundler/spec_set.rb:91:in block in materialize' /usr/local/lib/ruby/site_ruby/2.5.0/bundler/spec_set.rb:85:inmap!' /usr/local/lib/ruby/site_ruby/2.5.0/bundler/spec_set.rb:85:in materialize' /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:170:inspecs' /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:237:in specs_for' /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:226:inrequested_specs' /usr/local/lib/ruby/site_ruby/2.5.0/bundler/runtime.rb:108:in block in definition_method' /usr/local/lib/ruby/site_ruby/2.5.0/bundler/runtime.rb:20:insetup' /usr/local/lib/ruby/site_ruby/2.5.0/bundler.rb:107:in setup' /usr/local/lib/ruby/site_ruby/2.5.0/bundler/setup.rb:20:in<top (required)>' /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in require' /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:inrequire'

farhatahmad commented 4 years ago

Hi @ahmedelfaleh,

I'm not sure where you are getting the bundler error from but that is not the source of your problem.

checksumError You did not pass the checksum security check

This means that the secret you specified in Greenlight does not match the BigBlueButton server secret. Can you confirm that in your .env file, you set BIGBLUEBUTTON_SECRET to the secret from your BigBlueButton server that appears when you do bbb-conf --secret?

ahmedelfaleh commented 4 years ago

Alright, before the error of "bundler" i made sure that BIGBLUEBUTTON_SECRET was matching with bbb-conf --secret

But the problem now is, I remove all of bbb- by `apt-get purge bbb-` Then I have searched for all directories and files related to bigbluebutton, then i reinstalled it again with ssl and greenlight docker, then the error of bundler appeared and I am not able to open live.portolearn.com that I bind it to bigbluebutton.

The bundler problem has been resolved, and I now receive 404 not found nginx

2020/03/03 19:16:02 [error] 257329#257329: *6 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 188.166.153.121, server: live.portolearn.com, request: "GET /b HTTP/1.1", upstream: "http://127.0.0.1:5000/b", host: "live.portolearn.com" 2020/03/03 19:16:02 [error] 257329#257329: *6 open() "/var/www/nginx-default/50x.html" failed (2: No such file or directory), client: 188.166.153.121, server: live.portolearn.com, request: "GET /b HTTP/1.1", upstream: "http://127.0.0.1:5000/b", host: "live.portolearn.com"

ahmedelfaleh commented 4 years ago

I refreshed the page and I found that it works, and I registered again but it gives me Server Error Invalid BigBlueButton Endpoint and Secret

Is this what you mean?

farhatahmad commented 4 years ago

Yes that error specifically happens for 2 cases. 1 - Your BIGBLUEBUTTON_ENDPOINT or BIGBLUEBUTTON_SECRET are incorrectly set in your Greenlight .env file. 2 - Your .env variables are set correctly, but Greenlight does not have access to your BigBlueButton server.

If you've confirmed that the .env variables are set correctly, you need to ssh into the Greenlight docker container and see if you can access the BigBlueButton Server

docker exec -it greenlight-v2 bash
curl BIGBLUEBUTTON_ENDPOINT
ahmedelfaleh commented 4 years ago

I checked all what you tell me about, but still the problem exists. curl -IvL https://live.portolearn.com/bigbluebutton/

 HTTP/1.1 200 
HTTP/1.1 200 

I ran this command docker run --rm bigbluebutton/greenlight:v2 bundle exec rake secret Then I put the output secret key base as variable for SECRET_KEY_BASE inside .env file.

And I found the it was like that SECRET_KEY_BASE=SECRET_KEY_BASE=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx I converted it to: SECRET_KEY_BASE=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx and also doesn't work. I reverted it back again to SECRET_KEY_BASE=SECRET_KEY_BASE

Please any advise?

farhatahmad commented 4 years ago

SECRET_KEY_BASE=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

This is correct. Your SECRET_KEY_BASE should be set to the output of docker run --rm bigbluebutton/greenlight:v2 bundle exec rake secret

curl -IvL https://live.portolearn.com/bigbluebutton/

Where did you run this command from? Did you execute this command first before the curl? docker exec -it greenlight-v2 bash

ahmedelfaleh commented 4 years ago

bbb-conf --check

BigBlueButton Server 2.2.0-rc-6 (1711)
                    Kernel version: 4.4.0-142-generic
                      Distribution: Ubuntu 16.04.6 LTS (64-bit)
                            Memory: 131425 MB
                         CPU cores: 64

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

/etc/nginx/sites-available/bigbluebutton (nginx)
                       server name: live.portolearn.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://live.portolearn.com
                              red5: live.portolearn.com
              useWebrtcIfAvailable: true

/opt/freeswitch/etc/freeswitch/vars.xml (FreeSWITCH)
                       local_ip_v4: 159.69.162.48
                   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: 159.69.162.48:7443

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

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

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

# Potential problems described below
# IP does not match:
#                           IP from ifconfig: 172.24.0.1
#   /etc/nginx/sites-available/bigbluebutton: live.portolearn.com

# Warning: The setting of 159.69.162.48 for bbb.sip.app.ip in
#
#    /usr/share/red5/webapps/sip/WEB-INF/bigbluebutton-sip.properties
#
# does not match the local IP address (172.24.0.1).
# (This is OK if you've manually changed the values to an external 
# FreeSWITCH server.)

# Warning: The setting of 159.69.162.48 for proxy_pass in
#
#    /etc/bigbluebutton/nginx/sip.nginx
#
# does not match the local IP address (172.24.0.1).
# (This is OK if you've manually changed the values)

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

Please any advice, will that help?

farhatahmad commented 4 years ago

Can you try running the bbb-install script?

Make sure to change bbb.example.com to your domain and and info@example.com to your email

The command you'll need is: wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-220 -s bbb.example.com -e info@example.com -g

ahmedelfaleh commented 4 years ago

First, thank you for you replies and for helping me.

I ran this command before typically the same command, and the issue still exist, only the errors that appeared under # Potential problems described below disappeared.

Unfortunately our courses and sessions are delayed and suspended because of this issue.

The main issue was that our recorded sessions don't appear on web page, now we cannot record at all.

Do you have any other idea, I am try to fix it but all of my tries go nothing.

farhatahmad commented 4 years ago

I ran this command before typically the same command, and the issue still exist

Just to confirm, did you run the bbb-install.sh script again?

If you did, what is the output of docker run --rm --env-file .env bigbluebutton/greenlight:v2 bundle exec rake conf:check

If not, make sure you run the bbb-install.sh script again

ahmedelfaleh commented 4 years ago

Yes I ran it many times before you told me, and one time after you told, and the potential problems has been resolved.

But the issue still exist and the out is like that:

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

`Checking environment: Passed Checking Connection: Passed Checking Secret: Failed Could not get a valid response from BigBlueButton server -

FAILED checksumError You did not pass the checksum security check

`

GremL1N commented 4 years ago

Test your Bigbluebutton setup on https://mconf.github.io/api-mate/ site. If all OK - problem on Grenlight side. If NOT - on BBB side.

On Gleenlight start debug from compare env vars.

docker exec -it greenlight-v2 /bin/bash
# env | grep BIGBLUEBUTTON

If problem on BBB side... Maybe something in bigbluebutton.properties file. For example:

# If the API is enabled.
serviceEnabled = false

Or need to resolve this

# Potential problems described below
# IP does not match:
#                           IP from ifconfig: 172.24.0.1
#   /etc/nginx/sites-available/bigbluebutton: live.portolearn.com

because your ip is 159.69.162.48. Looks like you move VM or change external IP and didn't rewrite configs.

ffdixon commented 4 years ago

See also #981

farhatahmad commented 4 years ago

@ahmedelfaleh

FAILED checksumError You did not pass the checksum security check

This error means that your BIGBLUEBUTTON_SECRET in your .env file is incorrect. That's the only way this error would appear.

At this point, there's not much else that can be done without directly seeing the values you have set.

ahmedelfaleh commented 4 years ago

Dears,

I followed the steps of making sure that the secret key is same one in .env file, but it doesn't work.

Is there any way to createa new one and assign inside .env?

farhatahmad commented 4 years ago

You can set a new secret on your BigBlueButton Server by running sudo bbb-conf --setsecret <new_secret>

Then go to your .env file in ~/greenlight/.env and set BIGBLUEBUTTON_SECRET=<new_secret>.

Then restart Greenlight with a docker-compose down, then docker-compose up -d and you should be good to go

ahmedelfaleh commented 4 years ago

Dears, My client uses bigbluebutton for many years, and he is really satisfied with it, he complained these days because it doesn't work, he is not able to record his sessions and that causes disadvantage to him, and you considered this issue is closed, although the issue still exists.

The problem is existing although I followed the documentation step by step, and I followed your instructions one by one, I wouldn't say that I feel disappointed, but currently I don't what to do.

I know the issue is simple, but it causes a big business loss at the end.

Kindly would you revert back to open issue and continue resolving it together, please?

ahmedelfaleh commented 4 years ago

I set the secret, then restarted bbb and greenlight.

farhatahmad commented 4 years ago

For issues with recordings, please open an issue in the BigBlueButton repository. This repository is for tracking issues related to Greenlight (Front end).

It is very clear to me that the issue here is a configuration issue and not an issue with the application itself (which is why I closed the issue).

If the issue is still persisting, can you directly email me the output of the following commands? My email is ahmad.farhat@blindsidenetworks.com

bbb-conf --secret cat ~/greenlight/.env

ahmedelfaleh commented 4 years ago

I do appreciate your adherence, I have sent you a private message.

fillorkill commented 4 years ago

same here. I triple-checked the secret and endpoints and they match the output from bbb-conf --secret. API-Mate works with the very same secret so BBB is working as expected. Problem is on the greenlight side.

yvikt commented 4 years ago

I have two instances - production (running on dedicated server) and development (running on my home server behind home router). Public server hasn't any trouble, everything works fine. But whith my home instanse i stucked whith same problem :-) After several experiments I found out that the problem is in my local network. I don't actually understand what exactly it is, I'll try to sort it out). My domain for example mydomain.com My home router's publick ip for example 123.123.123.123 My local server ip 192.168.0.111 Ok, here some outputs

root@b2:~/greenlight# docker run --rm --env-file .env bigbluebutton/greenlight:v2 ping www.google.com PING www.google.com (123.123.123.123): 56 data bytes 64 bytes from 172.217.169.196: seq=0 ttl=51 time=70.329 ms 64 bytes from 172.217.169.196: seq=1 ttl=51 time=69.888 ms

root@b2:~/greenlight# docker run --rm --env-file .env bigbluebutton/greenlight:v2 ping mydomain.com PING mydomain.com (123.123.123.123): 56 data bytes 64 bytes from 123.123.123.123: seq=0 ttl=63 time=0.280 ms 64 bytes from 123.123.123.123: seq=1 ttl=63 time=0.268 ms

root@b2:~/greenlight# ping mydomain.com PING mydomain.com (192.168.0.111) 56(84) bytes of data. 64 bytes from mydomain.com (192.168.0.111): icmp_seq=1 ttl=64 time=0.063 ms 64 bytes from mydomain.com (192.168.0.111): icmp_seq=2 ttl=64 time=0.048 ms

as you can see pings are different. May be i need to put some iptables route to forward packets from greenlight container directly to server's localhost address - not through my router?

By the way i have skipped this rake conf:check command, and everything works fine - I am able to open greenlight page from local network and from internet too.

joseluisq commented 4 years ago

In our case, Greenlight was giving us Invalid BigBlueButton Endpoint and Secret suddenly due to one additional certificate chained that expired a couple of days ago. So we had to re-issue it and problem solved by itself.

Thatoo commented 3 years ago

Thank you for this thread, it helped me to check what you said but the issue was not in secret stuff but very much easier to solve :

I found the solution to my issues. For some reason, in /etc/hosts, I had the Ipv6 only written. 127.0.0.1 localhost 2001:41d0:303:5ba0:1:: visio.sauvegarde56.org visio

only so I needed to add the following line and it solved all my problems: 135.125.24.38 visio.sauvegarde56.org visio

Even though I installed using the bbb-install.sh script the solution was given in here https://docs.bigbluebutton.org/2.2/configure-firewall#testing-the-firewall

When BigBlueButton is running on a server, various component of BigBlueButton need to make connections to itself using the external hostname. Programs running within the BigBlueButton server that try to connect to the external hostname should reach BigBlueButton itself.

To enable the BigBlueButton server to connect to itself using the external hostname, edit file /etc/hosts and add the line EXTERNAL_IP_ADDRESS EXTERNAL_HOST_NAME

where EXTERNAL_IP_ADDRESS with the external IP of your firewall and EXTERNAL_HOST_NAME with the external hostname of your firewall. For example, using the configuration in the above diagram, the addition to /etc/hosts would be 172.34.56.78 bigbluebutton.example.com

At this point, proceed with the installation of BigBlueButton and, after the install is finished, configure BigBlueButton to use your firewall using the steps in the next section.

Best regards,

arunodhayam1998 commented 3 years ago

I have setup the BigBlueButton Using docker-compose by using this document. https://github.com/bigbluebutton/docker/tree/develop Here I am facing the server error which means invalid endpoint and an invalid secret, Here My questions

  1. Where am I get the endpoint and secret inside the docker?
  2. In this docker-compose default produced the endpoint and the secret. Then why it shows an invalid endpoint and the secret `

    auto generated by ./scripts/generate

    don't edit this directly.

version: '3.6'

html5 templates

x-html5-backend: &html5backend build: mod/html5 image: bbb-html5 restart: unless-stopped depends_on:

x-html5-frontend: &html5frontend <<: *html5backend volumes:

services: bbb-web: build: mod/bbb-web restart: unless-stopped depends_on:

volumes: bigbluebutton: vol-freeswitch: vol-kurento: html5-static:

ssl_data:

networks: bbb-net: ipam: driver: default config:

mahyard commented 3 years ago

I fixed my problem by upgrading the greanlight:

cd ~/greenlight
docker pull bigbluebutton/greenlight:v2
docker-compose down
docker-compose up -d
umer60 commented 2 years ago

I have face this error Checking Connection: Failed Could not get a valid response from BigBlueButton server - <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

umer60 commented 2 years ago

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

Checking environment: Passed Checking Connection: Failed

any help on this

lonesomewalker commented 2 years ago

open ssh to the server and run: cd /var/bigbluebutton/published/presentation && ls | wc -l

What does the output say?

pabloapico commented 2 years ago

I would recommend to include in the documentation that one should verify /etc/hosts before starting: to include localhost pointing to 127.0.0.1 and the fqdn (hostname) to the public ip address. Preferably this should be done before running the installation. Running docker exec -it greenlight-v2 /bin/bash # ping yourbigbluebuttonendpoint.com should show your public ip address instead of 127.0.0.1 I ran into this issue and the GreenLight showed the "Wrong Secret" error which is misleading to address the issue.