I am trying to deploy from S3 bucket to Windows on premise machine using AWS CodeDeploy. AWS CodeDeployAgent has been running on my Windows machine.
The error in AWS Console:
The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.
Below is the log at c:\ProgramData\Amazon\CodeDeploy\log\
. It is unreachable when pinging 169.254.169.254:80.
2019-11-15T22:40:18 INFO [codedeploy-agent(2988)]: On Premises config file does not exist or not readable
2019-11-15T22:40:18 ERROR [codedeploy-agent(2988)]: CodeDeploy Instance Agent Service: CodeDeploy Instance Agent Service: error during start or run: Errno::ENETUNREACH - Failed to open TCP connection to 169.254.169.254:80 (A socket operation was attempted to an unreachable network. - connect(2) for "169.254.169.254" port 80) - C:/WINDOWS/TEMP/ocr1C29.tmp/lib/ruby/2.3.0/net/http.rb:882:in rescue in block in connect'
C:/WINDOWS/TEMP/ocr1C29.tmp/lib/ruby/2.3.0/net/http.rb:879:in
block in connect'
C:/WINDOWS/TEMP/ocr1C29.tmp/lib/ruby/2.3.0/timeout.rb:91:in block in timeout'
C:/WINDOWS/TEMP/ocr1C29.tmp/lib/ruby/2.3.0/timeout.rb:101:in
timeout'
C:/WINDOWS/TEMP/ocr1C29.tmp/lib/ruby/2.3.0/net/http.rb:878:in connect'
C:/WINDOWS/TEMP/ocr1C29.tmp/lib/ruby/2.3.0/net/http.rb:863:in
do_start'
C:/WINDOWS/TEMP/ocr1C29.tmp/lib/ruby/2.3.0/net/http.rb:852:in start'
C:/WINDOWS/TEMP/ocr1C29.tmp/lib/ruby/2.3.0/net/http.rb:584:in
start'
C:/WINDOWS/TEMP/ocr1C29.tmp/src/opt/codedeploy-agent/lib/instance_metadata.rb:51:in http_get'
C:/WINDOWS/TEMP/ocr1C29.tmp/src/opt/codedeploy-agent/lib/instance_metadata.rb:22:in
region'
C:/WINDOWS/TEMP/ocr1C29.tmp/src/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_poller.rb:38:in initialize'
C:/WINDOWS/TEMP/ocr1C29.tmp/src/opt/codedeploy-agent/lib/instance_agent/agent/base.rb:10:in
new'
C:/WINDOWS/TEMP/ocr1C29.tmp/src/opt/codedeploy-agent/lib/instance_agent/agent/base.rb:10:in runner'
C:/WINDOWS/TEMP/ocr1C29.tmp/src/opt/codedeploy-agent/bin/winagent.rb:42:in
block (2 levels) in service_main'
C:/WINDOWS/TEMP/ocr1C29.tmp/src/opt/codedeploy-agent/bin/winagent.rb:41:in synchronize'
C:/WINDOWS/TEMP/ocr1C29.tmp/src/opt/codedeploy-agent/bin/winagent.rb:41:in
block in service_main'
C:/WINDOWS/TEMP/ocr1C29.tmp/src/opt/codedeploy-agent/bin/winagent.rb:89:in with_error_handling'
C:/WINDOWS/TEMP/ocr1C29.tmp/src/opt/codedeploy-agent/bin/winagent.rb:38:in
service_main'
C:/Windows/Temp/ocr1C29.tmp/lib/ruby/gems/2.3.0/gems/win32-service-0.8.10/lib/win32/daemon.rb:316:in mainloop'
C:/Windows/Temp/ocr1C29.tmp/lib/ruby/gems/2.3.0/gems/win32-service-0.8.10/lib/win32/daemon.rb:214:in
mainloop'
C:/WINDOWS/TEMP/ocr1C29.tmp/src/opt/codedeploy-agent/bin/winagent.rb:104:in `'