Greenlight: Invalid Role - Role does not exist

Created on 4 Jun 2020  路  14Comments  路  Source: bigbluebutton/greenlight

When executing:

docker exec greenlight-v2 bundle exec rake user:create["name","email","password","admin"]

I get response:

Invalid Role - Role does not exist

What changed on the database/greenlight that this basic query becomes non-functional?
Also, if this has changed, the documentation should be updated.

bug

All 14 comments

Might be related to this pull request?

1737

try:
docker exec greenlight-v2 bundle exec rake admin:create["name","email","password","admin"]

Already tried that, same result...

u gotta use a email in email. i Just had the exact same issue, worked with that.

Please stop resonding the same over and over.
I do BBB quite some time now (~6 years), so when i create a ticket than not because i am bored.

im sorry your highness, i was correcting my own reply as someone in a similar situation might benefit from it as it did with me when creating admins as opposed to users. previously and in the docs, there isnt any mentions of the params now required.
i recreated the problem and fixed it by clearing the db cache and providing that troublesome line:
docker exec greenlight-v2 bundle exec rake admin:create["name","[email protected]","password","admin"]

check out rake tasks for the correct syntax of your faulty command. rake:db:schema:cache:clear might help along with perhaps wiping the db prod folder+ensuring your secret is correct. but you probably already knew that. have a nice day, good luck with your issue and remember that the only ones which time is wasted is the ones trying to help. hopefully someone can help you.

@haviduck ... erm... sorry, but you might imagine how helpfull a repeating answer is ;-)

We pulled the newest docker image, same.
We tried a bbb-install.sh -> same docker image, same issues.
Greenlight logfile says: nothing

So, i'll have a look in the db scheme and already existing roles...

hehe yeah i getcha. but my last issue was that i didnt provide an actual email adress, therefore the dupe!
is the docker image custom or from their hub?
before doing the install did u wipe ~/greenlight if previously installed? install.sh doesnt wipe the db folder afaik.

if my answers are bugging ya i will stop, but as said, i just went through this. for all i know its the same symptoms on different causes, but worth a go, headaches like this is annoying when bigger things are at hand! :)
Heres the checklist i followed:
1) wiped db/prod
2) ensured that docker didnt save the dependent images (lazied it out with portainer)
3) reverted the .ymls POSTGRES_DB to postgres instead of the postgres_prod and mirrored .env
4) went into psql and ensured no admin with the email in question was present.
5) ran the clearcache
5) booted
6) did the basic add.

what does your db_1 logs say btw?

Lets try to be nice to each other :).

I can't reproduce this locally, which is weird.

Is this the exact command you are running?
docker exec greenlight-v2 bundle exec rake user:create["name","email","password","admin"]

Whats the output of the following commands?

docker exec -it greenlight-v2 bash
bundle exec rails c
Role.all.pluck(:name, :provider)

@lonesomewalker is the problem fixed? I am facing same issue.
@farhatahmad the commands give empty output
/greenlight# docker exec -it greenlight-v2 bash bundle exec rails c Role.all.pluck(:name, :provider)bash-4.4# bundle exec rails c Loading production environment (Rails 5.2.4.3) irb(main):001:0> Role.all.pluck(:name, :provider) => []

Oh. Are these all new deployments?

yes I installed BBB today.

Found the issue causing this. Fix will be in the next version. In the mean time, you can run the following command to fix this:

docker exec -it greenlight-v2 bash
bundle exec rails c
Role.create_default_roles("greenlight")

After running that, you should be able to run the rake task

Thanks. it is fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bijism picture bijism  路  4Comments

Sea444 picture Sea444  路  4Comments

saihaj picture saihaj  路  3Comments

mrkeksi picture mrkeksi  路  5Comments

cstojeng picture cstojeng  路  3Comments