Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket startup fails after a DB restore

perfecto25 October 12, 2017

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

 

 

3 answers

0 votes
support October 25, 2019

Anyone has a the answer?

  

0 votes
Stefan Derungs May 22, 2019

I'm running into the exact same issue with postgres 9.6.

How did you solve the issue back then?

0 votes
perfecto25 October 12, 2017

BBucket 5.4.0

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

centos 6.8

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events