通过Azure Devops将.Net Core 3.1 Web App部署到Azure Linux Web Service时出错

用户名

我们正在尝试将.Net Core 3.1 Web App Service部署到Azure,并且不断遇到无法确定如何解决的错误。我们正在将其部署到应用服务计划(B1)中进行测试,对于.Net Core 3.1来说,我们只能向Linux发布“代码”。我们已经通过Visual Studio进行了部署,没有任何问题,但是通过Azure Devops进行部署时,它虽然可以成功部署,但是似乎无法运行。有几个错误:

  1. 无法加载/ usr / local / lib / php / extensions / no-debug-non-zts-20151012 / opcache:/ usr / local / lib / php / extensions / no-debug-non-zts-20151012 / opcache:无法打开共享对象文件:没有这样的文件或目录

  2. 无法提供目录/ home / site / wwwroot /:找不到匹配的DirectoryIndex(index.php,index.html,default.htm,default.html,index.htm,index.html,index.php,hostingstart.html),并且选项指令禁止的服务器生成的目录索引

    这是我们的错误日志:

2020-02-11T17:08:00.415853887Z   _____                               
2020-02-11T17:08:00.415890488Z   /  _  \ __________ _________   ____  
2020-02-11T17:08:00.415897789Z  /  /_\  \___   /  |  \_  __ \_/ __ \ 
2020-02-11T17:08:00.415902989Z /    |    \/    /|  |  /|  | \/\  ___/ 
2020-02-11T17:08:00.415907889Z \____|__  /_____ \____/ |__|    \___  >
2020-02-11T17:08:00.415913089Z         \/      \/                  \/ 
2020-02-11T17:08:00.415917789Z A P P   S E R V I C E   O N   L I N U X
2020-02-11T17:08:00.415922690Z 
2020-02-11T17:08:00.415927190Z Documentation: http://aka.ms/webapp-linux
2020-02-11T17:08:00.415931590Z PHP quickstart: https://aka.ms/php-qs
2020-02-11T17:08:00.415936090Z PHP version : 7.0.33
2020-02-11T17:08:00.415940490Z Note: Any data outside '/home' is not persisted
2020-02-11T17:08:00.809232004Z Running oryx -appPath /home/site/wwwroot -output /opt/startup/startup.sh     -bindPort 8080 -startupCommand 'dotnet TestProject.dll; apache2-foreground;'
2020-02-11T17:08:01.052506605Z Oryx Version: 0.2.20191105.2, Commit: 67e159d71419415435cb5d10c05a0f0758ee8809, ReleaseTagName: 20191105.2
2020-02-11T17:08:01.054897394Z Cound not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
2020-02-11T17:08:01.055406213Z Could not find operation ID in manifest. Generating an operation id...
2020-02-11T17:08:01.056002335Z Build Operation ID: dfa49d40-fc36-4418-be4c-4886a385fe91
2020-02-11T17:08:02.861636886Z Writing output script to '/opt/startup/startup.sh'
2020-02-11T17:08:03.264793168Z /opt/startup/startup.sh: 7: /opt/startup/startup.sh: dotnet: not found
2020-02-11T17:08:04.221360854Z AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.16.1.5. Set the 'ServerName' directive globally to suppress this message
2020-02-11T17:08:04.387602773Z AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.16.1.5. Set the 'ServerName' directive globally to suppress this message
2020-02-11T17:08:04.409543294Z Failed loading /usr/local/lib/php/extensions/no-debug-non-zts-20151012/opcache:  /usr/local/lib/php/extensions/no-debug-non-zts-20151012/opcache: cannot open shared object file: No such file or directory
2020-02-11T17:08:04.634700217Z [Tue Feb 11 17:08:04.634541 2020] [mpm_prefork:notice] [pid 28] AH00163: Apache/2.4.25 (Debian) PHP/7.0.33 configured -- resuming normal operations
2020-02-11T17:08:04.635348542Z [Tue Feb 11 17:08:04.634862 2020] [core:notice] [pid 28] AH00094: Command line: 'apache2 -D FOREGROUND'
2020-02-11T17:08:04.646641464Z 172.16.1.1 - - [11/Feb/2020:17:08:04 +0000] "GET /robots933456.txt HTTP/1.1" 404 341 "-" "-"

2020-02-11T17:08:18.196650781Z [Tue Feb 11 17:08:18.171200 2020] [autoindex:error] [pid 41] [client 172.16.1.1:51779] AH01276: Cannot serve directory /home/site/wwwroot/: No matching DirectoryIndex (index.php,index.html,default.htm,default.html,index.htm,index.html,index.php,hostingstart.html) found, and server-generated directory index forbidden by Options directive
2020-02-11T17:08:18.197972531Z 172.16.1.1 - - [11/Feb/2020:17:08:18 +0000] "GET / HTTP/1.1" 403 363 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"

我们已经针对发行版尝试了许多不同的配置,但是似乎没有什么可以超越这一步骤的。这是我们的CI YAML:

CI YAML

这是我们的发布管道配置:

发布管道

任何细节或朝正确方向的推动将不胜感激。我们没有找到太多有关此问题或如何解决此特定错误的文档。

用户名

Although I did select the App Service Plan to be a .Net Core 3.1 application, it seems the App Service itself is not set as such. In order to fix this, you need to go to the Configuration tab of your App Service, go to "General Settings" and make sure you set these settings:

.Net核心堆栈

Note the Major and Minor version do not appear until you select the .Net Core Stack. I wish this was something that was more apparent and automatically set if you set that as your runtime stack when creating your app service plan. I hope this helps anybody else that is also running into this problem.

UPDATE

