【发布时间】:2015-05-14 22:04:57
【问题描述】:
希望知道如何解决这个问题!
我有一个在 Elastic Beanstalk 中运行的 .NET Web 应用程序,需要通过 ebextensions 对其进行一些处理。它在创建实例后始终如一地工作,但在创建实例时,似乎存在问题。
在日志文件中,有以下内容:
2015-03-12 15:44:36,901 [INFO] Running config postbuild_0_MyConfig
2015-03-12 15:44:38,309 [ERROR] -----------------------BUILD FAILED!------------------------
2015-03-12 15:44:38,309 [ERROR] Unhandled exception during build: [Error 267] The directory name is invalid
Traceback (most recent call last):
File "cfn-init", line 123, in <module>
File "cfnbootstrap\construction.pyc", line 117, in build
File "cfnbootstrap\construction.pyc", line 502, in build
File "cfnbootstrap\construction.pyc", line 513, in run_config
File "cfnbootstrap\construction.pyc", line 125, in run_commands
File "cfnbootstrap\command_tool.pyc", line 104, in apply
File "cfnbootstrap\util.pyc", line 468, in call
File "cfnbootstrap\util.pyc", line 454, in call
File "subprocess.pyc", line 679, in __init__
File "subprocess.pyc", line 896, in _execute_child
WindowsError: [Error 267] The directory name is invalid
失败后,我将使用 AWS 控制台中的相同代码版本再次运行部署,我得到:
2015-03-12 16:00:42,526 [INFO] Running config postbuild_0_Umbraco
2015-03-12 16:00:44,558 [INFO] Command 01-changeperm succeeded
2015-03-12 16:00:44,558 [INFO] Waiting 60 seconds for reboot
2015-03-12 16:01:47,322 [INFO] Command 02-createvirtualdirectory succeeded
2015-03-12 16:01:47,338 [INFO] Waiting 60 seconds for reboot
正如预期的那样。
我相信它一定是由于配置文件本身而失败,因为个别命令本身的问题会导致不同的错误。
这是部署到 .ebextensions 文件夹中的我的 .config 文件,以及引用的脚本:
container_commands:
01-changeperm:
command: "permissions.bat > ../eblog.log"
cwd: "C:/inetpub/wwwroot/.ebextensions"
02-createvirtualdirectory:
command: "powershell.exe -noprofile -executionpolicy bypass -file ./virtualdir.ps1 > ../vd.log"
cwd: "C:/inetpub/wwwroot/.ebextensions"
希望有人可以帮助我,因为我不知所措!如果有人想了解更多信息,请问!
提前致谢。
【问题讨论】:
标签: amazon-web-services amazon-elastic-beanstalk