Bitbucket startup fails after a DB restore

I am working on a DR backup + restore script to get our BB instance up and running. 

we are using Postgres 


I am backing up my BB db using 

pg_dump bitbucket > bitbucket.dump

restoring it 

pg_restore -v -c -d bitbucket bitbucket.dump

no errors during restore 


Starting BB, it tries to create a table databasechangeloglock  (its already there)

I gave the 'atlbitbucket' user all privileges on teh DB, no idea how to get it to start correctly

Caused by: liquibase.exception.LockException: liquibase.exception.DatabaseException: ERROR: no schema has been selected to create in
Position: 14 [Failed SQL: CREATE TABLE databasechangeloglock (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP WITHOUT TIME ZONE, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:242)
at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:170)
at liquibase.Liquibase.update(Liquibase.java:196)
at liquibase.Liquibase.update(Liquibase.java:192)
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:431)
at liquibase.database.ExtendedSpringLiquibase.afterPropertiesSet(ExtendedSpringLiquibase.java:32)
... 5 common frames omitted
Caused by: liquibase.exception.DatabaseException: ERROR: no schema has been selected to create in
Position: 14 [Failed SQL: CREATE TABLE databasechangeloglock (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP WITHOUT TIME ZONE, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:309)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:113)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:103)
at liquibase.lockservice.StandardLockService.init(StandardLockService.java:94)
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:206)
... 10 common frames omitted



This is what the DB looks like (attached img)cap.GIF

 

 

1 answer

BBucket 5.4.0

Postgres: postgresql96-server-9.6.5-1PGDG.rhel6.x86_64

centos 6.8

Suggest an answer

Log in or Join to answer

Stay in touch

Be the first to know what's trending on Atlassian Community

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...

281 views 0 2
Read article
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