Umbraco v12 exception at startup when run in Docker
I have upgraded to Umbraco v12 and the debug build runs fine in my development environment but when deployed to a tester's machine as a Docker container the exception shown below is thrown.
The output says to look in Umbraco's log file but the only log files I can find contain the same message.
Noting the reference to ImageSharp middleware I have tried explicitly registering the ImageSharp services by calling services.AddImageSharp() in Startup.ConfigureServices() but this has not helped.
Any ideas?
at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
[04:47:35 ERR] Connection id "0HMSOHP4B1CSC", Request id "0HMSOHP4B1CSC:000000F2": An unhandled exception was thrown by the application.
Umbraco.Cms.Core.Exceptions.BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details.
at Umbraco.Cms.Core.Exceptions.BootFailedException.Rethrow(BootFailedException bootFailedException)
at Umbraco.Cms.Web.Common.Middleware.BootFailedMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Getting the exact same error when upgrading v11.4 to v12.1.1 via nuget. Also looking for solution if anyone has any ideas?
An unhandled exception has occurred while executing the request.","@l":"Error","@x":"Umbraco.Cms.Core.Exceptions.BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details.\r\n at Umbraco.Cms.Core.Exceptions.BootFailedException.Rethrow(BootFailedException bootFailedException)\r\n at Umbraco.Cms.Web.Common.Middleware.BootFailedMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)\r\n at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>cDisplayClass6_1.<1>d.MoveNext()\r\n--- End of stack trace from previous location ---\r\n at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)\r\n at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)","EventId":{"Id":1,"Name":"UnhandledException"},"SourceContext":"Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware","RequestId":"40000006-000b-ff00-b63f-84710c7967bb","RequestPath":"/","ProcessId":27228,"ProcessName":"iisexpress","ThreadId":6,"ApplicationId":"7e4828abc6afcd1418929f125717d09efd6538ef","MachineName":"XXX","Log4NetLevel":"ERROR"}
I also get the same error when creating a blank 12.1.1 site. I'm pointing the DB to a 11.4 database so I can upgrade - exact same error again.
dotnet new install Umbraco.Templates (updated to 12.1.1)
Run dotnet new umbraco --name MyProject to create a new project
BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details.
Umbraco.Cms.Core.Exceptions.BootFailedException.Rethrow(BootFailedException bootFailedException)
Umbraco.Cms.Web.Common.Middleware.BootFailedMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>cDisplayClass6_1+<1>d.MoveNext()
SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, bool retry)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Show raw exception details
Umbraco.Cms.Core.Exceptions.BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details.
at Umbraco.Cms.Core.Exceptions.BootFailedException.Rethrow(BootFailedException bootFailedException)
at Umbraco.Cms.Web.Common.Middleware.BootFailedMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>cDisplayClass6_1.<1>d.MoveNext()
--- End of stack trace from previous location ---
at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Just in case it helps anyone I solved this by reverting the version of Umbraco.Templates to 12.0.0, installing and then running the upgrade against the v11.3 db. Then moved to v12.1.1 via nuget.
It turns out that our issue was caused by an incorrect database connection string used in our Docker deployment. The call stack mention of ImageSharpMiddleware seems to be a bit of a red herring.
In this case the connection string for our test environment needed to have ;TrustServerCertificate=True appended as the default used by the .NET SQL database library is now False.
Umbraco v12 exception at startup when run in Docker
I have upgraded to Umbraco v12 and the debug build runs fine in my development environment but when deployed to a tester's machine as a Docker container the exception shown below is thrown.
The output says to look in Umbraco's log file but the only log files I can find contain the same message.
Noting the reference to ImageSharp middleware I have tried explicitly registering the ImageSharp services by calling services.AddImageSharp() in Startup.ConfigureServices() but this has not helped.
Any ideas?
at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application) [04:47:35 ERR] Connection id "0HMSOHP4B1CSC", Request id "0HMSOHP4B1CSC:000000F2": An unhandled exception was thrown by the application. Umbraco.Cms.Core.Exceptions.BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details. at Umbraco.Cms.Core.Exceptions.BootFailedException.Rethrow(BootFailedException bootFailedException) at Umbraco.Cms.Web.Common.Middleware.BootFailedMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Getting the exact same error when upgrading v11.4 to v12.1.1 via nuget. Also looking for solution if anyone has any ideas?
An unhandled exception has occurred while executing the request.","@l":"Error","@x":"Umbraco.Cms.Core.Exceptions.BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details.\r\n at Umbraco.Cms.Core.Exceptions.BootFailedException.Rethrow(BootFailedException bootFailedException)\r\n at Umbraco.Cms.Web.Common.Middleware.BootFailedMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)\r\n at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>cDisplayClass6_1.<1>d.MoveNext()\r\n--- End of stack trace from previous location ---\r\n at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)\r\n at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)","EventId":{"Id":1,"Name":"UnhandledException"},"SourceContext":"Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware","RequestId":"40000006-000b-ff00-b63f-84710c7967bb","RequestPath":"/","ProcessId":27228,"ProcessName":"iisexpress","ThreadId":6,"ApplicationId":"7e4828abc6afcd1418929f125717d09efd6538ef","MachineName":"XXX","Log4NetLevel":"ERROR"}
I also get the same error when creating a blank 12.1.1 site. I'm pointing the DB to a 11.4 database so I can upgrade - exact same error again.
dotnet new install Umbraco.Templates (updated to 12.1.1) Run dotnet new umbraco --name MyProject to create a new project
BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details. Umbraco.Cms.Core.Exceptions.BootFailedException.Rethrow(BootFailedException bootFailedException) Umbraco.Cms.Web.Common.Middleware.BootFailedMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>cDisplayClass6_1+<1>d.MoveNext() SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, bool retry) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Show raw exception details Umbraco.Cms.Core.Exceptions.BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details. at Umbraco.Cms.Core.Exceptions.BootFailedException.Rethrow(BootFailedException bootFailedException) at Umbraco.Cms.Web.Common.Middleware.BootFailedMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>cDisplayClass6_1.<1>d.MoveNext() --- End of stack trace from previous location --- at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Just in case it helps anyone I solved this by reverting the version of Umbraco.Templates to 12.0.0, installing and then running the upgrade against the v11.3 db. Then moved to v12.1.1 via nuget.
It turns out that our issue was caused by an incorrect database connection string used in our Docker deployment. The call stack mention of ImageSharpMiddleware seems to be a bit of a red herring.
In this case the connection string for our test environment needed to have
;TrustServerCertificate=True
appended as the default used by the .NET SQL database library is nowFalse
.is working on a reply...