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

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

0 vote

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

22,317 views 26 12
Join discussion

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