Linux 上的 Azure 网络应用突然停止工作

问题描述

我在 Azure Web 应用 (Linux) 上部署了一个基于 .NET Core 5 的 Web 应用程序。 Web 应用的部署通过 Azure DevOps 进行,最后一次部署发生在 4 月底,没有人以任何形式接触 Web 应用。

但是,应用程序突然停止并以认的 Azure 页面“您的应用服务已启动并正在运行”进行响应。 根据 AppInsights 的说法,该应用程序没有承受任何沉重的负载,只有少数人在 Web 上使用 cpu 和 RAM 大约 20%。 “始终开启”设置已开启。

根据下面的日志,我假设运行我的 web 应用程序的机器由于某种原因重新启动(我猜是 Azure 维护)我看到它无法找到启动所需的文件,因此它使用认的 Azure 页面.但是,我不明白为什么文件在那里,此外,正如您在 9:52 看到的,我们通过 Azure 门户手动重新启动了 Web 应用程序并解决了问题。

我正在寻求有关防止这种行为的建议,因为这是第二次发生,第一次发生在 5 个月前。谢谢


/appsvctmp/volatile/logs/runtime/bf30e8c59ba178a56a30e0d094f31d1ca4dfed5fef11f3a5f521ec418a4f26a0.log 
2021-06-10T09:52:45.113197498Z: [INFO]  ASP .NETCore Version: 5.0.3
2021-06-10T09:52:45.113202598Z: [INFO]  Note: Any data outside '/home' is not persisted
2021-06-10T09:52:45.136558888Z: [INFO]  Running oryx create-script -appPath /home/site/wwwroot -output /opt/startup/startup.sh -defaultAppFilePath /defaulthome/hostingstart/hostingstart.dll     -bindPort 8080 -userStartupCommand '' 
2021-06-10T09:52:45.143249243Z: [INFO]  Cound not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
2021-06-10T09:52:45.143290643Z: [INFO]  Could not find operation ID in manifest. Generating an operation id...
2021-06-10T09:52:45.143644646Z: [INFO]  Build Operation ID: d16c01f9-bcff-40dc-9efb-5ece15c2dbdc
2021-06-10T09:52:46.219921700Z: [INFO]  Writing output script to '/opt/startup/startup.sh'
2021-06-10T09:52:46.609737971Z: [INFO]  Trying to find the startup DLL name...
2021-06-10T09:52:46.609773771Z: [INFO]  Found the startup D name: MyApp.dll
2021-06-10T09:52:46.609780971Z: [INFO]  Running the command: dotnet "MyApp.dll"


/appsvctmp/volatile/logs/runtime/9e3c16f1b56384c8bac17db8e768f5f5099fe35a4991801a6e83e4f337d68c9c.log 
2021-06-10T09:43:08.196901399Z: [INFO]  Build Operation ID: 51765fea-d04c-49e3-b4e4-9a4bbbc68436
2021-06-10T09:43:09.231514603Z: [INFO]  An error occurred while trying to look for '.runtimeconfig.json' files under '/home/site/wwwroot'.
2021-06-10T09:43:09.685030062Z: [INFO]  WARNING: Unable to find the startup DLL name. Could not find any files with extension '.runtimeconfig.json'
2021-06-10T09:43:10.119271456Z: [INFO]  Writing output script to '/opt/startup/startup.sh'
2021-06-10T09:43:10.294162644Z: [INFO]  Trying to find the startup DLL name...
2021-06-10T09:43:10.294223844Z: [INFO]  Running the default app using command: dotnet "/defaulthome/hostingstart/hostingstart.dll"
2021-06-10T09:43:10.460518558Z: [INFO]  Hosting environment: Production
2021-06-10T09:43:10.460618459Z: [INFO]  Content root path: /defaulthome/hostingstart/
2021-06-10T09:43:10.460630159Z: [INFO]  Now listening on: http://[::]:8080
2021-06-10T09:43:10.460634759Z: [INFO]  Application started. Press Ctrl+C to shut down.


/appsvctmp/volatile/logs/runtime/45188b981fba42d5a512175877e15093cac84c9a73b0296a782fb5b64882be69.log 
2021-06-10T09:38:11.131655396Z: [INFO]  Build Operation ID: db220961-7c36-4051-b3f5-668b96e819a9
2021-06-10T09:38:12.454815722Z: [INFO]  An error occurred while trying to look for '.runtimeconfig.json' files under '/home/site/wwwroot'.
2021-06-10T09:38:12.636611612Z: [INFO]  WARNING: Unable to find the startup DLL name. Could not find any files with extension '.runtimeconfig.json'
2021-06-10T09:38:13.064061230Z: [INFO]  Writing output script to '/opt/startup/startup.sh'
2021-06-10T09:38:13.647112171Z: [INFO]  Trying to find the startup DLL name...
2021-06-10T09:38:13.647167671Z: [INFO]  Running the default app using command: dotnet "/defaulthome/hostingstart/hostingstart.dll"
2021-06-10T09:38:14.165655564Z: [INFO]  Hosting environment: Production
2021-06-10T09:38:14.165687265Z: [INFO]  Content root path: /defaulthome/hostingstart/
2021-06-10T09:38:14.165693365Z: [INFO]  Now listening on: http://[::]:8080
2021-06-10T09:38:14.165697865Z: [INFO]  Application started. Press Ctrl+C to shut down.

wwwroot 文件夹下的文件系统

AutoMapper.dll
Cronos.dll
Humanizer.dll
MyApp
MyApp.BackOffice.Rcl.Views.dll
MyApp.BackOffice.Rcl.Views.pdb
MyApp.BackOffice.Rcl.dll
MyApp.BackOffice.Rcl.pdb
MyApp.Domain.dll
MyApp.Domain.pdb
MyApp.Domain.xml
MyApp.Infrastructure.dll
MyApp.Infrastructure.pdb
MyApp.deps.json
MyApp.dll
MyApp.pdb
MyApp.runtimeconfig.json
MyApp.xml
JWT.dll
Joonasw.AspNetCore.SecurityHeaders.dll
MetadataExtractor.dll
Microsoft.AI.DependencyCollector.dll
Microsoft.AI.EventCounterCollector.dll
Microsoft.AI.PerfCounterCollector.dll
Microsoft.AI.ServerTelemetryChannel.dll
Microsoft.AI.WindowsServer.dll
Microsoft.ApplicationInsights.AspNetCore.dll
Microsoft.ApplicationInsights.dll
Microsoft.AspNetCore.Authentication.JwtBearer.dll
Microsoft.AspNetCore.AzureAppServices.HostingStartup.dll
Microsoft.AspNetCore.AzureAppServicesIntegration.dll
Microsoft.AspNetCore.Identity.EntityFrameworkCore.dll
Microsoft.AspNetCore.Mvc.Razor.Extensions.dll
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.dll
Microsoft.AspNetCore.Razor.Language.dll
Microsoft.Azure.keyvault.WebKey.dll
Serilog.Formatting.Compact.dll
Serilog.Settings.Configuration.dll
Serilog.Sinks.ApplicationInsights.dll
Serilog.Sinks.Async.dll
Serilog.Sinks.Console.dll
Serilog.Sinks.Debug.dll
Serilog.Sinks.File.dll
Serilog.Sinks.PeriodicBatching.dll
Serilog.Sinks.Seq.dll
Serilog.Sinks.Slack.dll
Serilog.dll
StarkbankEcdsa.dll
Swashbuckle.AspNetCore.Annotations.dll
Swashbuckle.AspNetCore.Swagger.dll
Swashbuckle.AspNetCore.SwaggerGen.dll
Swashbuckle.AspNetCore.SwaggerUI.dll
System.Composition.AttributedModel.dll
System.Composition.Convention.dll
System.Composition.Hosting.dll
System.Composition.Runtime.dll
System.Composition.TypedParts.dll
System.Configuration.ConfigurationManager.dll
System.Diagnostics.DiagnosticSource.dll
System.Diagnostics.PerformanceCounter.dll
System.IdentityModel.Tokens.Jwt.dll
System.Runtime.Caching.dll
System.Security.Cryptography.ProtectedData.dll
Twilio.dll
XmpCore.dll
appsettings.json
appsettings.production.json
appsettings.staging.json
cs
de
dotnet-aspnet-codegenerator-design.dll
es
fr
it
ja
ko
pl
pt-BR
refs
ru
runtimes

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)