Issue migrating to Postgresql

Hi there,

We're trying to migrate from the build in database to Postgresql 9.6

Unfortunatly everytime we try to do it the process fails.

These are Bitbucket logs...

2017-07-24 17:23:50,771 WARN  [threadpool:thread-1] admin @XB7B6Wx1043x48x0 2ogip0 109.232.61.200,127.0.0.1 "POST /admin/db/edit HTTP/1.1" c.a.s.i.m.DefaultMaintenanceTaskMonitor MIGRATION maintenance has failed (Cause: MigrationException: Bitbucket could not be migrated to the new database. Some data may have already been written to the new database leaving it in an inconsistent state. You will need to empty or recreate the new database before trying again.)
com.atlassian.stash.internal.migration.MigrationException: Bitbucket could not be migrated to the new database. Some data may have already been written to the new database leaving it in an inconsistent state. You will need to empty or recreate the new database before trying again.
        at com.atlassian.stash.internal.maintenance.migration.DatabaseMigrationTask.convertToMigrationException(DatabaseMigrationTask.java:86)
        at com.atlassian.stash.internal.maintenance.migration.DatabaseMigrationTask.run(DatabaseMigrationTask.java:51)
        at com.atlassian.stash.internal.maintenance.DefaultMaintenanceTaskMonitor.run(DefaultMaintenanceTaskMonitor.java:212)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at com.atlassian.stash.internal.concurrent.DefaultTransferableStateManager$StateTransferringRunnable.run(DefaultTransferableStateManager.java:166)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.lang.Thread.run(Thread.java:745)
        ... 1 frame trimmed
Caused by: com.atlassian.stash.internal.backup.BackupException: A backup file could not be created.
        at com.atlassian.stash.internal.maintenance.backup.BackupPhase.run(BackupPhase.java:77)
        at com.atlassian.stash.internal.maintenance.CompositeMaintenanceTask$Step.run(CompositeMaintenanceTask.java:130)
        at com.atlassian.stash.internal.maintenance.CompositeMaintenanceTask.run(CompositeMaintenanceTask.java:69)
        at com.atlassian.stash.internal.maintenance.CompositeMaintenanceTask$Step.run(CompositeMaintenanceTask.java:130)
        at com.atlassian.stash.internal.maintenance.CompositeMaintenanceTask.run(CompositeMaintenanceTask.java:69)
        at com.atlassian.stash.internal.maintenance.MaintenanceModePhase.run(MaintenanceModePhase.java:27)
        at com.atlassian.stash.internal.maintenance.migration.BaseMigrationTask.run(BaseMigrationTask.java:68)
        at com.atlassian.stash.internal.maintenance.migration.DatabaseMigrationTask.run(DatabaseMigrationTask.java:49)
        ... 11 common frames omitted
Caused by: org.hsqldb.HsqlException: lob is no longer valid
        at org.hsqldb.error.Error.error(Unknown Source)
        at org.hsqldb.error.Error.error(Unknown Source)
        at org.hsqldb.persist.LobManager.getLength(Unknown Source)
        at org.hsqldb.Session.performLOBOperation(Unknown Source)
        at org.hsqldb.Session.execute(Unknown Source)
        at org.hsqldb.types.ClobDataID.length(Unknown Source)
        at org.hsqldb.jdbc.JDBCResultSet.getString(Unknown Source)
        at com.zaxxer.hikari.pool.HikariProxyResultSet.getString(HikariProxyResultSet.java)
        at liquibase.util.JdbcUtils.getResultSetValue(JdbcUtils.java:100)
        at com.atlassian.stash.internal.backup.liquibase.DefaultLiquibaseDao.getValue(DefaultLiquibaseDao.java:458)
        at com.atlassian.stash.internal.backup.liquibase.DefaultLiquibaseDao.forCurrentRow(DefaultLiquibaseDao.java:448)
        at com.atlassian.stash.internal.backup.liquibase.DefaultLiquibaseDao.forEachRow(DefaultLiquibaseDao.java:207)
        at com.atlassian.stash.internal.backup.liquibase.DefaultLiquibaseMigrationDao.writeXmlForTable(DefaultLiquibaseMigrationDao.java:137)
        at com.atlassian.stash.internal.backup.liquibase.DefaultLiquibaseMigrationDao.writeXmlForTables(DefaultLiquibaseMigrationDao.java:121)
        at com.atlassian.stash.internal.backup.liquibase.DefaultLiquibaseMigrationDao.backup(DefaultLiquibaseMigrationDao.java:74)
        at com.atlassian.stash.internal.maintenance.backup.DatabaseBackupStep.run(DatabaseBackupStep.java:82)
        at com.atlassian.stash.internal.maintenance.CompositeMaintenanceTask$Step.run(CompositeMaintenanceTask.java:130)
        at com.atlassian.stash.internal.maintenance.CompositeMaintenanceTask.run(CompositeMaintenanceTask.java:69)
        at com.atlassian.stash.internal.maintenance.backup.BackupPhase.run(BackupPhase.java:73)
        ... 18 common frames omitted


and on the postgres side we get just get the following logs...

2017-07-24 17:23:41.418 BST [7627] stashdb3@stashdb3 STATEMENT:  select count(*) from public.databasechangeloglock
2017-07-24 17:26:34.195 BST [7703] postgres@postgres ERROR:  relation "public.databasechangeloglock" does not exist at character 22


Neither of which come accross as being particularly helpful.

2 answers

This widget could not be displayed.

Hi there,

Haven't had any replies on this.

Does anyone know if there's an issue migrating to postgres 9.6 on the latest version of Stash?

 

Thanks

Richard

This widget could not be displayed.

Hi Richard! I've seen you already have a Support ticket regarding this issue and you're already getting assistance there. If you need anything else, please contact us via that ticket and be'll be more than happy to continue helping you.

Best regards :)

Ana 

 

 

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published 10 hours ago in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

39 views 0 5
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