BitBucket migration error (liquibase.exception.LockException)

Hi, I try to migrate BitBucket 4.9.1 DB from Oracle 10.2.0.5 to PostgreSQL 9.5.4 by the migration GUI, but the process stop and give me an error (liquibase.exception.LockException): "Could not lock Liquibase change log".

I try to Shut down the SSH server but nothing change.

Is impossible to migrate to newest Bitbucket version because the supported platform compatibility with my Oracle DB version is depracated explicity by the specification (https://confluence.atlassian.com/bitbucketserver0410/supported-platforms-858573806.html)

Bitbucket version 4.9.1 now works fine with Oracle 10.2 but this state of the art is not acceptable 

Migrate from Oracle 10.2.0.5 to Oracle 11g and after migrate to PostgreSQL maybe can solve the problem? is this a valid alternative?

1 answer

Could not lock Liquibase change log; nested exception is liquibase.exception.LockException: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE databasechangeloglock (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP WITH TIME ZONE, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on ... INSERT INTO databasechangeloglock (ID, LOCKED) VALUES (1, FALSE): ERROR: relation "databasechangeloglock" already exists              com.atlassian.stash.internal.backup.liquibase.DefaultLiquibaseDao.lock(DefaultLiquibaseDao.java:469)                com.atlassian.stash.internal.backup.liquibase.DefaultLiquibaseDao.withLock(DefaultLiquibaseDao.java:332)                com.atlassian.stash.internal.backup.liquibase.DefaultLiquibaseMigrationDao.restore(DefaultLiquibaseMigrationDao.java:172)                ...

liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE databasechangeloglock (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP WITH TIME ZONE, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:...INSERT INTO databasechangeloglock (ID, LOCKED) VALUES (1, FALSE): ERROR: relation "databasechangeloglock" already exists

                liquibase.lockservice.LockService.acquireLock(LockService.java:121)

                liquibase.lockservice.LockService.waitForLock(LockService.java:61)               com.atlassian.stash.internal.backup.liquibase.DefaultLiquibaseDao.lock(DefaultLiquibaseDao.java:465) 

Error executing SQL CREATE TABLE databasechangeloglock (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP WITH TIME ZONE, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:... INSERT INTO databasechangeloglock (ID, LOCKED) VALUES (1, FALSE): ERROR: relation "databasechangeloglock" already exists

                liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62)

                liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104)

                liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:70)

ERROR: relation "databasechangeloglock" already exists         org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2182)

                org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1911)

                org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:173)

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

649 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot