Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. OpenProject Update from 12.1 to 12.2: Error on db:migrate

OpenProject Update from 12.1 to 12.2: Error on db:migrate

Added by Heinrich Huber almost 3 years ago

Hi,

yesterday I did an update on my Ubuntu 20.04 VM to version 12.2.

After doing the sudo openproject configure command I noticed that my updated OpenProject instance delivers me a 503 Service Unavailable Error. Taking a closer look at the output of sudo openproject configure offered me a few lines which got my interest:

I, [2022-08-21T22:06:28.736578 #484251]  INFO -- : Migrating to FixDeletedDataJournals (20220818074159)
== 20220818074159 FixDeletedDataJournals: migrating ===========================
Cleaning up journals on WorkPackage
W, [2022-08-21T22:06:28.760964 #484251]  WARN -- : Scoped order is ignored, it's forced to be batch order.
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

There shouldn't be any missing data left for WorkPackage, but found 1

Honestly I don't understand what that means but it seems to knock out the openproject-web-1.service. Looking at the logs with sudo openproject logs --tail it show the following lines (snippet):

Aug 21 22:10:56 ubuntu-op systemd[1]: openproject-web-1.service: Main process exited, code=exited, status=1/FAILURE
Aug 21 22:10:56 ubuntu-op systemd[1]: openproject-web-1.service: Failed with result 'exit-code'.
Aug 21 22:10:57 ubuntu-op systemd[1]: openproject-web-1.service: Scheduled restart job, restart counter is at 7604.
Aug 21 22:10:57 ubuntu-op systemd[1]: Stopped openproject-web-1.service.
Aug 21 22:10:57 ubuntu-op systemd[1]: Started openproject-web-1.service.
Aug 21 22:11:06 ubuntu-op openproject-web-1.service[485545]: /opt/openproject/config/constants/settings/definition.rb:295:in `find_env_var_override': Using unprefixed environment variables is deprecated. Please use OPENPROJECT_ATTACHMENTS_STORAGE_PATH instead of ATTACHMENTS_STORAGE_PATH (StructuredWarnings::StandardWarning)
Aug 21 22:11:06 ubuntu-op openproject-web-1.service[485545]: /opt/openproject/config/constants/settings/definition.rb:295:in `find_env_var_override': Using unprefixed environment variables is deprecated. Please use OPENPROJECT_RAILS_CACHE_STORE instead of RAILS_CACHE_STORE (StructuredWarnings::StandardWarning)
Aug 21 22:11:06 ubuntu-op openproject-web-1.service[485545]: => Booting Puma
Aug 21 22:11:06 ubuntu-op openproject-web-1.service[485545]: => Rails 7.0.3.1 application starting in production
Aug 21 22:11:06 ubuntu-op openproject-web-1.service[485545]: => Run `bin/rails server --help` for more startup options
Aug 21 22:11:07 ubuntu-op openproject-web-1.service[485545]: Exiting
Aug 21 22:11:07 ubuntu-op openproject-web-1.service[485545]: /opt/openproject/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/migration.rb:627:in `check_pending!':  (ActiveRecord::PendingMigrationError)
Aug 21 22:11:07 ubuntu-op openproject-web-1.service[485545]: Migrations are pending. To resolve this issue, run:
Aug 21 22:11:07 ubuntu-op openproject-web-1.service[485545]:         bin/rails db:migrate RAILS_ENV=production
Aug 21 22:11:07 ubuntu-op openproject-web-1.service[485545]: You have 1 pending migration:
Aug 21 22:11:07 ubuntu-op openproject-web-1.service[485545]: 20220818074159_fix_deleted_data_journals.rb

Doing a manual sudo openproject run rake db:migrate --trace will lead to the same messages like the shown ones from sudo openproject configure. I'll attach full output of openproject configure and openproject logs.

Any help is very welcome.


Replies (5)

RE: OpenProject Update from 12.1 to 12.2: Error on db:migrate - Added by Andreas Herr almost 3 years ago

I have exactly the same problem (Debian 11, OpenProject 12.1.5 -> 12.2).

RE: OpenProject Update from 12.1 to 12.2: Error on db:migrate - Added by Heinrich Huber over 2 years ago

Andreas,

thanks for your response. It's always good to be not alone (even if I wished you have no problems with OP:-).

I assume this can be seen as a bug. So I'll create a Work Package. I hope this respects the rules.

RE: OpenProject Update from 12.1 to 12.2: Error on db:migrate - Added by Heinrich Huber over 2 years ago

I got a solution (see #43839 ).

RE: OpenProject Update from 12.1 to 12.2: Error on db:migrate - Added by Andreas Herr over 2 years ago

Heinrich Huber wrote:

I got a solution (see <mention class="mention" data-id="43839" data-type="work_package" data-text="#43839">#43839 ).

This workaround works for me.

RE: OpenProject Update from 12.1 to 12.2: Error on db:migrate - Added by Adam Szabo over 2 years ago

Hi Obrien

did you see the solution?

https://community.openproject.org/topics/15250?r=15263#message-15263

  • (1 - 5/5)
Loading...