首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >部署-> msdeploy -> runCommand超时

部署-> msdeploy -> runCommand超时
EN

Stack Overflow用户
提问于 2013-08-19 03:34:41
回答 1查看 1.4K关注 0票数 2

我正在使用awsdeploy部署一个弹性豆茎ASP.NET MVC应用程序。应用程序需要水晶报告,只有通过运行.msi安装程序(CRRuntime_64bit_13__6.msi)才能安装该报表。

为了作为部署的一部分运行安装程序,我添加了一个自定义目标,如下所示:

代码语言:javascript
复制
<!--install msi-->
  <Target Name="InstallCrystalReports" AfterTargets="AddIisSettingAndFileContentsToSourceManifest">
    <Message Text="Install Crystal Reports msi" />
    <ItemGroup>
      <MsDeploySourceManifest Include="runCommand">
        <Path>c:\mypath\installCrystalReports.cmd</Path>
        <waitAttempts>20</waitAttempts>
        <waitInterval>300000</waitInterval>
        <dontUseCommandExe>false</dontUseCommandExe>
        <AdditionalProviderSettings>waitAttempts;waitInterval;dontUseCommandExe</AdditionalProviderSettings>
      </MsDeploySourceManifest>
    </ItemGroup>
  </Target>

安装大约需要一分钟时间,我可以查看安装程序创建的日志文件,以查看它是否已经启动。但是,runCommand只允许它运行5秒,然后以错误结束它。改变waitAttempts和waitInterval似乎没有任何影响。

下面摘录自"C:\Program Files\Amazon\ElasticBeanstalk\logs\AWSDeployment.log“”,其中显示awsdeploy/msdeploy是如何过早地终止安装的。

代码语言:javascript
复制
2013-08-19 12:42:11,428 INFO 5 DeploymentLog - C:\mypath>msiexec /i  CRRuntime_64bit_13_0_6.msi /quiet /norestart /l C:\mypath\CRRuntime_64bit_13_0_6.txt 

2013-08-19 12:42:12,426 WARN 1 AWSBeanstalkCfnDeploy.DeploymentUtils - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 1 of 5).
2013-08-19 12:42:12,426 WARN 1 DeploymentLog - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 1 of 5).
2013-08-19 12:42:13,440 WARN 1 AWSBeanstalkCfnDeploy.DeploymentUtils - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 2 of 5).
2013-08-19 12:42:13,440 WARN 1 DeploymentLog - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 2 of 5).
2013-08-19 12:42:14,454 WARN 1 AWSBeanstalkCfnDeploy.DeploymentUtils - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 3 of 5).
2013-08-19 12:42:14,454 WARN 1 DeploymentLog - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 3 of 5).
2013-08-19 12:42:15,468 WARN 1 AWSBeanstalkCfnDeploy.DeploymentUtils - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 4 of 5).
2013-08-19 12:42:15,468 WARN 1 DeploymentLog - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 4 of 5).
2013-08-19 12:42:16,482 WARN 1 AWSBeanstalkCfnDeploy.DeploymentUtils - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 5 of 5).
2013-08-19 12:42:16,482 WARN 1 DeploymentLog - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 5 of 5).
2013-08-19 12:42:16,482 ERROR 1 AWSBeanstalkCfnDeploy.DeploymentUtils - Exception during deployment.

有什么想法吗?我怎样才能增加超时,这样安装程序才能成功?或者其他任何想法,如何让安装程序作为部署的一部分来运行?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-08-19 15:35:39

在AWSElasticBean秸秆实例上安装MSI包的一种更简单的方法是使用.ebextensions机制。

在项目中创建一个名为.ebextensions的文件夹,并在其中放置一个扩展名为.config的文件(例如,installs.config)。这是一个YAML文件,它描述了要执行的安装,以及在部署之前在每个实例上运行的命令。一个简单的例子可能如下所示

代码语言:javascript
复制
packages:
    msi:
      CrystalReports: http://myfilehost.com/packages/CrystalReports.msi

在URL是一个可公开访问的地方,您可以将MSI放在其中。例如,这可能在一个S3桶中。

有关AWS弹性豆柄定制特性的更多详细信息,请在这里找到:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-windows-ec2.html

有关该特性的概述可以在AWS博客上找到,在这里:http://blogs.aws.amazon.com/net/post/Tx1RLX98N5ERPSA/Customizing-Windows-Elastic-Beanstalk-Environments-Part-1

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18306045

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档