Issue upgrading the database when upgrading Umbraco from 12 to 13
Hi community.
I experienced an upgrade issue, when upgrading Umbraco from version 12 to 13.
I have used the guide here, I have done all of the steps in guide, but without moving my code in the startup.cs.
After getting the project to compile, I can run it and it shows the maintains page. When I then go to /Umbraco and tries to do the database upgrade, I get this error page without any guidance.
I also tried to view the logs, but there is not much useful information here.
What would be the next step to do?
Should I try to migrate the startup.cs file?
My database is hosted on Azure, but the upgrade I’m trying to complete is done locally.
This is the info the log gives me.
{"@t":"2024-04-10T07:23:37.9040093Z","@mt":"Acquired MainDom.","SourceContext":"Umbraco.Cms.Core.Runtime.MainDom","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
{"@t":"2024-04-10T07:23:38.9454228Z","@mt":"Starting recurring background jobs hosted services","SourceContext":"Umbraco.Cms.Infrastructure.BackgroundJobs.RecurringBackgroundJobHostedServiceRunner","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
{"@t":"2024-04-10T07:23:38.9497154Z","@mt":"Starting background hosted service for {job}","job":"HealthCheckNotifierJob","SourceContext":"Umbraco.Cms.Infrastructure.BackgroundJobs.RecurringBackgroundJobHostedServiceRunner","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
{"@t":"2024-04-10T07:23:38.9681838Z","@mt":"Starting background hosted service for {job}","job":"KeepAliveJob","SourceContext":"Umbraco.Cms.Infrastructure.BackgroundJobs.RecurringBackgroundJobHostedServiceRunner","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
{"@t":"2024-04-10T07:23:38.9694205Z","@mt":"Starting background hosted service for {job}","job":"LogScrubberJob","SourceContext":"Umbraco.Cms.Infrastructure.BackgroundJobs.RecurringBackgroundJobHostedServiceRunner","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
{"@t":"2024-04-10T07:23:38.9707924Z","@mt":"Starting background hosted service for {job}","job":"ContentVersionCleanupJob","SourceContext":"Umbraco.Cms.Infrastructure.BackgroundJobs.RecurringBackgroundJobHostedServiceRunner","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
{"@t":"2024-04-10T07:23:38.9721787Z","@mt":"Starting background hosted service for {job}","job":"ScheduledPublishingJob","SourceContext":"Umbraco.Cms.Infrastructure.BackgroundJobs.RecurringBackgroundJobHostedServiceRunner","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
{"@t":"2024-04-10T07:23:38.9732449Z","@mt":"Starting background hosted service for {job}","job":"TempFileCleanupJob","SourceContext":"Umbraco.Cms.Infrastructure.BackgroundJobs.RecurringBackgroundJobHostedServiceRunner","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
{"@t":"2024-04-10T07:23:38.9743693Z","@mt":"Starting background hosted service for {job}","job":"InstructionProcessJob","SourceContext":"Umbraco.Cms.Infrastructure.BackgroundJobs.RecurringBackgroundJobHostedServiceRunner","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
{"@t":"2024-04-10T07:23:38.9759250Z","@mt":"Starting background hosted service for {job}","job":"TouchServerJob","SourceContext":"Umbraco.Cms.Infrastructure.BackgroundJobs.RecurringBackgroundJobHostedServiceRunner","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
{"@t":"2024-04-10T07:23:38.9780192Z","@mt":"Starting background hosted service for {job}","job":"WebhookFiring","SourceContext":"Umbraco.Cms.Infrastructure.BackgroundJobs.RecurringBackgroundJobHostedServiceRunner","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
{"@t":"2024-04-10T07:23:38.9798170Z","@mt":"Starting background hosted service for {job}","job":"WebhookLoggingCleanup","SourceContext":"Umbraco.Cms.Infrastructure.BackgroundJobs.RecurringBackgroundJobHostedServiceRunner","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
{"@t":"2024-04-10T07:23:38.9896600Z","@mt":"Starting background hosted service for {job}","job":"ReportSiteJob","SourceContext":"Umbraco.Cms.Infrastructure.BackgroundJobs.RecurringBackgroundJobHostedServiceRunner","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
{"@t":"2024-04-10T07:23:38.9902929Z","@mt":"Completed starting recurring background jobs hosted services","SourceContext":"Umbraco.Cms.Infrastructure.BackgroundJobs.RecurringBackgroundJobHostedServiceRunner","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
{"@t":"2024-04-10T07:23:43.0143850Z","@mt":"Umbraco is in {mode} mode, so uSync will not run this time.","mode":"Upgrade","SourceContext":"uSync.BackOffice.Notifications.uSyncApplicationStartingHandler","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
{"@t":"2024-04-10T07:23:43.0562223Z","@mt":"Application started. Press Ctrl+C to shut down.","SourceContext":"Microsoft.Hosting.Lifetime","ProcessId":21408,"ProcessName":"iisexpress","ThreadId":1,"ApplicationId":"3816df289547b37f3141880f3b6b78067f10f518","MachineName":"computer","Log4NetLevel":"INFO "}
It does not seem to be the problem. The timestamp does match where I tried to do the upgrade. I don't think I can rule it out though... Any suggestion on what to do? I could try to scale it to a general purpose tier, and see if there is any changes.
Also, looking at your screenshot, I can see that the currentState key lines up with v12, and the newState key lines up with a migration in v13.0.0:
I had a look into the Umbraco source code, and I can see that it is showing v13.0.0 as the old version, because the logic that gets that version simply gets the current installed major version (in this case v13.0.0), conveniently there's a todo saying it could be better lol
Source code: UpgradeSettingsFactory.cs
But that doesn't explain why your upgrade is failing, hopefully there's something more useful in the debug logging 🤞
I tied to add verbose logging, but nothing came out of it, that I haven't posted on this thread.
I tried to put in new values in the database for Umbraco.Core.Upgrader.State+Umbraco.Core, but that has not helped, and the report is still wrong when comparing versions.
I followed a guide on how to upgrade umbraco, and there are a couple of things I could still try. I have not switch to the "minimal API hosting" setup introduces for umbraco in version 13, but in the guide I was using, upgrading was the first step.
Other thing I can try to do is to run the "Run an unattended upgrade"
I think that would get me past the problems of the upgrade wizard, but I'm unsure if I would run into any trouble
I copied my test database, and set the "Unattended Upgrade" to true, and then started the project.
The project is up and running again, but I'm unsure if the upgrade is important to do, or if there is any unknown consequences of this method. I can update content again & create pages. My Plugin works as well.
Issue upgrading the database when upgrading Umbraco from 12 to 13
Hi community.
I experienced an upgrade issue, when upgrading Umbraco from version 12 to 13.
I have used the guide here, I have done all of the steps in guide, but without moving my code in the startup.cs. After getting the project to compile, I can run it and it shows the maintains page. When I then go to /Umbraco and tries to do the database upgrade, I get this error page without any guidance.
I also tried to view the logs, but there is not much useful information here.
What would be the next step to do?
Should I try to migrate the startup.cs file?
My database is hosted on Azure, but the upgrade I’m trying to complete is done locally.
This is the info the log gives me.
check that you sql server not reaching maximum DTU during upgrade
Hi Yakov.
It does not seem to be the problem. The timestamp does match where I tried to do the upgrade. I don't think I can rule it out though... Any suggestion on what to do? I could try to scale it to a general purpose tier, and see if there is any changes.
The error also happens imminently
I tried to upgrade the database aswell, and try again. Still it won't work
I tried to look at the network tab when posting and I noticed something:
In the PostPerformInstall states that the oldVersion is 13.0.0. but the actual oldVersion is 12.1.2. Why is that, and where does that data come from?
very strange, I think you need to see more logs by changes log level to debug,
Additional idea: azure database is not very fast, can you try to run upgrade on local database?
Hi again Yakov.
How can I turn on a more detailed logging? I can't really find anything in the documentation.
Hi Yakov.
Can you give me suggestion to how I can turn on detailed logging?
You can enable Debug logging by changing the default log level in your app-settings:
Here's the documentation for it: https://docs.umbraco.com/umbraco-cms/reference/configuration/serilog
Also, looking at your screenshot, I can see that the
currentState
key lines up with v12, and thenewState
key lines up with a migration in v13.0.0:I had a look into the Umbraco source code, and I can see that it is showing
v13.0.0
as the old version, because the logic that gets that version simply gets the current installed major version (in this case v13.0.0), conveniently there's a todo saying it could be better lol Source code: UpgradeSettingsFactory.csBut that doesn't explain why your upgrade is failing, hopefully there's something more useful in the debug logging 🤞
Hi Owain and thanks for helping out.. :)
I tied to add verbose logging, but nothing came out of it, that I haven't posted on this thread.
I tried to put in new values in the database for Umbraco.Core.Upgrader.State+Umbraco.Core, but that has not helped, and the report is still wrong when comparing versions.
I followed a guide on how to upgrade umbraco, and there are a couple of things I could still try. I have not switch to the "minimal API hosting" setup introduces for umbraco in version 13, but in the guide I was using, upgrading was the first step.
Other thing I can try to do is to run the "Run an unattended upgrade" I think that would get me past the problems of the upgrade wizard, but I'm unsure if I would run into any trouble
Hi short update.
I copied my test database, and set the "Unattended Upgrade" to true, and then started the project.
The project is up and running again, but I'm unsure if the upgrade is important to do, or if there is any unknown consequences of this method. I can update content again & create pages. My Plugin works as well.
It's seems okay, but still I'm a bit concerned :)
is working on a reply...