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

Greenlight installation error #5464

Closed apckish closed 1 year ago

apckish commented 1 year ago

Hi, I tried many times on many different servers. While installing greenlight I get the error rake abort and greenlight is not installed

This is an urgent issue

apckish commented 1 year ago

This is the error I receive while installing bbb with -g option. The script has always worked for me and this is the first time I can not complete installation with the script

Applying updates in /etc/bigbluebutton/bbb-conf/apply-config.sh:

Reloading NginX configuration Starting BigBlueButton Warning: apt-key output should not be parsed (stdout is not a terminal) /usr/bin/docker Reading package lists... Done Building dependency tree Reading state information... Done Package 'docker-compose' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. bbb-install: preparing and checking the enviroment to install/update greelight-v3... bbb-install: pulling latest bigbluebutton/greenlight:v3 image... v3: Pulling from bigbluebutton/greenlight Digest: sha256:2956a2720223c7c277dcaa4a04ccae8a18a148b1ffe88cda465088d79254c877 Status: Image is up to date for bigbluebutton/greenlight:v3 docker.io/bigbluebutton/greenlight:v3 bbb-install: greenlight-v3 docker compose file was created bbb-install: checking the configuration of greenlight-v3... rake aborted! Don't know how to build task 'secret' (See the list of available tasks with rake --tasks) /usr/src/app/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in <top (required)>' /usr/local/bin/bundle:25:inload' /usr/local/bin/bundle:25:in `

' (See full trace by running task with --trace) bbb-install: failed to generate greenlight-v3 secret key base - is docker running?

MakeTooRRSS commented 1 year ago

I also get the same problem

Warning: apt-key output should not be parsed (stdout is not a terminal) /usr/bin/docker Reading package lists... Done Building dependency tree Reading state information... Done Package 'docker-compose' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. bbb-install: preparing and checking the environment to install/update greelight-v3... bbb-install: pulling latest bigbluebutton/greenlight:v3 image... v3: Pulling from bigbluebutton/greenlight Digest: sha256:2956a2720223c7c277dcaa4a04ccae8a18a148b1ffe88cda465088d79254c877 Status: Image is up to date for bigbluebutton/greenlight:v3 docker.io/bigbluebutton/greenlight:v3 bbb-install: checking the configuration of greenlight-v3... rake aborted! Don't know how to build task 'secret' (See the list of available tasks with rake --tasks) /usr/src/app/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in <top (required)>' /usr/local/bin/bundle:25:inload' /usr/local/bin/bundle:25:in `

' (See full trace by running task with --trace) bbb-install: failed to generate greenlight-v3 secret key base - is docker running?

ffdixon commented 1 year ago

I can reproduce this issue locally -- looks like something broke in the latest update to 3.0.8.

I have a GreenLight that I setup 2 months ago, and I can see the secret task

# docker run --rm --entrypoint bundle $GL_IMG_REPO exec rake --tasks |  grep secret
rake add_tenant[provider,secret]                        # Add tenant
rake secret                                             # Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions)

When I try it on 3.0.8, the task is not there

# docker run --rm --entrypoint bundle $GL_IMG_REPO exec rake --tasks |  grep secret
rake add_tenant[provider,secret]                        # Add tenant

Sorry for the disruption -- this looks like an omission that we should be able to narrow down. I took a quick look through the recent commits and it didn't jump out where the issue occurred.

lonesomewalker commented 1 year ago

As a quick fix: modify your bbb-install.sh Search for: local SECRET_KEY_BASE (should be around line 903) The following line should be edited so it looks like:

SECRET_KEY_BASE="8a1e5fadb5051cd49cb4dbc1875a9abea6d395d10b22aebb600df737ea3ca0a05278d63d8e3465d3b9540168d480e9c1fff8a3018e2799ce8f7580b3346a4cc7"

(feel free to use some other static secret!)

Then the installation should run smooth.

Also looked through the last commits, did not found a direct hit, but currently still investigating.

Okay, found it. Old version: railties 7.0.5.1 New version: railties 7.1.0

New version misses:

desc "Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions)."
task :secret do
  require "securerandom"
  puts SecureRandom.hex(64)
end

(first lines in file...)

So, seems there is a dependency which breaks it: https://github.com/rails/rails/pull/47621

apckish commented 1 year ago

As a quick fix: modify your bbb-install.sh Search for: local SECRET_KEY_BASE (should be around line 903) The following line should be edited so it looks like:

SECRET_KEY_BASE="8a1e5fadb5051cd49cb4dbc1875a9abea6d395d10b22aebb600df737ea3ca0a05278d63d8e3465d3b9540168d480e9c1fff8a3018e2799ce8f7580b3346a4cc7"

(feel free to use some other static secret!)

Then the installation should run smooth.

Also looked through the last commits, did not found a direct hit, but currently still investigating.

Okay, found it. Old version: railties 7.0.5.1 New version: railties 7.1.0

New version misses:

