-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while upgrading database from 0.32.0 to 0.34.0 #1488
Comments
Hi! the error tells that some other flyway process is currently running. Did you start both containers and the other is still doing migrations maybe? Could you try to only start one container to see if that produces different output? Depending on how many files you have, there is a migration in 0.33.0 that could take a while to complete. |
@eikek Hi! I just start restserver container alone, and it output the same log. I have 80k+ files, so might be there is a timeout problem? |
Hi @ohagene - wow 80k file is quite a lot! This could really take a while to complete (on my machine it took ~1min for ~8000 files). The message about a held advisory lock means that there is still another session open that holds this lock - can this be? Is there maybe joex still running or something like that? You can query all locks via The advisory locks are cleared automatically at the end of the session. So a brute-force way would be to stop postgres (or killing all sessions). Then start only restserver - it should now be able to grab the lock and since there is no other process connected to postgres, it should succeed. |
Mhh so I'm going through the update process now, but I can't make it past version 33. I run docspell with docker-compose, but if I upgrade the restserver and joex to v0.34.0 and restart everything, I get the Any ideas on this?
|
I get the same error as @TheAnachronism. I'm running with docker, tag latest, so it tried updating from v0.34.0 to v0.35.0 but it stopped with the same 1.33.0 migration error. However, for me, migration missmatch checksums are flipped between applied and locally resolved. Changing from latest/v0.35.0 to fixed version v0.34.0 it works again.
|
I'm sorry - this is really getting annoying. The migration did not change, I don't know why it calculates different checksums. In my database, I have the checksum
(or the other checksum). This will apply the migration again. Another way is to simply fix the checksum in the db with an
since it has been applied before, this is ok here. Note, this applies to the checksum problem - it is different to that @ohagene has described! |
Same problem as @enkol and @TheAnachronism. |
@eikek Hi, thank you very much! Finally, it worked! I restarted the postgresql db, and started only restserver container, after about a half day, it successed! |
Thank you @ohagene for the update, I was really curious with this large amount of files. Half a day is pretty long. still. Glad it worked. @Skyr oh that means something is wrong! Are you sure you are deleting from To me it is still not clear why the checksum changed. Is it posslble that you once had a SNAPSHOT version installed? The migration was not changed and as far as I can see here the checksum algorithm only looks at the migration contents. It would be also ok to completely drop the |
@eikek I've tried deleting/updating fixup history as suggested, but with v0.35.0 it results in the same problem, just fails on all migration checksum checks from 1.0.0 on (as @Skyr mentioned). Going back to v0.34.0 after deleting the fixup history entry works and Docspell runs fine again.
|
@eikek Should I open a different issue, as this checksum problem seems to be different from the original issue here and also seems to be related to v0.35.0? |
Yes, I think it's better - I created a new issue #1517. |
OK, so I managed to upgrade to 0.34.0 by dropping the migration-history table. But the upgrade from 34 to 35 still fails. I also tried the same workaround (dropping the migration table) but that won't work either. |
Hi @TheAnachronism thanks for the update. I'll investigate it now under #1517 in the next days. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. This only applies to 'question' issues. Always feel free to reopen or create new issues. Thank you! |
@eikek Did you find anything? |
@TheAnachronism yes we found the cause of the checksum problem. #1517 has all the details. It is a "broken" zlib in the image. This issue was originally about another problem and this got solved I think: #1488 (comment) So I can as well close this one right away. |
I have just pulled the new 0.34.0 docker containers and after starting them I can't connect to the website and I see the following in logs.
The text was updated successfully, but these errors were encountered: