【问题标题】:AWS Beanstalk Platform .NET Core running on 64bit Amazon Linux 2/2.0.2 Publish Version Error在 64 位 Amazon Linux 2/2.0.2 发布版本错误上运行的 AWS Beanstalk 平台 .NET Core
【发布时间】:2020-12-29 20:01:22
【问题描述】:

, 我正在尝试使用 Azure DevOps Pipeline 发布我的 Elastic Beanstalka .NetCore 项目,但 Azure DevOps Pipeline 也出现在 Beanstalk Publish 中,在还原、构建、发布步骤中没有任何问题,但我得到了AWS Beanstalka 日志文件中的以下错误。 .Net Core 2.2 项目 AWS文档中:https://docs.amazonaws.cn/en_us/elasticbeanstalk/latest/platforms/platforms-supported.html#platforms-supported.dotnetlinux

[INFO] Executing instruction: RunAppDeployPreBuildHooks
[INFO] The dir .platform/hooks/prebuild/ does not exist in the application. Skipping this step...
[INFO] Executing instruction: CheckProcfileForDotNetCoreApplication
[INFO] checking application and updating executable file permissions...
[INFO] checking Procfile...
[ERROR] An error occurred during execution of command [app-deploy] - [CheckProcfileForDotNetCoreApplication]. Stop running the command. Error: there is no .runtimeconfig.json file for your single application. Please provide a valid application 

【问题讨论】:

  • 你知道.runtimeconfig.json文件在哪里吗?
  • 在发布文件中。 projectname.runtimeconfig.json 存在。但 AWS Benstalk 看不到该文件。
  • 同时,Azure DevOps 管道在 AWS Beanstalk 平台上运行,在 Windows Server Core 2019 / 2.5.8 上具有相同的设置。在 64 位 Amazon Linux 2 / 2.0.2 服务器上运行的 AWS Beanstalk .NET Core 我收到错误消息:(

标签: amazon-web-services core publish .net-core-2.2


【解决方案1】:

我也有同样的问题。

我不知道这是否是答案,因为我是 AWS 新手,但我发现:

  1. https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/dotnet-core-tutorial.html 中的说明仅适用于使用 Windows 服务器 创建环境。它实际上并没有直接说出来。它说:
  1. 对于平台,选择与您的应用程序使用的语言相匹配的平台和平台分支。

但在下一节中,它说:

IIS 是在 Amazon EC2 上运行应用程序的 Web 服务器 您的 Elastic Beanstalk 环境中的实例。

而且 IIS 只在 Windows 上运行。所以这意味着说明适用于 Windows。

  1. 如果您想使用 Linux,只需使用 site.zip 文件,这些说明让您创建并上传该文件。您不需要清单文件或 zip-within-zip。只需上传 site.zip。

【讨论】:

  • 首先,感谢您的回答,我使用命令“dotnet publish -o site”在本地创建了一个发布文件夹,然后压缩了内容。我没有压缩 zip 并添加了“aws-windows-deployment-manifest.json”文件并手动部署了 AWS Beanstalka,但这次我收到了以下错误。 AWS Beanstalk 日志; [ERROR] An error occurred during execution of command [app-deploy] - [CheckProcfileForDotNetCoreApplication]. Stop running the command. Error: parse runtime config failed with invalid character '\ x00' looking for beginning of value
  • 对我来说,这其中的关键部分是 Windows server - 我最初启动了一个 Linux 实例并得到了 there is no .runtimeconfig.json file 错误。
猜你喜欢
  • 2021-01-28
  • 2021-03-21
  • 2022-07-26
  • 1970-01-01
  • 2021-02-17
  • 2021-11-09
  • 2021-08-20
  • 2020-07-29
  • 2020-07-23
相关资源
最近更新 更多