I’ve been trying to upgrade our gitea from 1.12.6 (production) to 1.14.4
Unfortunately, after the upgrade, gitea refuses to start and throws bad gateway in the nginx front-end and a small delay later the service stops.
Looking at the log file there’s a big spew of errors about the database.
Do i have to watershed through a specific version for this upgrade to handle the db updates?
What do the errors say? What is the value in the “version” table in the database? Does it show that the migrations have completed? I am assuming you are using linux, but how do you have gitea installed (docker, binary, snap)?
Sorry for not providing more information straight up I thought this was a “yeah go through version x” thing with a big version jump like that.
OS: Centos 7
Installed from binary
Running as a service
Cleared the log before upgrade attempt.
Pastebin of the resulting log gitea upgrade log - Pastebin.com
Pastebin of scrubbed app.ini gitea appini - Pastebin.com
It’ll just keep spinning and add more to the log until I stop it. There is no indication of completed conversion.
Database version in the version table after running this is 178
No idea, anyone?
I want to upgrade among other things because I want to start using hCaptcha; image captcha simply isn’t good enough any more (and i refuse to use Google’s discriminating abomination) as spam is on the rise.
So I wouldn’t worry about the log messages regarding sql as they are all just warnings
[W], and that your migration value is 178 which means that all migrations were successful for 1.14. There is likely something else in the logs that would say why it is failing. Are you able to run the gitea binary via CLI using all the same params that are provided to the service (such as same env vars, same working directory, and same CLI flags)? That way once it fails via CLI the service won’t try to restart it and you can get last line of the log that Gitea provides.
Here is also a good document for getting information needed for debugging from the logs: Advanced: Logging Configuration - Docs
Right, so I haven’t had time to try this again until today.
The migration and startup failure log in debug mode is at gitea migration+startup failure log - Pastebin.com
it just fails hard after the last line, then the service restarts. I didn’t have much luck running it from cli so decided to just halt the service after a few cycles.
I had the bright idea to check my
messages log in the OS and lo and behold it provided a clue.
go panicked because it couldn’t find “AvatarLink” that is used in our custom templates and just dumped its process without info.
What was that changed to?
Looks like a lot more has changed… so this basically means we have to completely redo our templates? … Is this documented anywhere from version to version?
Some larger changes (such as one upcoming in 1.15), are documented as breaking changes (with how to remedy the diff), however as in theory any change to the template is breaking for those with custom templates, we do recommend doing a diff of any custom template with the template from the version.