Content
Docker: "DATABASE INCOMPATIBILITY ERROR" after upgrade to 12.1.1
Added by Andreas Korbmann over 2 years ago
Hello together,
After upgrading Openproject to version 12.1.1, a DATABASE INCOMPATIBILITY ERROR occurs when starting:
2022-05-05 08:48:36 stdout (StructuredWarnings::StandardWarning)
2022-05-05 08:48:36 stdout ---------------------------------------------------
2022-05-05 08:48:36 stdout https://www.openproject.org/operations/upgrading/
2022-05-05 08:48:36 stdout For more information, visit our upgrading documentation:
2022-05-05 08:48:36 stdout
2022-05-05 08:48:36 stdout Database server version mismatch: Required version is 10.0.0, but current version is 9.6.24
2022-05-05 08:48:36 stdout
2022-05-05 08:48:36 stdout DATABASE INCOMPATIBILITY ERROR
2022-05-05 08:48:36 stdout ---------------------------------------------------
2022-05-05 08:48:36 stdout /app/lib/tasks/database.rake:77:in `rescue in block (3 levels) in <top (required)>':
2022-05-05 08:48:36 stdout /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.5.1/lib/active_record/railtie.rb:152:in `block (3 levels) in <class:Railtie>': Ignoring /app/db/schema_cache.yml because it has expired. The current schema version is 20211118203332, but the one in the cache is 20220428071221. (StructuredWarnings::StandardWarning)
2022-05-05 08:48:30 stdout /app/config/constants/settings/definition.rb:307:in `find_env_var_override': Using unprefixed environment variables is deprecated. Please use OPENPROJECT_RAILS_CACHE_STORE instead of RAILS_CACHE_STORE (StructuredWarnings::StandardWarning)
2022-05-05 08:48:30 stdout /app/config/constants/settings/definition.rb:307:in `find_env_var_override': Using unprefixed environment variables is deprecated. Please use OPENPROJECT_ATTACHMENTS_STORAGE_PATH instead of ATTACHMENTS_STORAGE_PATH (StructuredWarnings::StandardWarning)
2022-05-05 08:48:18 stdout -----> Running migrations...
2022-05-05 08:48:18 stdout Starting memcached: memcached.
2022-05-05 08:48:18 stdout Trying to contact PostgreSQL server instance or waiting for it to come online.
2022-05-05 08:48:18 stdout server started
2022-05-05 08:48:18 stdout waiting for server to start..... done
2022-05-05 08:48:15 stdout -----> Database cluster already exists, not modifying.
2022-05-05 08:48:15 stdout -----> Starting the all-in-one OpenProject setup at /app/docker/prod/supervisord...
2022-05-05 08:48:14 stdout -----> Setting PGVERSION=9.6 PGBIN=/usr/lib/postgresql/9.6/bin PGCONF_FILE=/etc/postgresql/9.6/main/postgresql.conf
2022-05-05 08:48:14 stdout -----> Existing PostgreSQL cluster found in /var/openproject/pgdata.
What can I do?
Replies (4)
Hello,
Having the same problem on Unraid docker install after upgrade.
(StructuredWarnings::StandardWarning)
-----> Existing PostgreSQL cluster found in /var/openproject/pgdata.
-----> Setting PGVERSION=9.6 PGBIN=/usr/lib/postgresql/9.6/bin PGCONF_FILE=/etc/postgresql/9.6/main/postgresql.conf
-----> Starting the all-in-one OpenProject setup at /app/docker/prod/supervisord...
-----> Database cluster already exists, not modifying.
waiting for server to start...... done
server started
Trying to contact PostgreSQL server instance or waiting for it to come online.
Starting memcached: memcached.
-----> Running migrations...
/app/config/constants/settings/definition.rb:307:in `find_env_var_override': Using unprefixed environment variables is deprecated. Please use OPENPROJECT_ATTACHMENTS_STORAGE_PATH instead of ATTACHMENTS_STORAGE_PATH (StructuredWarnings::StandardWarning)
/app/config/constants/settings/definition.rb:307:in `find_env_var_override': Using unprefixed environment variables is deprecated. Please use OPENPROJECT_RAILS_CACHE_STORE instead of RAILS_CACHE_STORE (StructuredWarnings::StandardWarning)
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.5.1/lib/active_record/railtie.rb:152:in `block (3 levels) in <class:Railtie>': Ignoring /app/db/schema_cache.yml because it has expired. The current schema version is 20220106145037, but the one in the cache is 20220428071221. (StructuredWarnings::StandardWarning)
/app/lib/tasks/database.rake:77:in `rescue in block (3 levels) in <top (required)>':
---------------------------------------------------
DATABASE INCOMPATIBILITY ERROR
Database server version mismatch: Required version is 10.0.0, but current version is 9.6.24
For more information, visit our upgrading documentation:
https://www.openproject.org/operations/upgrading/
---------------------------------------------------
(StructuredWarnings::StandardWarning)
Did anyone fix this?
Hi,
yes, I was able to solve it with this guide:
Migrating your OpenProject installation to PostgreSQL 13
Hi I followed the guide but this is what I get when running the upgrade: