Atlassian Cloud 移行アシスタントが「Could not acquire change log lock」というエラーで起動に失敗する
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
要約
Atlassian Cloud 移行アシスタントが起動に失敗し、例外が発生する
診断
ユーザーがオンプレミスの Confluence で Migration Assistant アプリケーションを起動しようとしたときに、以下のエラーが発生
Causeorg.apache.velocity.exception.MethodInvocationException: Invocation of method 'getInitialState' in class com.atlassian.migration.agent.web.AppAction threw exception com.atlassian.util.concurrent.LazyReference$InitializationException: javax.persistence.PersistenceException: Failed to update database schema at /templates/app.vm[line 21, column 44] at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:228)
caused by: com.atlassian.util.concurrent.LazyReference$InitializationException: javax.persistence.PersistenceException: Failed to update database schema at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
caused by: javax.persistence.PersistenceException: Failed to update database schema at com.atlassian.migration.agent.store.jpa.impl.LiquibaseSchemaUpgrader.upgrade(LiquibaseSchemaUpgrader.java:35)
caused by: liquibase.exception.LockException: Could not acquire change log lock. Currently locked by DEMAG01WIKI01 (10.128.3.89) since 08.10.19 12:22 at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:230)
Stack Trace:[hide]org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getInitialState' in class com.atlassian.migration.agent.web.AppAction threw exception com.atlassian.util.concurrent.LazyReference$InitializationException: javax.persistence.PersistenceException: Failed to update database schema at /templates/app.vm[line 21, column 44] at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:228) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:342) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:57) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170) at com.atlassian.confluence.web.filter.ConfluenceOpenSessionInViewFilter.doFilterInternal( at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57) at com.atlassian.confluence.extra.webdav.servlet.filter.WebdavRequestForwardFilter.doFilter( at java.base/java.lang.Thread.run(Unknown Source)Caused by: com.atlassian.util.concurrent.LazyReference$InitializationException: javax.persistence.PersistenceException: Failed to update database schema at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
Caused by: javax.persistence.PersistenceException: Failed to update database schema at com.atlassian.migration.agent.store.jpa.impl.LiquibaseSchemaUpgrader.upgrade(LiquibaseSchemaUpgrader.java:35) at com.atlassian.migration.agent.store.jpa.impl.DefaultSessionFactorySupplier.buildSessionFactory(DefaultSessionFactorySupplier.java:70) at com.atlassian.util.concurrent.Lazy$Strong.create(Lazy.java:85) at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:325) at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143) at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112) at com.atlassian.migration.agent.store.jpa.impl.DefaultSessionFactorySupplier.get(DefaultSessionFactorySupplier.java:65) at com.atlassian.migration.agent.store.jpa.impl.DefaultSessionFactorySupplier.get(DefaultSessionFactorySupplier.java:40) at com.atlassian.migration.agent.store.jpa.impl.DefaultPluginTransactionTemplate.on(DefaultPluginTransactionTemplate.java:29) at com.atlassian.migration.agent.store.tx.PluginTransactionTemplate.read(PluginTransactionTemplate.java:16) at com.atlassian.migration.agent.service.impl.DefaultStatisticsService.loadSpaceStatistics(DefaultStatisticsService.java:126) at com.atlassian.migration.agent.service.impl.DefaultStatisticsService.calculateServerStats(DefaultStatisticsService.java:155) at com.atlassian.migration.agent.service.impl.SingleJobExecutor.lambda$execute$0(SingleJobExecutor.java:33) at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ... 1 moreCaused by: liquibase.exception.LockException: Could not acquire change log lock. Currently locked by DEMAG01WIKI01 (10.128.3.89) since 08.10.19 12:22 at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:230) at liquibase.Liquibase.update(Liquibase.java:184) at liquibase.Liquibase.update(Liquibase.java:179) at com.atlassian.migration.agent.store.jpa.impl.LiquibaseSchemaUpgrader.upgrade(LiquibaseSchemaUpgrader.java:30) ... 16 more
主なエラーは、以下です。
com.atlassian.migration.agent.store.jpa.impl.LiquibaseSchemaUpgrader.upgrade(LiquibaseSchemaUpgrader.java:35) caused by: liquibase.exception.LockException: Could not acquire change log lock. Currently locked by DEMAG01WIKI01 (10.128.3.89) since 08.10.19 12:22 at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:230)
原因
この問題は MIG_DB_CHANGELOG_LOCK
テーブルがリリース ロック情報で更新されておらず、アップグレード後にデータベース スキーマを移行しようとしている間に Confluence が強制終了したことが原因と考えられます。
The MIG_DB_CHANGELOG_LOCK
table is related to the Cloud Migration Assistant for Confluence plugin which is bundled by default since Confluence 6.14.
ソリューション
この問題を解決するには、以下の回避策に従ってください。
Confluence データベースで以下の SQL クエリを実行して、手動でロックを解除します。
UPDATE MIG_DB_CHANGELOG_LOCK SET LOCKED=false, LOCKGRANTED=null, LOCKEDBY=null where ID=1;
UPDATE MIG_DB_CHANGELOG_LOCK SET LOCKED=0, LOCKGRANTED=null, LOCKEDBY=null where ID=1;
- Confluence を再起動します。