Skip to content

Error while upgrading database from 0.32.0 to 0.34.0 #1488

@ohagene

Description

@ohagene

I have just pulled the new 0.34.0 docker containers and after starting them I can't connect to the website and I see the following in logs.

docspell-restserver  | Apr 03, 2022 10:37:31 AM org.jline.utils.Log logr
docspell-restserver  | WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
docspell-restserver  | 2022.04.03 10:37:31:035 io-compute-6 INFO docspell.config.ConfigFactory.default:44
docspell-restserver  |     Using config from environment variables!
docspell-restserver  | 2022.04.03 10:37:31:781 io-compute-6 WARN docspell.restserver.ConfigFile.generateSecretIfEmpty:57
docspell-restserver  |     No serverSecret specified. Generating a random one. It is recommended to add a server-secret in the config file.
docspell-restserver  | 2022.04.03 10:37:31:0000 [io-comp...] [INFO ] docspell.restserver.Main.run:34 -
docspell-restserver  | ***>  ______                          _ _
docspell-restserver  | ***>  |  _  \                        | | |
docspell-restserver  | ***>  | | | |___   ___ ___ _ __   ___| | |
docspell-restserver  | ***>  | | | / _ \ / __/ __| '_ \ / _ \ | |
docspell-restserver  | ***>  | |/ / (_) | (__\__ \ |_) |  __/ | |
docspell-restserver  | ***>  |___/ \___/ \___|___/ .__/ \___|_|_|
docspell-restserver  | ***>                      | |
docspell-restserver  | ***>                      |_| v0.34.0 (#c6da3eb0)
docspell-restserver  | ***>  << REST Server >>
docspell-restserver  | ***>  Id:       rest1
docspell-restserver  | ***>  Base-Url: http://localhost:7880
docspell-restserver  | ***>  Database: jdbc:postgresql://xxxx:5432/docspell
docspell-restserver  | ***>  Fts:      PostgreSQL(default)
docspell-restserver  | ***>  Config:
docspell-restserver  | ***>  FileRepo: DefaultDatabase(true)
docspell-restserver  | ***>
docspell-restserver  | 2022.04.03 10:37:32:0000 [io-comp...] [INFO ] docspell.store.migrate.FlywayMigrate.createFlyway:37 - Creating Flyway for: List(classpath:db/fixups/postgresql, classpath:db/fixups/common)
docspell-restserver  | 2022.04.03 10:37:32:0001 [io-comp...] [INFO ] docspell.store.migrate.FlywayMigrate.runFixups:64 - !!! Running fixup migrations
docspell-restserver  | 2022.04.03 10:37:32:0002 [io-comp...] [INFO ] org.flywaydb.core.internal.license.VersionPrinter - Flyway Community Edition 8.5.4 by Redgate
docspell-restserver  | 2022.04.03 10:37:32:0003 [io-comp...] [INFO ] org.flywaydb.core.internal.license.VersionPrinter - See what's new here: https://flywaydb.org/documentation/learnmore/releaseNotes#8.5.4
docspell-restserver  | 2022.04.03 10:37:32:0004 [io-comp...] [INFO ] org.flywaydb.core.internal.license.VersionPrinter -
docspell-restserver  | 2022.04.03 10:37:32:0005 [io-comp...] [INFO ] org.flywaydb.core.internal.database.base.BaseDatabaseType - Database: jdbc:postgresql://data-01:5432/docspell (PostgreSQL 14.1)
docspell-restserver  | 2022.04.03 10:37:32:0006 [io-comp...] [INFO ] org.flywaydb.core.internal.command.DbValidate - Successfully validated 2 migrations (execution time 00:00.024s)
docspell-restserver  | 2022.04.03 10:38:24:0000 [io-comp...] [ERROR] org.flywaydb.core.internal.database.postgresql.PostgreSQLAdvisoryLockTemplate - Unable to release PostgreSQL advisory lock
docspell-restserver  | 2022.04.03 10:38:24:0000 [io-comp...] [INFO ] org.http4s.blaze.client.PoolManager - Shutting down connection pool: curAllocated=0 idleQueues.size=0 waitQueue.size=0 maxWaitQueueLimit=256 closed=false
docspell-restserver  | org.flywaydb.core.api.FlywayException: Number of retries exceeded while attempting to acquire PostgreSQL advisory lock. Configure the number of retries with the 'lockRetryCount' configuration option: https://rd.gt/3A57jfk
docspell-restserver  |  at org.flywaydb.core.internal.strategy.RetryStrategy.doWithRetries(RetryStrategy.java:87)
docspell-restserver  |  at org.flywaydb.core.internal.database.postgresql.PostgreSQLAdvisoryLockTemplate.lock(PostgreSQLAdvisoryLockTemplate.java:87)
docspell-restserver  |  at org.flywaydb.core.internal.database.postgresql.PostgreSQLAdvisoryLockTemplate.execute(PostgreSQLAdvisoryLockTemplate.java:68)
docspell-restserver  |  at org.flywaydb.core.internal.database.postgresql.PostgreSQLConnection.lock(PostgreSQLConnection.java:99)
docspell-restserver  |  at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:139)
docspell-restserver  |  at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:141)
docspell-restserver  |  at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:98)
docspell-restserver  |  at org.flywaydb.core.Flyway$1.execute(Flyway.java:172)
docspell-restserver  |  at org.flywaydb.core.Flyway$1.execute(Flyway.java:124)
docspell-restserver  |  at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:205)
docspell-restserver  |  at org.flywaydb.core.Flyway.migrate(Flyway.java:124)
docspell-restserver  |  at docspell.store.migrate.FlywayMigrate.$anonfun$runFixups$5(FlywayMigrate.scala:65)
docspell-restserver  |  at blocking @ fs2.io.file.FilesCompanionPlatform$AsyncFiles.exists(FilesPlatform.scala:204)
docspell-restserver  |  at map @ docspell.store.migrate.FlywayMigrate.$anonfun$runFixups$4(FlywayMigrate.scala:65)
docspell-restserver  |  at delay @ docspell.logging.impl.ScribeWrapper$Impl.log(ScribeWrapper.scala:28)
docspell-restserver  |  at flatMap @ docspell.store.migrate.FlywayMigrate.$anonfun$runFixups$2(FlywayMigrate.scala:64)
docspell-restserver  |  at delay @ docspell.logging.impl.ScribeWrapper$Impl.log(ScribeWrapper.scala:28)
docspell-restserver  |  at map @ docspell.store.migrate.FlywayMigrate.$anonfun$createFlyway$1(FlywayMigrate.scala:37)
docspell-restserver  |  at map @ docspell.store.migrate.FlywayMigrate.$anonfun$createFlyway$1(FlywayMigrate.scala:37)
docspell-restserver  |  at flatMap @ docspell.store.migrate.FlywayMigrate.createFlyway(FlywayMigrate.scala:36)
docspell-restserver  |  at flatMap @ docspell.store.migrate.FlywayMigrate.$anonfun$runFixups$1(FlywayMigrate.scala:63)
docspell-restserver  |  at blocking @ fs2.io.file.FilesCompanionPlatform$AsyncFiles.exists(FilesPlatform.scala:204)
docspell-restserver  |  at as @ docspell.restserver.RestServer$.$anonfun$serve$1(RestServer.scala:67)
docspell-restserver  |  at $anonfun$apply$10 @ fs2.Stream$.$anonfun$resourceWeak$3(Stream.scala:3624)
docspell-restserver  |  at $anonfun$apply$10 @ fs2.Stream$.$anonfun$resourceWeak$3(Stream.scala:3624)
docspell-restserver  |  at blocking @ fs2.io.file.FilesCompanionPlatform$AsyncFiles.exists(FilesPlatform.scala:204)
docspell-restserver  |  at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:162)
docspell-restserver  |  at $anonfun$apply$10 @ fs2.Stream$.$anonfun$resourceWeak$3(Stream.scala:3624)
docspell-restserver exited with code 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions