Role migration failed from Greenlight v2 to v3

429 views
Skip to first unread message

Mohammad Reza Zamani

unread,
Feb 10, 2023, 10:22:10 AM2/10/23
to bigbluebutton-greenlight
Hi.
I installed Greenlight v3 with BBB v2.6.0-rc.3 and everything is OK but my data such as users and rooms not available in v3, and it's clean!

I've checked this document:

But in first migration step, I have error in roles migration:

root@bbb4:~# sudo docker exec -it greenlight-v2 bundle exec rake migrations:roles
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/net-protocol-0.1.3/lib/net/protocol.rb:68: warning: already initialized constant Net::ProtocRetryError
/usr/local/lib/ruby/2.7.0/net/protocol.rb:66: warning: previous definition of ProtocRetryError was here
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/net-protocol-0.1.3/lib/net/protocol.rb:208: warning: already initialized constant Net::BufferedIO::BUFSIZE
/usr/local/lib/ruby/2.7.0/net/protocol.rb:206: warning: previous definition of BUFSIZE was here
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/net-protocol-0.1.3/lib/net/protocol.rb:504: warning: already initialized constant Net::NetPrivate::Socket
/usr/local/lib/ruby/2.7.0/net/protocol.rb:503: warning: previous definition of Socket was here
warning: parser/current is loading parser/ruby27, which recognizes2.7.6-compliant syntax, but you are running 2.7.7.
Please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
Unable to migrate Role:
ID: 34
Name: استاد
rake aborted!
JSON::ParserError: 859: unexpected token at '<!DOCTYPE html>
<html>
  <head>
    <title>BigBlueButton</title>
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="ttsqtef4aAWRv4efwge-N9F0CfZGE6C5xqkbdhjwtwMDv42VcMAyt37XBibl8Za7noz229gfA4Yd6FXSo-4KHQ" />


    <link rel="stylesheet" href="/assets/application-44c21a53b9eb0e5c241002967a026d1a737ae404bf0b756bb9d6005c8643713a.css" data-turbo-track="reload" />
    <script src="/assets/main-a6eb90a400d014a0c70a63b5f39dad362c45aba57efc4f9f3334cc266b45042b.js" data-turbo-track="reload" defer="defer"></script>
  </head>

  <body>
    <div id="root"></div>
  </body>
