liquibase卡在“计算校验和”之后

时间:2016-11-09 07:15:28

标签: liquibase

我从jenkins运行以下命令:

java -jar lib/liquibase.jar --logLevel debug \
  --url jdbc:mysql://secret.us-west-2.rds.amazonaws.com:3306/mydb \
  --classpath lib/mysql-connector-java-5.1.40-bin.jar \
  --driver com.mysql.jdbc.Driver --username secret --password secret \
  --changeLogFile /full/path/to/db/changelog.xml updateSQL

开头的日志看起来还不错:

08:57:19 DEBUG: liquibase: Connected to secret@secret@jdbc:mysql://secret.us-west-2.rds.amazonaws.com:3306/secret
08:57:19 DEBUG: liquibase: Setting auto commit to false from true
08:57:20 DEBUG: liquibase: Executing QUERY database command: select count(*) from secret.DATABASECHANGELOGLOCK
08:57:20 DEBUG: liquibase: Executing QUERY database command: select count(*) from secret.DATABASECHANGELOGLOCK
08:57:20 INFO: liquibase: Successfully acquired change log lock
08:57:21 DEBUG: liquibase: Resolving XML entity name='null', publicId='null', baseURI='null', systemId='http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd'
08:57:21 DEBUG: liquibase: Opening jar:file:lib/liquibase.jar!/liquibase/parser/core/xml/dbchangelog-3.1.xsd as liquibase/parser/core/xml/dbchangelog-3.1.xsd
08:57:21 DEBUG: liquibase: Computed checksum for 1478674641885 as fddb2cfa4a6e9293d3b6cd5135dd7525

但是在校验和之后它就被卡住了。

现在,当我从笔记本电脑中输出相同的命令时,一切正常并继续行:

DEBUG: liquibase: Executing QUERY database command: SELECT MD5SUM FROM secret.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1

知道是什么原因引起的吗?我怎样才能获得更多信息,告诉它在失败时尝试执行的步骤是什么?

更新:我花了一些时间来了解如何在dockerized环境中进行线程转储,但这里是:

Attaching to process ID 23147, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.92-b14
Deadlock Detection:

No deadlocks found.

Thread 23167: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
 - java.lang.ref.ReferenceQueue.remove(long) @bci=59, line=143 (Compiled frame)
 - com.mysql.jdbc.AbandonedConnectionCleanupThread.run() @bci=16, line=43 (Interpreted frame)

Locked ownable synchronizers:
    - None

Thread 23160: (state = BLOCKED)

Locked ownable synchronizers:
    - None

Thread 23159: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.ref.ReferenceQueue.remove(long) @bci=59, line=143 (Compiled frame)
 - java.lang.ref.ReferenceQueue.remove() @bci=2, line=164 (Compiled frame)
 - java.lang.ref.Finalizer$FinalizerThread.run() @bci=36, line=209 (Interpreted frame)

Locked ownable synchronizers:
    - None

Thread 23158: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.Object.wait() @bci=2, line=502 (Compiled frame)
 - java.lang.ref.Reference.tryHandlePending(boolean) @bci=54, line=191 (Compiled frame)
 - java.lang.ref.Reference$ReferenceHandler.run() @bci=1, line=153 (Interpreted frame)

Locked ownable synchronizers:
    - None

