[Solved] 1.10.3 database upgrade fails

Unimus support forum
Post Reply
smccloud
Posts: 12
Joined: Tue Oct 17, 2017 2:46 pm

Thu Dec 05, 2019 8:57 pm

I'm trying to upgrade Unimus and I get the following.

Code: Select all

java -jar Unimus.jar
   ___   ___          _
  /  /  /  / ____    (_) ____ ___    __  __  _____
 /  /  /  / / __ \  / / / __ `__ \  / / / / / ___/
/  /__/  / / / / / / / / / / / / / / /_/ / (__  )
\___,___/ /_/ /_/ /_/ /_/ /_/ /_/  \__,_/ /____/

:: © 2016-2019 NetCore j.s.a. :: version 1.10.3 ::

2019-12-05 14:54:30.070  INFO 24451 --- [           main] net.unimus.Application                   : Starting Application v1.10.3 on itservices with PID 24451 (/opt/unimus/Unimus.jar started by root in /opt/unimus)
2019-12-05 14:54:30.092  INFO 24451 --- [           main] net.unimus.Application                   : The following profiles are active: composite,unix,jar,unimus,core
2019-12-05 14:54:33.901  WARN 24451 --- [           main] o.h.v.m.ParameterMessageInterpolator     : HV000184: ParameterMessageInterpolator has been chosen, EL interpolation will not be supported
2019-12-05 14:54:34.570  INFO 24451 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8085 (http)
2019-12-05 14:54:46.215  INFO 24451 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8085 (http)
2019-12-05 14:54:46.222  INFO 24451 --- [           main] net.unimus.Application                   : Started Application in 20.245 seconds (JVM running for 20.971)
2019-12-05 14:54:46.582  INFO 24451 --- [cTaskExecutor-1] n.u.s.b.b.step.LoggingPathAccessibility  : Checking logging subsystem
2019-12-05 14:54:46.598  INFO 24451 --- [cTaskExecutor-1] n.u.s.b.b.step.DatabaseConnectionCheck   : Testing database connection
2019-12-05 14:54:46.891  INFO 24451 --- [cTaskExecutor-1] n.u.s.b.b.step.DatabaseConnectionCheck   : Database connection test passed
2019-12-05 14:54:46.891  INFO 24451 --- [cTaskExecutor-1] n.u.s.b.boot.step.DatabaseUpdate         : Connecting to database (MYSQL, jdbc:mysql://192.168.25.11:3306/unimus?allowPublicKeyRetrieval=true&useSSL=false)
2019-12-05 14:54:46.891  INFO 24451 --- [cTaskExecutor-1] n.u.s.b.boot.step.DatabaseUpdate         : Updating database schema
2019-12-05 14:55:47.014 ERROR 24451 --- [cTaskExecutor-1] n.u.s.b.boot.step.DatabaseUpdate         : Failed to update database schema. Reason = 'liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by 172.17.0.1 (172.17.0.1) since 10/16/19 6:59 AM'
I'm not 100% sure what is using the database. I do know that the IP is my docker0 network, but I have docker stopped.
User avatar
Tomas
Posts: 788
Joined: Sat Jun 25, 2016 12:33 pm

Thu Dec 05, 2019 9:21 pm

Hi,

This can happen when a DB upgrade is interrupted - for example, the Unimus service is restarted during DB update.

If you are sure nothing is using the DB, you can manually delete the lock by connecting to the MySQL DB, and removing the lock row in the CHANGELOGLOCK table. After the lock is deleted, simply restart the Unimus service / container, and it should continue the upgade properly.

The upgrades are in transactions, and the DB upgrade process will pick up properly where the upgrade was interrupted, so there is almost no chance the DB can be corrupted. However if you keep having issues, feel free to create a ticket on the Portal, and we would be happy to investigate this directly.
smccloud
Posts: 12
Joined: Tue Oct 17, 2017 2:46 pm

Thu Dec 05, 2019 9:33 pm

Tomas wrote:
Thu Dec 05, 2019 9:21 pm
Hi,

This can happen when a DB upgrade is interrupted - for example, the Unimus service is restarted during DB update.

If you are sure nothing is using the DB, you can manually delete the lock by connecting to the MySQL DB, and removing the lock row in the CHANGELOGLOCK table. After the lock is deleted, simply restart the Unimus service / container, and it should continue the upgade properly.

The upgrades are in transactions, and the DB upgrade process will pick up properly where the upgrade was interrupted, so there is almost no chance the DB can be corrupted. However if you keep having issues, feel free to create a ticket on the Portal, and we would be happy to investigate this directly.
That fixed it, thank you.
Post Reply