greenlight icon indicating copy to clipboard operation
greenlight copied to clipboard

greenlight migration fails

Open ddeenniiss opened this issue 1 year ago • 11 comments

.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 ?

ddeenniiss avatar Aug 11 '23 13:08 ddeenniiss

Hi,

two things:

  • according to the docs: "If you have an error, try re-running the migration task to resolve any failed resources migration." Have you run the migration a 2nd or 3rd time? This is also the output of your migration:users command.
  • Are you sure you're running on the latest version of GLv2? I'd add your server's configuration so that others (e. g. the developers) can assist you further.

Regards, J.

JeanPluzo avatar Aug 11 '23 13:08 JeanPluzo

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 avatar Aug 11 '23 15:08 ddeenniiss

and no log present on log/production.log

ddeenniiss avatar Aug 11 '23 15:08 ddeenniiss

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?

ZhmerenkaSolution avatar Oct 03 '23 08:10 ZhmerenkaSolution

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.

JeanPluzo avatar Oct 04 '23 06:10 JeanPluzo

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.

Saint-Paulin avatar Oct 12 '23 13:10 Saint-Paulin

@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.

ZhmerenkaSolution avatar Oct 12 '23 14:10 ZhmerenkaSolution

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.

psy avatar Nov 19 '23 14:11 psy

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

lkrbbsb avatar Nov 24 '23 10:11 lkrbbsb

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://<your URL>/bigbluebutton/, but this it not the correct URL!

hvoges avatar Jan 19 '24 11:01 hvoges

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

Alpini1980 avatar Jun 04 '24 15:06 Alpini1980