3

I was running liquibase script on a VDI against SAP HANA database. Then, the VDI hung, so I just killed the VDI. When opening the VDI again and trying to launch the same application running the same liquibase scripts, I get the following error: Initializing connection to HANA...

INFO  [2018-10-09 17:36:42,245] liquibase: Waiting for changelog lock....
INFO  [2018-10-09 17:36:52,321] liquibase: Waiting for changelog lock....
INFO  [2018-10-09 17:37:02,368] liquibase: Waiting for changelog lock....
INFO  [2018-10-09 17:37:12,412] liquibase: Waiting for changelog lock....
INFO  [2018-10-09 17:37:22,463] liquibase: Waiting for changelog lock....
INFO  [2018-10-09 17:37:32,513] liquibase: Waiting for changelog lock....
INFO  [2018-10-09 17:37:42,564] liquibase: Waiting for changelog lock....
INFO  [2018-10-09 17:37:52,619] liquibase: Waiting for changelog lock....
INFO  [2018-10-09 17:38:02,666] liquibase: Waiting for changelog lock....
INFO  [2018-10-09 17:38:12,716] liquibase: Waiting for changelog lock....
INFO  [2018-10-09 17:38:22,764] liquibase: Waiting for changelog lock....
INFO  [2018-10-09 17:38:32,819] liquibase: Waiting for changelog lock....

....

Then I get the following error

! liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by SomeVMMAchine since 10/9/18 11:05 AM
! at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:175) ~[liquibase-core-3.4.1.jar:na]

I know the question was answered on stackoverflow before (Liquibase lock - reasons?), but the hana database guy couldn't find the table called: "DATABASECHANGELOGLOCK" in the Hana database as suggested by the answer. Any suggestions?

Donia Zaela
  • 317
  • 1
  • 4
  • 15
  • 2
    My suggestion would be: Ask the db guy again. I would assume that the table is there. How should liquibase otherwise know that it is currently locked by "SomeVMMAchine since 10/9/18 11:05 AM". You can also try to run the [`releaseLocks`](https://www.liquibase.org/documentation/command_line.html) command to release the lock... – Jens Oct 10 '18 at 11:08
  • Thanks Jens! I tracked the code initiating the connection to the database and called forceREleaseLocks() method. This resolved my issue. Thanks again! – Donia Zaela Oct 10 '18 at 12:51
  • If you add your comment as an answer, I will mark it as the answer as it solved my issue. – Donia Zaela Oct 10 '18 at 12:52
  • You're welcome. :-) – Jens Oct 10 '18 at 13:01

1 Answers1

4

My suggestion would be: Ask the db guy again. I would assume that the table is there. How should liquibase otherwise know that it is currently locked by "SomeVMMAchine since 10/9/18 11:05 AM".

You can also try to run the releaseLocks command to release the lock

Jens
  • 6,243
  • 1
  • 49
  • 79