Job failed due to exit code -2146232576
See original GitHub issuePlease provide a succinct description of the issue. Azure Webjob Host in portal doesn’t run the webjob but gives following error. Local execution of the webjob in VS2019 runs perfectly fine.
[10/18/2019 13:37:18 > 51e489: SYS ERR ] Job failed due to exit code -2146232576
[10/18/2019 13:37:18 > 51e489: SYS INFO] Process went down, waiting for 60 seconds
[10/18/2019 13:37:18 > 51e489: SYS INFO] Status changed to PendingRestart
Repro steps
Create a webjob targeting framework 4.8. Relevant project file snippet below -
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<LangVersion>latest</LangVersion>
<OutputType>Exe</OutputType>
<TargetFramework>net48</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Storage.Blob" Version="11.1.0" />
<PackageReference Include="Microsoft.Azure.Storage.Common" Version="11.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="3.0.2" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="3.1.1" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.8" />
<PackageReference Include="Microsoft.Azure.WebJobs.Logging.ApplicationInsights" Version="3.0.13" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="System.Spatial" Version="5.8.4" />
<PackageReference Include="Microsoft.Data.Edm" Version="5.8.4" />
<PackageReference Include="Microsoft.Data.OData" Version="5.8.4" />
<PackageReference Include="Microsoft.Data.Services.Client" Version="5.8.4" />
<PackageReference Include="Microsoft.WindowsAzure.ConfigurationManager" Version="3.2.3" />
<PackageReference Include="Microsoft.Azure.WebJobs.Core" Version="3.0.13" />
<PackageReference Include="Microsoft.Azure.KeyVault.Core" Version="3.0.4" />
</ItemGroup>
Deploy the webjob to Azure. In my case it is a service bus subscription trigger function but I don’t think it is relevant as the host is failing much before.
Expected behavior
Provide a description of the expected behavior. Webjob host should initialize the function and run it fine. If any error, I am expecting some more information which could hint what might be going wrong.
Actual behavior
Host gives a cryptic error.
Known workarounds
Provide a description of any known workarounds. ¯_(ツ)_/¯
Related information
Another webjob with lower runtime is working fine.
Based on the issue here: https://github.com/Azure/app-service-announcements/issues/89, I tried to find the runtime version installed. I executed below query which suggests the host VM has .NET 4.7.2. How can I get 4.8 on this box?
reg query "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" /v Release
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
Release REG_DWORD 0x70bf6
Provide any related information
- Package version
- Links to source
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7
Top GitHub Comments
The root of the problem was with VS tooling. Changing the framework version in the project through the project property page doesn’t automatically change the app.config. Note that the webjob was originally created with the full framework version 4.8. Obviously, since the Azure AppServices still is on 4.7.2 at the moment of writing this comment, the webjob failed with the cryptic error. I changed the webjob’s target framework to 4.7 and other lower versions but none of them worked. It turned out that changing the project property doesn’t change the following snippet which exists in the app.config file. One must manually change it to 4.7 or lower for it to work in the AppService environment in Azure. This was the resolution to the problem. Possibly, some documentation can be added to those who stumble over this problem and are finding hard deciphering the cryptic system error codes.
I shouldn’t be closing this issue. Please take a look and have an appropriate resolution.