0

I'm using AWS Code Deploy in order to deploy my ASP.NET application into an auto-scaling group.

When deploying i've this error: Script at specified location: application-start.bat failed with exit code 66.

From what i've seen the error code 66 is "The network resource type is not correct", which is very bizzare in this case...

My bundle contains an appspec.yml file like this:

version: 0.0
os: windows
files:
  - source: ./
    destination: c:\inetpub\wwwroot
hooks:
  ApplicationStop:
    - location: application-stop.bat
      timeout: 900
  ApplicationStart :
    - location: application-start.bat
      timeout: 900

And the bat 2 files (application-stop / application-start) only contains one line each

iisreset /stop

iisreset /start

When i go to the EC2 instance to look at the aws code deploy logs, it's not more clear to me

2016-04-04 08:58:42 ERROR [codedeploy-agent(2848)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Error during perform: InstanceAgent::Plugins::CodeDeployPlugin::ScriptError - Script at specified location: application-start.bat failed with exit code 66

C:/Windows/TEMP/ocr512.tmp/src/lib/instance_agent/plugins/codedeploy/hook_executor.rb:150:in 'execute_script'

C:/Windows/TEMP/ocr512.tmp/src/lib/instance_agent/plugins/codedeploy/hook_executor.rb:107:in 'block (2 levels) in execute'

Does anyone run into the same issues and find a way to fix it ?

Community
  • 1
  • 1
jbuiss0n
  • 468
  • 2
  • 18
  • Have you resolved this? It would be great to know what the fix is. – jonypony3 Apr 28 '16 at 22:14
  • No fix at this point this keep hapening very often, but only on my preprod environment... that's very odd... I simply reboot servers and then i can deploy again without error, but rebooting before every deployment in not really ideal. – jbuiss0n Apr 29 '16 at 08:36
  • I did a similar thing, however I used power shell scripts. Ran it over a dozen times, no errors. – jonypony3 Apr 29 '16 at 11:53

0 Answers0