bigbluebutton / greenlight

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

greenlight migration fails #5383

Open ddeenniiss opened 1 year ago

ddeenniiss commented 1 year ago

.en on V2

V3_ENDPOINT=https://XXX/bigbluebutton/ 
V3_SECRET_KEY_BASE=123

.en on V3

BIGBLUEBUTTON_ENDPOINT=https://XXX/bigbluebutton/ 
SECRET_KEY_BASE=123

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.

Roles migration complete.

seems OK

sudo docker exec -it greenlight-v2 bundle exec rake migrations:users

/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 User:
UID: gl-rldkxhalkitd
Name: Denis
Provider: greenlight

...

Users migration completed.
In case of an error please retry the process to resolve.
If you have not migrated your roles, kindly run 'rake migrations:roles' first and then retry.

If i log with the admin acces to https://XXX/ there is no users ...

What can i do to identify the problem ?

JeanPluzo commented 1 year ago

Hi,

two things:

Regards, J.

ddeenniiss commented 1 year ago

Hi,

Yes, i have run several times but no changes ...

My version seems the latest:


RUBY_VERSION=2.7.7
VERSION_CODE=release-2.14.8.1
ddeenniiss commented 1 year ago

and no log present on log/production.log

ZhmerenkaSolution commented 11 months ago

Have same issue, roles seems migrated (so it's probably not connection/wrong keys/api issue), but starting from users (rooms, settings) same output - just list all of them, writes Unable to migrate User without any message. Greenlight v2 configuration:

Rails version             5.2.8.1
Ruby version              2.7.7-p221 (x86_64-linux-musl)
RubyGems version          3.1.6
Rack version              2.2.6.2
JavaScript Runtime        Node.js (V8)
Database schema version   20220209094148

@JeanPluzo how I can update greenlight-v2 if I doesn't have any packages to update?

JeanPluzo commented 11 months ago

Hi,

a new version of both GLv2 and GLv3 came out yesterday and there seem to be fixes for migrating. Please update both GLv2 (latest as of this writing is 2.14.8.2) and GLv3 (latest as of this writing is 3.0.7). And if you get a clean migration, please let the community know.

Regards, J.

Saint-Paulin commented 10 months ago

Hello @ddeenniiss and @ZhmerenkaSolution is it working for you now ? I have the same problem. My greenlight V2 and V3 are up-to-date but it doesn't work I didn't get any error message. I tried with a fresh install V2 and V3. Same problem.

ZhmerenkaSolution commented 10 months ago

@Saint-Paulin No, I simply gave up and made fresh install (I didn't have large database), so right now I don't have an option to check. Seems like you can only post your V2 and V3 exact versions/setup and wait for solution or write manually migration script for mongodb.

psy commented 9 months ago

A more verbose output on migration fails would definitely help. Debugging migrations since an hour and the output of the migration is not helpful at all.

lkrbbsb commented 9 months ago

Have you tried: V3_ENDPOINT=https://XXX/

hvoges commented 7 months ago

Had the same issue migrating from Greenlight V2 to V3. The migration failed, and the error-message was empty. In the end, the solution was simple: I copied the Endpoint-URL from V3-Greenlight, but that is not correct. The correct URLs on a default installation are: Greenlight-V2: https://yourURL/b/ Greenlight-V3: https://yourURL/ In the .env-file there is a configuration-option BIGBLUEBUTTON_ENDPOINT which directs to https:///bigbluebutton/, but this it not the correct URL!

Alpini1980 commented 3 months ago

We also had the same problem which is described here. And like @hvoges also both of our endpoint settings were wrong because /bigbluebutton was appended on them by default. Also the /b we removed from the BIGBLUEBUTTON_ENDPOINT so our setting just looked like:

BIGBLUEBUTTON_ENDPOINT=https://meet.domain.com/ V3_ENDPOINT=https://meetv3.domain.com/

The api-endpoints can also be tested by accessing them with a browser. By entering:

https://meet.domain.com/bigbluebutton/api/

a XML-response should be returned:

<response> <returncode>SUCCESS</returncode> <version>2.0</version> <apiVersion>2.0</apiVersion> ><bbbVersion/> </response>

Another thing which we worried about was the migration manual: https://docs.bigbluebutton.org/greenlight/v3/migration/

In the point "Configuring the Environment" it states: "V3_SECRET_KEY_BASE, a copy from Greenlight v3 SECRET_KEY_BASE. It is needed for the encryption process" which makes sense. But under point "Users Migration"-->"Local Accounts" you should again change the V3_SECRET_KEY_BASE but this time set it to the old Greenlight V2's Endpoint? We had no luck doing so and changed the V3_SECRET_KEY_BASE back to what it reads: the V3 SECRET_KEY_BASE and then were able to successfully migrate the users. The users still can log into Greenlight V3 with their old passwords and the V2 / V3 use different secret keys. Is it maybe a mistake in the manual to set the V3_SECRET_KEY_BASE to the V2 SECRET_KEY_BASE to migrate the users?

Regards, Stefan