</html>
'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/json-2.6.2/lib/json/common.rb:216:in `parse'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/json-2.6.2/lib/json/common.rb:216:in `parse'
/usr/src/app/lib/tasks/migrations/migrations.rake:50:in `block (3 levels) in <main>'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.8.1/lib/active_record/relation/batches.rb:70:in `block (2 levels) in find_each'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.8.1/lib/active_record/relation/batches.rb:70:in `each'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.8.1/lib/active_record/relation/batches.rb:70:in `block in find_each'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.8.1/lib/active_record/relation/batches.rb:136:in `block in find_in_batches'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.8.1/lib/active_record/relation/batches.rb:238:in `block in in_batches'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.8.1/lib/active_record/relation/batches.rb:222:in `loop'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.8.1/lib/active_record/relation/batches.rb:222:in `in_batches'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.8.1/lib/active_record/relation/batches.rb:135:in `find_in_batches'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.8.1/lib/active_record/relation/batches.rb:69:in `find_each'
/usr/src/app/lib/tasks/migrations/migrations.rake:21:in `block (2 levels) in <main>'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => migrations:roles
(See full trace by running task with --trace)

ahmad....@blindsidenetworks.com

unread,
Feb 10, 2023, 11:41:37 AM2/10/23
to bigbluebutton-greenlight
Can you confirm your `V3_ENDPOINT` variable in the v2 .env is correctly pointing at v3? It should be in the form "https://greenlightv3url.com/"

Mohammad Reza Zamani

unread,
Feb 10, 2023, 11:44:02 AM2/10/23
to bigbluebutton-greenlight
Yes, I've added it correctly.

ahmad....@blindsidenetworks.com

unread,
Feb 10, 2023, 12:24:06 PM2/10/23
to bigbluebutton-greenlight
Can you post a screenshot? (blacking out sensitive data) Can you also confirm that you can access v3 and it is running correctly

Mohammad Reza Zamani

unread,
Feb 10, 2023, 12:34:58 PM2/10/23
to bigbluebutton-greenlight
Yes.
Greenlight v2 env: https://i.ibb.co/pnxR6Hs/2.png
and when I disable v2 by "docker-compose down", I can access to v3.

ahmad....@blindsidenetworks.com

unread,
Feb 10, 2023, 1:35:18 PM2/10/23
to bigbluebutton-greenlight
> and when I disable v2 by "docker-compose down", I can access to v3.

"The migration system requires both Greenlight v2 and Greenlight v3 and to be deployed, running and accessible through a network." 

v2 and v3 need to both be accessible at the same time for this to work

Mohammad Reza Zamani

unread,
Feb 10, 2023, 1:46:39 PM2/10/23
to bigbluebutton-greenlight
In the first image, both of them are running...
Message has been deleted

in...@mulu.at

unread,
Feb 11, 2023, 2:35:03 AM2/11/23
to bigbluebutton-greenlight
Hi there,

I also got the same error when migrating users (no roles were migrated because there are no custom roles).

The connection to BBB 3 works, but no user is created. Attached you find the output of the target GL 3 instance for when a user migration request happens.
It look likes the request is not considered valid.
The V3_SECRET_KEY_BASE in v2 matches the SECRET_KEY_BASE in v3.
Screenshot 2023-02-11 081934.png

ahmad....@blindsidenetworks.com

unread,
Feb 13, 2023, 1:40:09 PM2/13/23
to bigbluebutton-greenlight
Hi - thanks for the report. That bug has been fixed in the latest release (https://github.com/bigbluebutton/greenlight/releases/tag/release-2.14.5). Please update v2 and try the migration again

@MR v2 and v3 are both running  - but are they both accessible? Is your v2 running at / or /b?

Mohammad Reza Zamani

unread,
Feb 14, 2023, 1:31:04 AM2/14/23
to bigbluebutton-greenlight
Thanks. I've updated v2 to the latest version but after migration, same error occurred!

root@bbb4:~# docker ps
CONTAINER ID   IMAGE                                 COMMAND                  CREATED             STATUS             PORTS                      NAMES
299275ebfced   bigbluebutton/greenlight:release-v2   "bin/start"              About an hour ago   Up About an hour   127.0.0.1:5000->80/tcp     greenlight-v2
a19f79664b18   postgres:13-alpine                    "docker-entrypoint.s…"   About an hour ago   Up About an hour   127.0.0.1:5432->5432/tcp   greenlight_db_1
bc367bc2dffb   bigbluebutton/greenlight:v3           "bin/start"              3 days ago          Up 3 days          127.0.0.1:5050->3000/tcp   greenlight-v3
36cb1272cd1a   redis:6.2-alpine3.17                  "docker-entrypoint.s…"   3 days ago          Up 3 days          6379/tcp                   redis
a6084a00d550   postgres:14.6-alpine3.17              "docker-entrypoint.s…"   3 days ago          Up 3 days          5432/tcp                   postgres
root@bbb4:~#

ahmad....@blindsidenetworks.com

unread,
Feb 14, 2023, 9:52:59 AM2/14/23
to bigbluebutton-greenlight
My message was in response to in...@mulu.at. Please see the question I asked you above

Mohammad Reza Zamani

unread,
Feb 14, 2023, 12:41:09 PM2/14/23
to bigbluebutton-greenlight
Oh, sorry. But I've already answered you! Both of my containers are running when I want to do migration...

Mohammad Reza Zamani

unread,
Feb 24, 2023, 10:26:43 AM2/24/23
to bigbluebutton-greenlight
Hi BBB Team
Is there any new suggestion? This problem has not been resolved yet!

ahmad....@blindsidenetworks.com

unread,
Feb 24, 2023, 10:34:36 AM2/24/23
to bigbluebutton-greenlight
> @MR v2 and v3 are both running  - but are they both accessible? Is your v2 running at / or /b?

Message has been deleted

Mohammad Reza Zamani

unread,
Feb 27, 2023, 12:41:29 AM2/27/23
to bigbluebutton-greenlight
Yes. Both of them are running and accessible at /dash (instead of /b)

Mohammad Reza Zamani

unread,
Apr 1, 2023, 11:31:08 AM4/1/23
to bigbluebutton-greenlight
I still have this issue. Any suggestion?!!

/greenlight# sudo docker exec -it greenlight-v2 bundle exec rake migrations:roles

/usr/src/app/vendor/bundle/ruby/2.7.0/gems/net-protocol-0.1.3/lib/net/protocol.rb:68: warning: already initialized constant Net::ProtocRetryError
/usr/local/lib/ruby/2.7.0/net/protocol.rb:66: warning: previous definition of ProtocRetryError was here
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/net-protocol-0.1.3/lib/net/protocol.rb:208: warning: already initialized constant Net::BufferedIO::BUFSIZE
/usr/local/lib/ruby/2.7.0/net/protocol.rb:206: warning: previous definition of BUFSIZE was here
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/net-protocol-0.1.3/lib/net/protocol.rb:504: warning: already initialized constant Net::NetPrivate::Socket
/usr/local/lib/ruby/2.7.0/net/protocol.rb:503: warning: previous definition of Socket was here
warning: parser/current is loading parser/ruby27, which recognizes2.7.6-compliant syntax, but you are running 2.7.7.
Please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
Unable to migrate Role:
ID: 34
Name: استاد
rake aborted!
JSON::ParserError: 859: unexpected token at '<!--BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.-->

<!--Copyright (c) 2022 BigBlueButton Inc. and by respective authors (see below).-->

<!--This program is free software; you can redistribute it and/or modify it under the-->
<!--terms of the GNU Lesser General Public License as published by the Free Software-->
<!--Foundation; either version 3.0 of the License, or (at your option) any later-->
<!--version.-->

<!--Greenlight is distributed in the hope that it will be useful, but WITHOUT ANY-->
<!--WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A-->
<!--PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.-->

<!--You should have received a copy of the GNU Lesser General Public License along-->
<!--with Greenlight; if not, see <http://www.gnu.org/licenses/>.-->


<!DOCTYPE html>
<html>
  <head>
    <title>BigBlueButton</title>
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <!-- Open Graph Attributes -->
    <meta property="og:title" content="BigBlueButton" />
    <meta property="og:description" content="" />
    <meta property="og:image" content="https://XXXXXX.XXXXXX/assets/bbb_logo-176f5d8146a2dc0605ec62f28bdaf3c2addce6747143ca19de1f8e85134f020f.png" />


    <meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="gICaW3vLUS78EImNyXzjtBC-_H2ZMqeDyVU1XX4DyKNFjw6Khva3C6X6H4c-p8s8Lg5xL_McVtZedoAzKjvdHQ" />


    <link rel="stylesheet" href="/assets/application-afb0d51436cd4fbc81878f0390461a59c7db44056ff6718403061734dc031b2b.css" />
    <script src="/assets/main-005a23eb8402f04d86b28ddc7a51dcdc3eb937e2022984e1678f6456f94a0eaf.js" defer="defer"></script>
  </head>

  <body>
    <!--BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.-->

<!--Copyright (c) 2022 BigBlueButton Inc. and by respective authors (see below).-->

<!--This program is free software; you can redistribute it and/or modify it under the-->
<!--terms of the GNU Lesser General Public License as published by the Free Software-->
<!--Foundation; either version 3.0 of the License, or (at your option) any later-->
<!--version.-->

<!--Greenlight is distributed in the hope that it will be useful, but WITHOUT ANY-->
<!--WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A-->
<!--PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.-->

<!--You should have received a copy of the GNU Lesser General Public License along-->
<!--with Greenlight; if not, see <http://www.gnu.org/licenses/>.-->
Reply all
Reply to author
Forward
0 new messages