desc "Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions)."
task :secret do
  require "securerandom"
  puts SecureRandom.hex(64)
end

(first lines in file...)

So, seems there is a dependency which breaks it: rails/rails#47621

Hi, Thanks I edited that line, but it didnt work. Can you give me a completely working Repo? 4 of my critical servers are down from yesterday because greenlight is not being installed.

Thanks in advance Hamed

apckish commented 1 year ago

As a quick fix: modify your bbb-install.sh Search for: local SECRET_KEY_BASE (should be around line 903) The following line should be edited so it looks like:

SECRET_KEY_BASE="8a1e5fadb5051cd49cb4dbc1875a9abea6d395d10b22aebb600df737ea3ca0a05278d63d8e3465d3b9540168d480e9c1fff8a3018e2799ce8f7580b3346a4cc7"

(feel free to use some other static secret!)

Then the installation should run smooth.

Also looked through the last commits, did not found a direct hit, but currently still investigating.

Okay, found it. Old version: railties 7.0.5.1 New version: railties 7.1.0

New version misses:

desc "Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions)."
task :secret do
  require "securerandom"
  puts SecureRandom.hex(64)
end

(first lines in file...)

So, seems there is a dependency which breaks it: rails/rails#47621

Thanks so much, I made a working repo, others can use it also. now everything works fine

wget -qO- https://raw.githubusercontent.com/apckish/bbb-install/v2.7.x-release/bbb-install.sh | bash -s -- -w -v focal-270 -s test.domain.com -e example@gmail.com -g

lonesomewalker commented 1 year ago

Erm... you should NOT hardcode this. Especially make this public available. Now ALL people can modify your Greenlight...

Better NOT do something like that when you do not know what these changes do.

ThomasMic commented 1 year ago

Maybe related to https://github.com/bigbluebutton/bbb-install/issues/696 ?

lonesomewalker commented 1 year ago

No, it is a rake task. Edit: seems like it WAS a rake task :-(

tja-X commented 1 year ago

had the same problem with a standalone greenlight install. thx 2 apcksh i could patch this: commented out line 408 in gl-install.sh: # local SECRET_KEY_BASE=$(docker run --rm --entrypoint bundle $GL_IMG_REPO exec rake secret) and added local SECRET_KEY_BASE="$(openssl rand -hex 128)" below. i hope my understanding is correct that this would result in a secure gl installation. if true i guess bbb-install.sh could use a similar modification.

ThomasMic commented 1 year ago

No, it is a rake task. Edit: seems like it WAS a rake task :-(

exact, secret is not in the list when you

docker run --rm --entrypoint bundle bigbluebutton/greenlight:v3 exec rake --tasks

And in greenlight-release-3.0.8\sample.env (https://github.com/bigbluebutton/greenlight/blob/master/sample.env)

you can see this comment :

Verifies the integrity of all secrets created in the application Can be generated by running 'docker run --rm --entrypoint /bin/sh bigbluebutton/greenlight:v3 -c "bundle exec rails secret"

tja-X commented 1 year ago

No, it is a rake task. Edit: seems like it WAS a rake task :-(

exact, secret is not in the list when you

docker run --rm --entrypoint bundle bigbluebutton/greenlight:v3 exec rake --tasks

And in greenlight-release-3.0.8\sample.env (https://github.com/bigbluebutton/greenlight/blob/master/sample.env)

you can see this comment :

Verifies the integrity of all secrets created in the application Can be generated by running 'docker run --rm --entrypoint /bin/sh bigbluebutton/greenlight:v3 -c "bundle exec rails secret"

does rails secret generate a secret only or will the secret be used further downstream (f.e. saved to file/db) ?

farhatahmad commented 1 year ago

Fixed in the bbb-install script aswell https://github.com/bigbluebutton/bbb-install/pull/697

farhatahmad commented 1 year ago

No need for a new release - you should be able to re-run the install script and things should work. Please let me know if it works

JonMalcolm commented 1 year ago

Worked perfectly for me. Thanks so much @farhatahmad

Balranaldpresy commented 1 year ago

I had the same install error as the others last Sunday when I ran the install script, still getting the same error today when I re-run the install script with the -g switch

bbb-install: preparing and checking the enviroment to install/update greelight-v3... bbb-install: pulling latest bigbluebutton/greenlight:v3 image... v3: Pulling from bigbluebutton/greenlight Digest: sha256:2956a2720223c7c277dcaa4a04ccae8a18a148b1ffe88cda465088d79254c877 Status: Image is up to date for bigbluebutton/greenlight:v3 docker.io/bigbluebutton/greenlight:v3 bbb-install: checking the configuration of greenlight-v3... rake aborted! Don't know how to build task 'secret' (See the list of available tasks with rake --tasks) /usr/src/app/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in <top (required)>' /usr/local/bin/bundle:25:inload' /usr/local/bin/bundle:25:in `

' (See full trace by running task with --trace) bbb-install: failed to generate greenlight-v3 secret key base - is docker running?

thanks Dennis