推送新版本时,我们意识到AzureDevops正在覆盖此堆栈设置。如果用户正在创建发布管道,但是他们没有对Azure的正确访问权限,则不会填充发布中Azure应用服务部署任务中的“运行时堆栈”。具有较高特权的人将看到所有可用的不同选项。当前,选择的选项是“最新(DOTNETCORE |最新)”。当前“ 3.1(DOTNETCORE | 3.1)”不可用。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

将.Net Core 3.0 Web API部署到Azure App Service时出错

来自分类Dev

如何将 ASPNET Core 站点部署到 Azure Linux Web App(无容器)

来自分类Dev

将ASP.NET Core部署到Azure Web App服务错误

来自分类Dev

使用ARM模板和GitHub Actions将.NET Core应用程序部署到Azure Web App

来自分类Dev

我可以将代码从DevOps部署到Linux容器上运行的Azure Web吗?

来自分类Dev

如何将ASP.NET MVC 5 Web App部署到Azure中的虚拟网络

来自分类Dev

如果将ASP.NET Core作为Web应用程序部署到Azure,则用于托管的内容是什么?

来自分类Dev

Azure YAML部署失败,并显示“错误:无法将Web包部署到App Service。冲突(CODE:409)”

来自分类Dev

使用Ninject将Web api 2应用程序部署到Azure时出错

来自分类Dev

在带有IdentityServer4认证/ http错误的Azure Web应用程序容器上部署.net Core 3 Linux容器

来自分类Dev

Net Core 3.0 Linux Azure Web App IHttpContextAccessor具有空上下文

来自分类Dev

Azure .Net Core Web 应用程序的部署变量

来自分类Dev

使用Entity Framework将Web api部署到Azure,工作1小时,现在出现错误500

来自分类Dev

可以将Application Insights与运行.NET Core 3运行时的Linux Web App一起使用吗?

来自分类Dev

Azure Web Apps上的ASP.NET Core,添加Azure Web App诊断会在启动时抛出FileNotFoundException

来自分类Dev

FTP 如何将 .NET Core WebApp 部署到 Azure Linux 应用服务计划

来自分类Dev

将简单的asp.net Web服务部署到Azure

来自分类Dev

使用发布管道将 Asp.net 核心 Web 应用程序部署到 azure vm

来自分类Dev

从Azure DevOps部署到Azure Linux App服务无效

来自分类Dev

在Devops部署期间添加Azure Web App Service自定义域

来自分类Dev

Azure Web App .NET Core启动错误-如何查找原因

来自分类Dev

如何在Azure Web App上更新.NET Core?

来自分类Dev

面向完整框架的ASP.NET Core 1.1无法部署到Azure App Service

来自分类Dev

将Angular App部署到Azure Web Apps Angular 9的问题

来自分类Dev

将Springboot部署到Azure App Service

来自分类Dev

通过EF迁移将ASP.NET Core部署到Azure

来自分类Dev

无法将ASP.NET 5(ASP.NET Core 1)部署到Azure:没有足够的空间

来自分类Dev

部署到Azure时Web.config不正确

来自分类Dev

通过AJAX将JSON对象发布到ASP.NET Core Web API

Related 相关文章

  1. 1

    将.Net Core 3.0 Web API部署到Azure App Service时出错

  2. 2

    如何将 ASPNET Core 站点部署到 Azure Linux Web App(无容器)

  3. 3

    将ASP.NET Core部署到Azure Web App服务错误

  4. 4

    使用ARM模板和GitHub Actions将.NET Core应用程序部署到Azure Web App

  5. 5

    我可以将代码从DevOps部署到Linux容器上运行的Azure Web吗?

  6. 6

    如何将ASP.NET MVC 5 Web App部署到Azure中的虚拟网络

  7. 7

    如果将ASP.NET Core作为Web应用程序部署到Azure,则用于托管的内容是什么?

  8. 8

    Azure YAML部署失败,并显示“错误:无法将Web包部署到App Service。冲突(CODE:409)”

  9. 9

    使用Ninject将Web api 2应用程序部署到Azure时出错

  10. 10

    在带有IdentityServer4认证/ http错误的Azure Web应用程序容器上部署.net Core 3 Linux容器

  11. 11

    Net Core 3.0 Linux Azure Web App IHttpContextAccessor具有空上下文

  12. 12

    Azure .Net Core Web 应用程序的部署变量

  13. 13

    使用Entity Framework将Web api部署到Azure,工作1小时,现在出现错误500

  14. 14

    可以将Application Insights与运行.NET Core 3运行时的Linux Web App一起使用吗?

  15. 15

    Azure Web Apps上的ASP.NET Core,添加Azure Web App诊断会在启动时抛出FileNotFoundException

  16. 16

    FTP 如何将 .NET Core WebApp 部署到 Azure Linux 应用服务计划

  17. 17

    将简单的asp.net Web服务部署到Azure

  18. 18

    使用发布管道将 Asp.net 核心 Web 应用程序部署到 azure vm

  19. 19

    从Azure DevOps部署到Azure Linux App服务无效

  20. 20

    在Devops部署期间添加Azure Web App Service自定义域

  21. 21

    Azure Web App .NET Core启动错误-如何查找原因

  22. 22

    如何在Azure Web App上更新.NET Core?

  23. 23

    面向完整框架的ASP.NET Core 1.1无法部署到Azure App Service

  24. 24

    将Angular App部署到Azure Web Apps Angular 9的问题

  25. 25

    将Springboot部署到Azure App Service

  26. 26

    通过EF迁移将ASP.NET Core部署到Azure

  27. 27

    无法将ASP.NET 5(ASP.NET Core 1)部署到Azure:没有足够的空间

  28. 28

    部署到Azure时Web.config不正确

  29. 29

    通过AJAX将JSON对象发布到ASP.NET Core Web API

热门标签

归档