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 Register to answer

Stay in touch

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