projectkudu / kudu

Kudu is the engine behind git/hg deployments, WebJobs, and various other features in Azure Web Sites. It can also run outside of Azure.
Apache License 2.0
3.13k stars 652 forks source link

Upgrading to .NET8 results in 503 service unavailable errors #3496

Closed Mike-E-angelo closed 12 months ago

Mike-E-angelo commented 1 year ago

For deployment issues, please provide us with the following information:

Repro steps.

your project built successfully on your dev machine but failed on Azure? please write down your build tools and their versions (ie Msbuild 15.1.0.0)

Assigning an AppService to .NET8 results in 503 unavailable errors. No errors are thrown in event log.

Project structures.

in order to reproduce your issue at our end we need a simple github repository that highlights structure of the project

N/A

The log/error given by the failure.

Normally this include a stack trace, error code and some more information.

None are provided, only that the service is unavailable. I have a priority B ticket out to Azure Support, but they have taken a week to simply find my instance πŸ™„, so am branching out here for potential further assistance. I feel this is a possible infrastructure bug with the new .NET8 bits.

Debug your Azure website remotely.

it is recommanded that you share your Web App name, directly or indirectly we can take a look at what's going on.

Mention any other details that might be useful.

Note that I have a testing environment where this does not occur and .NET8 runs as expected. In the slot above, I have attempted to upgrade the code to .NET8 as well as reverting to .NET7, but both result in 503 errors if .NET8 is applied in Configuration -> General Settings


Thanks! We'll be in touch soon.

You're welcome. 😊 Thank you for all your efforts out there πŸ™

Mike-E-angelo commented 12 months ago

Upon compiling my application for self-contained it appears that some package references were being downgraded:

..\home\Starbeam\Starbeam.csproj(0,0): Error NU1605: Warning As Error: Detected package downgrade: System.Runtime.Handles from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version. 
 Starbeam -> Serilog.Enrichers.ExceptionStackTraceHash 1.3.0 -> System.Diagnostics.StackTrace 4.0.1 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Runtime.Handles (>= 4.3.0) 
 Starbeam -> Serilog.Enrichers.ExceptionStackTraceHash 1.3.0 -> System.Diagnostics.StackTrace 4.0.1 -> System.IO.FileSystem 4.0.1 -> System.Runtime.Handles (>= 4.0.1)
..\home\Starbeam.Presentation\Starbeam.Presentation.csproj(0,0): Error NU1605: Warning As Error: Detected package downgrade: System.IO.FileSystem.Primitives from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version. 
 Starbeam.Presentation -> Starbeam -> Serilog.Enrichers.ExceptionStackTraceHash 1.3.0 -> System.Diagnostics.StackTrace 4.0.1 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.IO.FileSystem.Primitives (>= 4.3.0) 
 Starbeam.Presentation -> Starbeam -> Serilog.Enrichers.ExceptionStackTraceHash 1.3.0 -> System.Diagnostics.StackTrace 4.0.1 -> System.IO.FileSystem 4.0.1 -> System.IO.FileSystem.Primitives (>= 4.0.1)

Following the guidance and applying direct references addressed one of the issues. However, setting the slot's General Settings -> .NET version to .NET 8 (LTS) (Early Access) still produced the 503. Setting this value to .NET 7 (STS) removed the 503 and the application now runs as expected.

I am not sure what is causing the 503 and neither does Azure Support. They are looking into it. It appears to be a file not found exception that is not generating a lot of details for them.

As I am unblocked I am closing this issue.