Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Connect to database error

IT Support
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 19, 2018

Hello!

After a storage crash I had to reinstall bitbucket from scratch. The Backup of the database ist postgresql 9.3 but not a dump. It is a file Backup.

I can connect to the DB with pgadmin. But when I setup bitbucket and I connect to the DB I get the following error:

 

The specified target database could not be validated due to an unexpected error. As a result, Bitbucket cannot migrate to the specified database.

Wenn Sie weiterhin Probleme haben, wenden Sie sich an unser Support-Team. Wir helfen Ihnen weiter.

Details ausblenden

The specified target database could not be validated due to an unexpected error. As a result, Bitbucket cannot migrate to the specified database.
	com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:224)
	com.atlassian.stash.internal.migration.DefaultDatabaseMigrationService.validateConfiguration(DefaultDatabaseMigrationService.java:85)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	...
Failed to obtain snapshot. Database type: postgresql; nested exception is liquibase.exception.DatabaseException: org.postgresql.util.PSQLException: ERROR: catalog is missing 2 attribute(s) for relid 163467
	com.atlassian.stash.internal.backup.liquibase.DefaultLiquibaseSession.getSnapshot(DefaultLiquibaseSession.java:77)
	com.atlassian.stash.internal.backup.liquibase.LiquibaseMigrationTarget.hasNoClashingTables(LiquibaseMigrationTarget.java:54)
	com.atlassian.stash.internal.db.DefaultDatabaseValidator.validate(DefaultDatabaseValidator.java:63)
	...
org.postgresql.util.PSQLException: ERROR: catalog is missing 2 attribute(s) for relid 163467
	liquibase.snapshot.ResultSetCache.get(ResultSetCache.java:101)
	liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData.getColumns(JdbcDatabaseSnapshot.java:539)
	liquibase.snapshot.jvm.ColumnSnapshotGenerator.addTo(ColumnSnapshotGenerator.java:106)
	...



Can you help me please?
I'm not a DB specialist. :-( And its some kind of urgent as you can assume.... ;-)

bg
Günther Pfannhauser

1 answer

0 votes
Mark A.
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 20, 2018

Hey Günther,

Keying in on the following error snippet:

ERROR: catalog is missing 2 attribute(s) for relid 163467

 it appears that there is some sort of database corruption with your catalog. Your first step is to review their resource before taking any actions and follow their instructions:

https://wiki.postgresql.org/wiki/Corruption

You will likely have to rebuild the database and or restore to a point in time before the corruption as your database catalog is missing entries. Your file system for Bitbucket Server will also need to be restored to that same point in time to ensure that the application and database are in sync. 

-Mark

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events