Content
Upgrade issue from 4.2 to 7.4.0 using bitnami new setup
Added by Rudhra V over 5 years ago
I have 4.2 version running right now and i am try to update to version 7.4.0 as direct latest version showing this error
ToV710AggregatedMigrations::IncompleteMigrationsError: It appears you are migrating from an incompatible version of OpenProject. Yourdatabase has only some migrations from OpenProject < v7.4.0 Please update your database to the schema of OpenProject v7.4.0 and run the OpenProject migrations again. The following migrations are missing: [20121114100641, 20141215104802, 20150116095004, 20150623151337, 20150629075221, 20150716133712, 20150716163704, 20150729145732, 20150819143300, 20150820133700, 20150827133700, 20151005113102, 20151028063433, 20151116110245, 20160125143638, 20160419103544, 20160503150449, 20160726090624, 20160803094931, 20160824121151, 20160829225633, 20160907113604, 20160913081236, 20160913125802, 20160914124514, 20160926102618, 20161017102547, 20161025135400, 20161102160032, 20161116130657, 20161213191919, 20161219134700, 20170116105342, 20170117112648, 20170222094032, 20170308120915, 20170330084810, 20170404110156, 20170407074032, 20170411065946, 20170418064453, 20170420082944, 20170421071136, 20170421071137, 20170602073043, 20170614131555]
so when i have upgraded to the 7.4.0 and imported the db to the 7.4.0 and run below command.
RAILS_ENV="production" bundle exec rake db:migrate --trace
it gave me something like this :-
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Invoke openproject:db:ensure_database_compatibility (first_time)
** Invoke environment
** Invoke db:load_config
** Execute openproject:db:ensure_database_compatibility
** Execute db:migrate
== 20121114100641 AggregatedAnnouncementsMigrations: migrating ================
-- create_table(:announcements, {})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Mysql2::Error: Table 'announcements' already exists: CREATE TABLE `announcements` (`id` int AUTO_INCREMENT PRIMARY KEY, `text` text, `show_until` date, `active` tinyint(1) DEFAULT 0, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
/opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.4.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:120:in `_query'
/opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.4.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:120:in `block in query'
/opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.4.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:119:in `handle_interrupt'
/opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.4.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:119:in `query'
/opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:218:in `block in execute'
/opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract_adapter.rb:590:in `block in log'
/opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
/opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:218:in `execute'
/opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/mysql/database_statements.rb:31:in `execute'
/opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_statements.rb:278:in `create_table'
/opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:423:in `create_table'
/opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:846:in `block in method_missing'
/opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:815:in `block in say_with_time'
/opt/bitnami/ruby/lib/ruby/2.4.0/benchmark.rb:293:in `measure'
but after that i am not able to login in openproject and when i checked the logs from logs/production.logs
i am able to see this below error :-
app/models/user_password.rb:48:in `matches_plaintext?'
app/models/user.rb:366:in `check_password?'
app/models/user.rb:224:in `try_authentication_for_existing_user'
app/models/user.rb:201:in `try_to_login'
app/controllers/account_controller.rb:387:in `password_authentication'
app/controllers/account_controller.rb:382:in `authenticate_user'
app/controllers/account_controller.rb:55:in `login'
app/middleware/reset_current_user.rb:47:in `call'
E, [2019-04-23T18:54:53.575909 #3376] ERROR -- : 2019-04-23T18:54:53+0000: [Worker(delayed_job host:ubuntu-s-2vcpu-4gb-fra1-01 pid:3376)] Job DeliverWorkPackageUpdatedJob (id=39438) FAILED permanently with Delayed::DeserializationError: Job failed to load: undefined class/module DeliverWorkPackageUpdatedJob. Handler: "--- !ruby/object:DeliverWorkPackageUpdatedJob\nrecipient_id: 43\nauthor_id: 16\njournal_id: 41307\n"
E, [2019-04-23T18:54:58.871287 #3376] ERROR -- : 2019-04-23T18:54:58+0000: [Worker(delayed_job host:ubuntu-s-2vcpu-4gb-fra1-01 pid:3376)] Job DeliverWorkPackageCreatedJob (id=39439) FAILED permanently with Delayed::DeserializationError: Job failed to load: undefined class/module DeliverWorkPackageCreatedJob. Handler: "--- !ruby/object:DeliverWorkPackageCreatedJob\nrecipient_id: 16\nauthor_id: 16\nwork_package_id: 8193\n"
E, [2019-04-23T18:55:04.164079 #3376] ERROR -- : 2019-04-23T18:55:04+0000: [Worker(delayed_job host:ubuntu-s-2vcpu-4gb-fra1-01 pid:3376)] Job DeliverWorkPackageCreatedJob (id=39440) FAILED permanently with Delayed::DeserializationError: Job failed to load: undefined class/module DeliverWorkPackageCreatedJob. Handler: "--- !ruby/object:DeliverWorkPackageCreatedJob\nrecipient_id: 33\nauthor_id: 16\nwork_package_id: 8193\n"
F, [2019-04-23T18:55:09.290016 #3633] FATAL -- :
F, [2019-04-23T18:55:09.290163 #3633] FATAL -- : NotImplementedError (Must be overridden by subclass):
F, [2019-04-23T18:55:09.290212 #3633] FATAL -- :
F, [2019-04-23T18:55:09.290255 #3633] FATAL -- : app/models/user_password.rb:103:in `hash_matches?'
app/models/user_password.rb:48:in `matches_plaintext?'
app/models/user.rb:366:in `check_password?'
app/models/user.rb:224:in `try_authentication_for_existing_user'
app/models/user.rb:201:in `try_to_login'
app/controllers/account_controller.rb:387:in `password_authentication'
app/controllers/account_controller.rb:382:in `authenticate_user'
app/controllers/account_controller.rb:55:in `login'
app/middleware/reset_current_user.rb:47:in `call'
Please confirm how it can work.
Thank you