船坞后润滑脂的液基锁
由: liquibase.exception.LockException:无法获取更改日志锁引起。目前锁在85c1e0340e82 (172.18.0.12)自6/18/20,上午11:36
Caused by: liquibase.exception.LockException: Could not acquire change log lock. Currently locked by 85c1e0340e82 (172.18.0.12) since 6/18/20, 11:36 AM
at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:236)
at liquibase.Liquibase.update(Liquibase.java:184)
at liquibase.Liquibase.update(Liquibase.java:179)
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:366)
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:314)
at org.springframework.boot.autoconfigure.liquibase.DataSourceClosingSpringLiquibase.afterPropertiesSet(DataSourceClosingSpringLiquibase.java:46)
at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.initDb(AsyncSpringLiquibase.java:118)
at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.afterPropertiesSet(AsyncSpringLiquibase.java:103)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792)
... 16 common frames omitted发布于 2020-06-19 06:26:15
经过一些研究后:
我找到了解决办法。
找到码头形象的细节。
%> docker ps -a --filter "name=docker-compose"
%>. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b5b26f985 postgres:12.3 "docker-entrypoint.s…" 5 hours ago Up 19 minutes 5432/tcp docker-compose进入图像环境
%> docker exec -it b5b26f985 bash
%>root@b5b26f985:/# ls
root@b5b26f985:/# bin boot dev docker-entrypoint-initdb.d docker-entrypoint.sh etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var现在连接到PG
root@b5b26f985e9b:/# psql -h localhost -U <username >
<username >=# select * from DATABASECHANGELOGLOCK;
id | locked | lockgranted | lockedby
----+--------+-------------------------+----------------------------
1 | t | 2020-06-18 11:36:08.825 | 85c1e0340e82 (172.18.0.12)
(1 row)描述的表锁定类型,我的变更表系统到系统,数据库到数据库,所以很好的检查数据类型。
<username >=# \d DATABASECHANGELOGLOCK;
Table "public.databasechangeloglock"
Column | Type | Collation | Nullable | Default
-------------+-----------------------------+-----------+----------+---------
id | integer | | not null |
locked | boolean | | not null |
lockgranted | timestamp without time zone | | |
lockedby | character varying(255) | | |
Indexes:
"databasechangeloglock_pkey" PRIMARY KEY, btree (id)更新查询
=#更新DATABASECHANGELOGLOCK集LOCKED=false,LOCKGRANTED=null,LOCKEDBY=null,其中ID=1;
UPDATE 1
<username >=# SELECT * FROM DATABASECHANGELOGLOCK;
id | locked | lockgranted | lockedby
----+--------+-------------+----------
1 | f | |
(1 row)--现在试一试--这应该管用.编码愉快。
https://stackoverflow.com/questions/62455159
复制相似问题