将 MVC4 部署到 Elastic Beanstalk 的“处理”错误消息

Posted

技术标签:

【中文标题】将 MVC4 部署到 Elastic Beanstalk 的“处理”错误消息【英文标题】:"processing" error message deploying MVC4 to Elastic Beanstalk 【发布时间】:2012-11-22 13:35:49 【问题描述】:

步骤

右键单击项目,“发布到 AWS” 使用模板部署新应用程序:“AWS Elastic Beanstalk” 名称:“mysite”,描述“mysite”,勾选“增量部署应用程序”,下一步 环境名称:“mysite”,描述“mysite”,默认 URL,下一步 Container 64-bit Server 2012 w/IIS 8,实例类型 Small,Next 勾选“启用 32 位应用程序”,输入有效的通知电子邮件地址,部署

结果

输出窗口显示:

Commencing deployment for project 0x10c-cloud
...building deployment package obj\Debug\Package\Archive...
...deployment package created at E:\dev\path-to-my-stuff\project-here\obj\Debug\Package\Archive
...build of project archive completed succesfully
...starting deployment to AWS Elastic Beanstalk environment 'mysite'
...starting incremental deployment to environment 'mysite'

5-10分钟后收到错误弹窗:

Error deploying new application: Unhandled error during deployment: Deployment Failed: Deployment to AWS Elastic Beanstalk failed with exception: processing .

Deployment to AWS Elastic Beanstalk environment 'mytest' did not complete successfully

"C:\Users\Kieren\appdata\local\AWSToolkit\logs\vs2010\log.txt" 的日志文件包含:

2012-12-04 20:04:21,957 [29] DEBUG Amazon.AWSToolkit.VisualStudio.VS2010Package - Output to AWS output window pane: ...deployment package created at E:\dev\0x10c\Dev\mytest\mytest\obj\Debug\Package\Archive
2012-12-04 20:04:21,957 [7] DEBUG Amazon.AWSToolkit.VisualStudio.VS2010Package - Output to AWS output window pane: ...build of project archive completed succesfully
2012-12-04 20:04:21,957 [7] INFO  Amazon.AWSToolkit.VisualStudio.VS2010Package - ...build of project archive completed succesfully
2012-12-04 20:04:21,970 [88] DEBUG Amazon.AWSToolkit.VisualStudio.VS2010Package - Output to AWS output window pane: ...starting deployment to AWS Elastic Beanstalk environment 'mytest'
2012-12-04 20:04:21,971 [88] INFO  Amazon.AWSToolkit.ElasticBeanstalk.Commands.DeployNewApplicationCommand - Deploy to AWS Elastic Beanstalk: ...starting deployment to AWS Elastic Beanstalk environment 'mytest'
2012-12-04 20:04:21,974 [88] DEBUG Amazon.AWSToolkit.VisualStudio.VS2010Package - Output to AWS output window pane: ...starting incremental deployment to environment 'mytest'
2012-12-04 20:04:21,974 [88] INFO  Amazon.AWSToolkit.ElasticBeanstalk.Commands.DeployNewApplicationCommand - Deploy to AWS Elastic Beanstalk: ...starting incremental deployment to environment 'mytest'
2012-12-04 20:04:21,975 [88] INFO  Amazon.AWSToolkit.ElasticBeanstalk.Commands.DeployNewApplicationCommand - ...staging deployment from work folder E:\dev\0x10c\Dev\0x10c-cloud\0x10c-cloud\obj\Debug\Package\Archive
2012-12-04 20:04:21,975 [88] INFO  Amazon.AWSToolkit.ElasticBeanstalk.Commands.DeployNewApplicationCommand - ...commit repository root set at C:\Users\Kieren\AppData\Local\AWSDeploy\4e72fcb2\
2012-12-04 20:14:21,416 [88] DEBUG Amazon.AWSToolkit.VisualStudio.VS2010Package - Output to AWS output window pane: Deployment to AWS Elastic Beanstalk failed with exception: processing .
2012-12-04 20:14:21,417 [88] INFO  Amazon.AWSToolkit.ElasticBeanstalk.Commands.DeployNewApplicationCommand - Deploy to AWS Elastic Beanstalk: Deployment to AWS Elastic Beanstalk failed with exception: processing .
2012-12-04 20:14:21,417 [88] ERROR Amazon.AWSToolkit.ElasticBeanstalk.Commands.DeployNewApplicationCommand - Deployment to AWS Elastic Beanstalk failed with exception: processing .
2012-12-04 20:14:21,417 [88] DEBUG Amazon.AWSToolkit.VisualStudio.VS2010Package - Output to AWS output window pane: Error deploying new application: Unhandled error during deployment: Deployment Failed: Deployment to AWS Elastic Beanstalk failed with exception: processing .
2012-12-04 20:14:21,417 [88] INFO  Amazon.AWSToolkit.ElasticBeanstalk.Commands.DeployNewApplicationCommand - Deploy to AWS Elastic Beanstalk: Error deploying new application: Unhandled error during deployment: Deployment Failed: Deployment to AWS Elastic Beanstalk failed with exception: processing .
2012-12-04 20:14:21,417 [88] ERROR Amazon.AWSToolkit.ElasticBeanstalk.Commands.DeployNewApplicationCommand - Error deploying new application: Unhandled error during deployment: Deployment Failed: Deployment to AWS Elastic Beanstalk failed with exception: processing .
2012-12-04 20:15:07,811 [88] DEBUG Amazon.AWSToolkit.VisualStudio.VS2010Package - Output to AWS output window pane: Deployment to AWS Elastic Beanstalk environment 'mytest' did not complete successfully
2012-12-04 20:15:07,814 [88] INFO  Amazon.AWSToolkit.ElasticBeanstalk.Commands.DeployNewApplicationCommand - Deploy to AWS Elastic Beanstalk: Deployment to AWS Elastic Beanstalk environment 'mytest' did not complete successfully

