我在AWS Elastic Beanstalk上部署ASP.NET网站时遇到问题。 我试图从MS VS 2013部署,并继续
模块:AWSEBAutoScalingGroup配置:Infra-WriteRuntimeConfig,Infra-WriteApplication1,Infra-WriteApplication2,Infra-EmbeddedPreBuild,Hook-PreAppDeploy,Hook-EnactAppDeploy,Infra-EmbeddedPostBuild,Hook-PostAppDeploy]命令在实例上失败。返回码:1输出:null。
当我查看服务器的日志时
AWSDeployment.log:
at Microsoft.Web.Deployment.CreateApplicationRuleHandler.Update(DeploymentSyncContext syncContext,DeploymentObject destinationObject,DeploymentObject& sourceObject,Boolean& proceed) 在Microsoft.Web.Deployment.DeploymentSyncContext.HandleUpdate(DeploymentObject destObject,DeploymentObject sourceObject) 在Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest,DeploymentObject source) 在Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest,DeploymentObject source) 在Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest,DeploymentObject source) 在Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest,DeploymentObject source) 在Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject,DeploymentObject sourceObject) 在Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject,DeploymentSyncOptions syncOptions,PayloadTable payloadTable,ContentRootTable contentRootTable,Nullable
1 syncPassId) at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions) at Microsoft.Web.Deployment.DeploymentObject.SyncTo(String provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions) at AWSBeanstalkCfnDeploy.DeploymentUtils.deployPackage(Container container, Boolean sync) in d:\Jenkins\workspace\mainline-cfn-beanstalk-tools\AWSBeanstalkCfnDeploy\DeploymentUtils.cs:line 132 at AWSBeanstalkCfnDeploy.DeploymentUtils.UpdateApplicationVersion(Container container, Boolean sync) in d:\Jenkins\workspace\mainline-cfn-beanstalk-tools\AWSBeanstalkCfnDeploy\DeploymentUtils.cs:line 51 --- End of inner exception stack trace --- at AWSBeanstalkCfnDeploy.DeploymentUtils.UpdateApplicationVersion(Container container, Boolean sync) in d:\Jenkins\workspace\mainline-cfn-beanstalk-tools\AWSBeanstalkCfnDeploy\DeploymentUtils.cs:line 66 2015-01-06 07:42:58,376 ERROR 1 AWSBeanstalkCfnDeployApp.DeployApp - Deployment failed: Unexpected Exception 2015-01-06 07:42:58,376 INFO 1 AWSBeanstalkCfnDeployApp.DeployApp - Event [INFO]: Started Application Update 2015-01-06 07:42:58,376 INFO 1 AWSBeanstalkCfnDeployApp.DeployApp - Event [ERROR]: Deployment Failed: Unexpected Exception 2015-01-06 08:01:15,324 INFO 1 AWSBeanstalkCfnDeployApp.DeployApp - Reading configuration from c:\Program Files\Amazon\ElasticBeanstalk\config\containerconfiguration 2015-01-06 08:01:17,771 INFO 1 AWSBeanstalkCfnDeploy.ContainerConfiguration - Setting SiteName to 'Default Web Site' 2015-01-06 08:01:17,771 INFO 1 AWSBeanstalkCfnDeploy.ContainerConfiguration - Setting AppName to '/WebSite1(1)' 2015-01-06 08:01:18,444 DEBUG 1 AWSBeanstalkCfnDeploy.Container - Could not find application so returning the default application pool 2015-01-06 08:01:27,508 INFO 1 AWSBeanstalkCfnDeploy.DeploymentUtils - Adding sitemanifest (sitemanifest). 2015-01-06 08:01:27,508 INFO 1 DeploymentLog - Adding sitemanifest (sitemanifest). 2015-01-06 08:01:28,068 ERROR 1 AWSBeanstalkCfnDeploy.DeploymentUtils - Exception during deployment. Microsoft.Web.Deployment.DeploymentDetailedClientServerException: The application pool that you are trying to use has the 'managedRuntimeVersion' property set to 'v4.0'. This application requires 'v4.5'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_APPPOOL_VERSION_MISMATCH.
1 syncPassId) 在Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions,DeploymentBaseOptions baseOptions,DeploymentSyncOptions syncOptions) at Microsoft.Web.Deployment.DeploymentObject.SyncTo(String provider,String path,DeploymentBaseOptions baseOptions,DeploymentSyncOptions syncOptions) 位于d:\ Jenkins \ workspace \ mainline-cfn-beanstalk-tools \ AWSBeanstalkCfnDeploy \ DeploymentUtils.cs中的AWSBeanstalkCfnDeploy.DeploymentUtils.deployPackage(容器容器,布尔同步):第132行 位于d:\ Jenkins \ workspace \ mainline-cfn-beanstalk-tools \ AWSBeanstalkCfnDeploy \ DeploymentUtils.cs中的AWSBeanstalkCfnDeploy.DeploymentUtils.UpdateApplicationVersion(容器容器,布尔同步):第51行 2015-01-06 08:01:28,177错误1 AWSBeanstalkCfnDeploy.DeploymentUtils - 意外异常:System.Exception:部署期间出现异常。 ---> Microsoft.Web.Deployment.DeploymentDetailedClientServerException:您尝试使用的应用程序池具有' managedRuntimeVersion'属性设置为' v4.0'。此应用程序需要' v4.5'。请访问:http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_APPPOOL_VERSION_MISMATCH了解详情。 在Microsoft.Web.Deployment.VerifyApplicationHelper.CheckAppPoolProperties(String appPoolName,DeploymentObjectAttributeCollection attributes,DeploymentBaseContext baseContext,String siteName) 在Microsoft.Web.Deployment.VerifyApplicationHelper.VerifyApplicationProperties(DeploymentObject destinationObject,DeploymentObject sourceObject) 在Microsoft.Web.Deployment.CreateApplicationRuleHandler.Update(DeploymentSyncContext syncContext,DeploymentObject destinationObject,DeploymentObject& sourceObject,Boolean& proceed) 在Microsoft.Web.Deployment.DeploymentSyncContext.HandleUpdate(DeploymentObject destObject,DeploymentObject sourceObject) 在Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest,DeploymentObject source) 在Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest,DeploymentObject source) 在Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest,DeploymentObject source) 在Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest,DeploymentObject source) 在Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject,DeploymentObject sourceObject) 在Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject,DeploymentSyncOptions syncOptions,PayloadTable payloadTable,ContentRootTable contentRootTable,Nullable
at Microsoft.Web.Deployment.VerifyApplicationHelper.CheckAppPoolProperties(String appPoolName, DeploymentObjectAttributeCollection attributes, DeploymentBaseContext baseContext, String siteName) at Microsoft.Web.Deployment.VerifyApplicationHelper.VerifyApplicationProperties(DeploymentObject destinationObject, DeploymentObject sourceObject) at Microsoft.Web.Deployment.CreateApplicationRuleHandler.Update(DeploymentSyncContext syncContext, DeploymentObject destinationObject, DeploymentObject& sourceObject, Boolean& proceed) at Microsoft.Web.Deployment.DeploymentSyncContext.HandleUpdate(DeploymentObject destObject, DeploymentObject sourceObject) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject) at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable1 syncPassId) at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions) at Microsoft.Web.Deployment.DeploymentObject.SyncTo(String provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions) at AWSBeanstalkCfnDeploy.DeploymentUtils.deployPackage(Container container, Boolean sync) in d:\Jenkins\workspace\mainline-cfn-beanstalk-tools\AWSBeanstalkCfnDeploy\DeploymentUtils.cs:line 132 at AWSBeanstalkCfnDeploy.DeploymentUtils.UpdateApplicationVersion(Container container, Boolean sync) in d:\Jenkins\workspace\mainline-cfn-beanstalk-tools\AWSBeanstalkCfnDeploy\DeploymentUtils.cs:line 51 --- End of inner exception stack trace --- at AWSBeanstalkCfnDeploy.DeploymentUtils.UpdateApplicationVersion(Container container, Boolean sync) in d:\Jenkins\workspace\mainline-cfn-beanstalk-tools\AWSBeanstalkCfnDeploy\DeploymentUtils.cs:line 66 2015-01-06 08:01:28,177 ERROR 1 AWSBeanstalkCfnDeployApp.DeployApp - Deployment failed: Unexpected Exception 2015-01-06 08:01:28,177 INFO 1 AWSBeanstalkCfnDeployApp.DeployApp - Event [INFO]: Started Application Update 2015-01-06 08:01:28,177 INFO 1 AWSBeanstalkCfnDeployApp.DeployApp - Event [DEBUG]: Could not find application so returning the default application pool 2015-01-06 08:01:28,177 INFO 1 AWSBeanstalkCfnDeployApp.DeployApp - Event [ERROR]: Deployment Failed: Unexpected Exception 2015-01-06 08:46:38,207 INFO 1 AWSBeanstalkCfnDeployApp.DeployApp - Reading configuration from c:\Program Files\Amazon\ElasticBeanstalk\config\containerconfiguration 2015-01-06 08:46:38,707 INFO 1 AWSBeanstalkCfnDeploy.ContainerConfiguration - Setting SiteName to 'Default Web Site' 2015-01-06 08:46:38,707 INFO 1 AWSBeanstalkCfnDeploy.ContainerConfiguration - Setting AppName to '/' 2015-01-06 08:46:39,456 ERROR 1 AWSBeanstalkCfnDeploy.DeploymentUtils - Exception during deployment. Microsoft.Web.Deployment.DeploymentDetailedClientServerException: The application pool that you are trying to use has the 'managedRuntimeVersion' property set to 'v4.0'. This application requires 'v4.5'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_APPPOOL_VERSION_MISMATCH. at Microsoft.Web.Deployment.VerifyApplicationHelper.CheckAppPoolProperties(String appPoolName, DeploymentObjectAttributeCollection attributes, DeploymentBaseContext baseContext, String siteName) at Microsoft.Web.Deployment.VerifyApplicationHelper.VerifyApplicationProperties(DeploymentObject destinationObject, DeploymentObject sourceObject) at Microsoft.Web.Deployment.CreateApplicationRuleHandler.Update(DeploymentSyncContext syncContext, DeploymentObject destinationObject, DeploymentObject& sourceObject, Boolean& proceed) at Microsoft.Web.Deployment.DeploymentSyncContext.HandleUpdate(DeploymentObject destObject, DeploymentObject sourceObject) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject) at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable
1 syncPassId) 在Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions,DeploymentBaseOptions baseOptions,DeploymentSyncOptions syncOptions) at Microsoft.Web.Deployment.DeploymentObject.SyncTo(String provider,String path,DeploymentBaseOptions baseOptions,DeploymentSyncOptions syncOptions) 位于d:\ Jenkins \ workspace \ mainline-cfn-beanstalk-tools \ AWSBeanstalkCfnDeploy \ DeploymentUtils.cs中的AWSBeanstalkCfnDeploy.DeploymentUtils.deployPackage(容器容器,布尔同步):第132行 位于d:\ Jenkins \ workspace \ mainline-cfn-beanstalk-tools \ AWSBeanstalkCfnDeploy \ DeploymentUtils.cs中的AWSBeanstalkCfnDeploy.DeploymentUtils.UpdateApplicationVersion(容器容器,布尔同步):第51行 2015-01-06 08:46:39,488错误1 AWSBeanstalkCfnDeploy.DeploymentUtils - 意外异常:System.Exception:部署期间出现异常。 ---> Microsoft.Web.Deployment.DeploymentDetailedClientServerException:您尝试使用的应用程序池具有' managedRuntimeVersion'属性设置为' v4.0'。此应用程序需要' v4.5'。请访问:http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_APPPOOL_VERSION_MISMATCH了解详情。 在Microsoft.Web.Deployment.VerifyApplicationHelper.CheckAppPoolProperties(String appPoolName,DeploymentObjectAttributeCollection attributes,DeploymentBaseContext baseContext,String siteName) 在Microsoft.Web.Deployment.VerifyApplicationHelper.VerifyApplicationProperties(DeploymentObject destinationObject,DeploymentObject sourceObject) 在Microsoft.Web.Deployment.CreateApplicationRuleHandler.Update(DeploymentSyncContext syncContext,DeploymentObject destinationObject,DeploymentObject& sourceObject,Boolean& proceed) 在Microsoft.Web.Deployment.DeploymentSyncContext.HandleUpdate(DeploymentObject destObject,DeploymentObject sourceObject) 在Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest,DeploymentObject source) 在Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest,DeploymentObject source) 在Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest,DeploymentObject source) 在Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest,DeploymentObject source) 在Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject,DeploymentObject sourceObject) 在Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject,DeploymentSyncOptions syncOptions,PayloadTable payloadTable,ContentRootTable contentRootTable,Nullable`1 syncPassId) 在Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions,DeploymentBaseOptions baseOptions,DeploymentSyncOptions syncOptions) at Microsoft.Web.Deployment.DeploymentObject.SyncTo(String provider,String path,DeploymentBaseOptions baseOptions,DeploymentSyncOptions syncOptions) 位于d:\ Jenkins \ workspace \ mainline-cfn-beanstalk-tools \ AWSBeanstalkCfnDeploy \ DeploymentUtils.cs中的AWSBeanstalkCfnDeploy.DeploymentUtils.deployPackage(容器容器,布尔同步):第132行 位于d:\ Jenkins \ workspace \ mainline-cfn-beanstalk-tools \ AWSBeanstalkCfnDeploy \ DeploymentUtils.cs中的AWSBeanstalkCfnDeploy.DeploymentUtils.UpdateApplicationVersion(容器容器,布尔同步):第51行 ---内部异常堆栈跟踪结束--- 位于d:\ Jenkins \ workspace \ mainline-cfn-beanstalk-tools \ AWSBeanstalkCfnDeploy \ DeploymentUtils.cs中的AWSBeanstalkCfnDeploy.DeploymentUtils.UpdateApplicationVersion(容器容器,布尔同步):第66行 2015-01-06 08:46:39,488错误1 AWSBeanstalkCfnDeployApp.DeployApp - 部署失败:意外异常 2015-01-06 08:46:39,488 INFO 1 AWSBeanstalkCfnDeployApp.DeployApp - 事件[INFO]:已启动应用程序更新 2015-01-06 08:46:39,488 INFO 1 AWSBeanstalkCfnDeployApp.DeployApp - 事件[错误]:部署失败:意外异常
我的服务器是:运行IIS 8.5的64位Windows Server 2012 R2
希望有人可以帮助我!
答案 0 :(得分:1)
我在 cfn-init.log 中看到并发现错误:
<块引用>2021-04-07 03:38:15,875 [ERROR] 命令挂钩 (HooksExecutor.exe appdeploy\enact) 失败 2021-04-07 03:38:15,875 [错误] 在构建 Hook-EnactAppDeploy 期间遇到错误:命令挂钩失败
原因权限不包括部署。请检查权限。
答案 1 :(得分:0)
这里的关键是:
Microsoft.Web.Deployment.DeploymentDetailedClientServerException: The application pool that you are trying to use has the 'managedRuntimeVersion' property set to 'v4.0'. This application requires 'v4.5'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_APPPOOL_VERSION_MISMATCH.
我遇到了将.NET 4.5 Web应用程序部署到Elastic Beanstalk的相同问题,尽管在我最初设置部署时将应用程序池.NET版本设置为4.5,以及此部署在非EBS计算机上运行的事实。
这里的解决方法对我有用。 How to Web Deploy a web application targeting Entity Framework 4.2 June 2011 CTP