Thread 23148: (state = IN_NATIVE)
 - java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Interpreted frame)
 - java.net.SocketInputStream.socketRead(java.io.FileDescriptor, byte[], int, int, int) @bci=8, line=116 (Interpreted frame)
 - java.net.SocketInputStream.read(byte[], int, int, int) @bci=79, line=170 (Interpreted frame)
 - java.net.SocketInputStream.read(byte[], int, int) @bci=11, line=141 (Interpreted frame)
 - com.mysql.jdbc.util.ReadAheadInputStream.fill(int) @bci=262, line=101 (Interpreted frame)
 - com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(byte[], int, int) @bci=179, line=144 (Interpreted frame)
 - com.mysql.jdbc.util.ReadAheadInputStream.read(byte[], int, int) @bci=48, line=174 (Interpreted frame)
 - com.mysql.jdbc.MysqlIO.readFully(java.io.InputStream, byte[], int, int) @bci=34, line=3005 (Interpreted frame)
 - com.mysql.jdbc.MysqlIO.reuseAndReadPacket(com.mysql.jdbc.Buffer, int) @bci=23, line=3466 (Interpreted frame)
 - com.mysql.jdbc.MysqlIO.reuseAndReadPacket(com.mysql.jdbc.Buffer) @bci=3, line=3456 (Interpreted frame)
 - com.mysql.jdbc.MysqlIO.checkErrorPacket(int) @bci=12, line=3897 (Interpreted frame)
 - com.mysql.jdbc.MysqlIO.sendCommand(int, java.lang.String, com.mysql.jdbc.Buffer, boolean, java.lang.String, int) @bci=438, line=2524 (Interpreted frame)
 - com.mysql.jdbc.MysqlIO.sqlQueryDirect(com.mysql.jdbc.StatementImpl, java.lang.String, java.lang.String, com.mysql.jdbc.Buffer, int, int, int, boolean, java.lang.String, com.mysql.jdbc.Field[]) @bci=559, line=2677 (Interpreted frame)
 - com.mysql.jdbc.ConnectionImpl.execSQL(com.mysql.jdbc.StatementImpl, java.lang.String, int, com.mysql.jdbc.Buffer, int, int, boolean, java.lang.String, com.mysql.jdbc.Field[], boolean) @bci=138, line=2545 (Interpreted frame)
 - com.mysql.jdbc.ConnectionImpl.execSQL(com.mysql.jdbc.StatementImpl, java.lang.String, int, com.mysql.jdbc.Buffer, int, int, boolean, java.lang.String, com.mysql.jdbc.Field[]) @bci=17, line=2503 (Interpreted frame)
 - com.mysql.jdbc.StatementImpl.executeQuery(java.lang.String) @bci=331, line=1369 (Interpreted frame)
 - com.mysql.jdbc.DatabaseMetaData$2.forEach(java.lang.String) @bci=576, line=2443 (Interpreted frame)
 - com.mysql.jdbc.DatabaseMetaData$2.forEach(java.lang.Object) @bci=5, line=2341 (Interpreted frame)
 - com.mysql.jdbc.IterateBlock.doForAll() @bci=25, line=50 (Interpreted frame)
 - com.mysql.jdbc.DatabaseMetaData.getColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String) @bci=88, line=2339 (Interpreted frame)
 - liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData$3.fastFetchQuery() @bci=86, line=362 (Interpreted frame)
 - liquibase.snapshot.ResultSetCache$SingleResultSetExtractor.fastFetch() @bci=1, line=289 (Interpreted frame)
 - liquibase.snapshot.ResultSetCache.get(liquibase.snapshot.ResultSetCache$ResultSetExtractor) @bci=226, line=57 (Interpreted frame)
 - liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData.getColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String) @bci=197, line=324 (Interpreted frame)
 - liquibase.snapshot.jvm.ColumnSnapshotGenerator.addTo(liquibase.structure.DatabaseObject, liquibase.snapshot.DatabaseSnapshot) @bci=77, line=120 (Interpreted frame)
 - liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(liquibase.structure.DatabaseObject, liquibase.snapshot.DatabaseSnapshot, liquibase.snapshot.SnapshotGeneratorChain) @bci=111, line=73 (Interpreted frame)
 - liquibase.snapshot.SnapshotGeneratorChain.snapshot(liquibase.structure.DatabaseObject, liquibase.snapshot.DatabaseSnapshot) @bci=52, line=50 (Interpreted frame)
 - liquibase.snapshot.DatabaseSnapshot.include(liquibase.structure.DatabaseObject) @bci=167, line=246 (Interpreted frame)
 - liquibase.snapshot.DatabaseSnapshot.init(liquibase.structure.DatabaseObject[]) @bci=159, line=80 (Interpreted frame)
 - liquibase.snapshot.DatabaseSnapshot.<init>(liquibase.structure.DatabaseObject[], liquibase.database.Database, liquibase.snapshot.SnapshotControl) @bci=89, line=53 (Interpreted frame)
 - liquibase.snapshot.JdbcDatabaseSnapshot.<init>(liquibase.structure.DatabaseObject[], liquibase.database.Database, liquibase.snapshot.SnapshotControl) @bci=4, line=28 (Interpreted frame)
 - liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(liquibase.structure.DatabaseObject[], liquibase.database.Database, liquibase.snapshot.SnapshotControl) @bci=52, line=150 (Interpreted frame)
 - liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(liquibase.structure.DatabaseObject, liquibase.database.Database, liquibase.snapshot.SnapshotControl) @bci=11, line=158 (Interpreted frame)
 - liquibase.snapshot.SnapshotGeneratorFactory.getDatabaseChangeLogTable(liquibase.snapshot.SnapshotControl, liquibase.database.Database) @bci=46, line=165 (Interpreted frame)
 - liquibase.changelog.StandardChangeLogHistoryService.init() @bci=52, line=103 (Interpreted frame)
 - liquibase.Liquibase.checkLiquibaseTables(boolean, liquibase.changelog.DatabaseChangeLog, liquibase.Contexts, liquibase.LabelExpression) @bci=14, line=1124 (Interpreted frame)
 - liquibase.Liquibase.update(liquibase.Contexts, liquibase.LabelExpression, boolean) @bci=51, line=205 (Interpreted frame)
 - liquibase.Liquibase.update(liquibase.Contexts, liquibase.LabelExpression, java.io.Writer, boolean) @bci=94, line=277 (Interpreted frame)
 - liquibase.Liquibase.update(liquibase.Contexts, liquibase.LabelExpression, java.io.Writer) @bci=5, line=258 (Interpreted frame)
 - liquibase.integration.commandline.Main.doMigration() @bci=3063, line=1156 (Interpreted frame)
 - liquibase.integration.commandline.Main.run(java.lang.String[]) @bci=427, line=188 (Interpreted frame)
 - liquibase.integration.commandline.Main.main(java.lang.String[]) @bci=1, line=103 (Interpreted frame)

Locked ownable synchronizers:
    - None

0 个答案:

没有答案