注意! 失败发生在部署开始后几乎正好 10 分钟。我认为是超时。不过要修复它吗?.. 我已经订购了光纤宽带,但它一周后才到货;)另外,如果我重新部署到同一个应用程序,它会更快地失败:仅超过 1 分钟,而不是 10 分钟。

应用程序“存在”在我的 AWS 资源管理器中,但它下面没有环境。

尝试过的事情

我已经卸载并重新安装了 SDK 我删除了 AppData\Local\AWSDeploy 文件夹(好像是本地 git repo) 多次部署到同一个 EB 应用或新的 EB 应用

【问题讨论】:

注意,如果我在 AWS 资源管理器中查看我的应用程序,我可以为它创建一个环境.. 它似乎从那里开始工作,到目前为止(我会在环境健康与否时更新。 .)。但是精灵路线不行? 好的,向导似乎不起作用。它会推送应用程序的新版本,但我需要手动将其发布到环境中。我有一个解决方法,但如果有人有任何想法,我将不胜感激。 听起来在实例上部署失败。检查事项:您配置的健康检查 URL 返回 200 状态代码。否则,您可以从 AWS Elastic Beanstalk 管理控制台中的环境获取部署日志,或者通过远程访问实例并查看 C:\Program Files\AWS Elastic Beanstalk\HostManager\logs 我会检查一下,谢谢:但我想知道为什么使用向导时会发生 100% 的情况,而使用手动 SDK 工具时会发生 0% 的情况.. 啊,这确实有问题。正如我所说,当该过程完成时,没有环境(也没有远程实例) - 只是资源管理器中的一个应用程序。没有要检查的 200,没有日志 - 没有实例。 【参考方案1】:

如果运行状况检查 URL 未返回 200,则您的应用将不会被部署。因此,如果您在启动时发生了一些事情,例如检查您尚未完全设置的数据库,并且您的运行状况检查 URL 正在访问该页面,您将收到此错误。

【讨论】:

以上是关于将 MVC4 部署到 Elastic Beanstalk 的“处理”错误消息的主要内容,如果未能解决你的问题,请参考以下文章

将应用程序部署到 AWS Elastic Beanstalk 环境

将 Django 部署到 Elastic Beanstalk,迁移失败

将 PHP 应用程序部署到 Elastic Beanstalk 时出现问题

将多个平台部署到 Elastic Beanstalk (PHP/Python)

将 Java Web 应用程序部署到 Amazon Elastic Beanstalk

无法将 Rails API 应用程序部署到 AWS Elastic Beanstalk