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
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

408 views 5 9
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