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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

31,339 views 26 12
Join discussion

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