I have an Amazon autoscale group that spawns server instances.
My aws-cli configurator:
[default]
s3 =
signature_version = s3v4
addressing_style = path
region = eu-central-1
My ecs-agent configuration is read from s3 with aws-cli when loading the instance and looks like this:
ECS_CLUSTER=cluster-mongodb
ECS_ENGINE_AUTH_TYPE=dockercfg
ECS_ENGINE_AUTH_DATA={"domain.com":{"auth":"bsaewfgvewgf23g9hv3","email":""}}
Unfortunately, the ecs agent on the spawned instance always restarts after 10 seconds instead of registering in the cluster-mongodb cluster.
The error log is here:
2016-02-05T14:40:47Z [INFO] Starting Agent: Amazon ECS Agent - v1.7.1 (007985c)
2016-02-05T14:40:47Z [INFO] Loading configuration
2016-02-05T14:40:47Z [INFO] Checkpointing is enabled. Attempting to load state
2016-02-05T14:40:47Z [INFO] Loading state! module="statemanager"
2016-02-05T14:40:47Z [INFO] Detected Docker versions [1.17 1.18 1.19 1.20]
2016-02-05T14:40:47Z [INFO] Registering Instance with ECS
2016-02-05T14:41:07Z [ERROR] Could not register module="api client" err="RequestError: send request failed
caused by: Post https://ecs.eu-central-1.amazonaws.com/: net/http: request canceled while waiting for connection"
2016-02-05T14:41:07Z [ERROR] Error registering: RequestError: send request failed
caused by: Post https://ecs.eu-central-1.amazonaws.com/: net/http: request canceled while waiting for connection
Has anyone seen this before? Perhaps this is due to confused security groups / LB configuration?
Thank you in advance
[EDIT] found a solution:
check if the subnet is registered in the correct route table (vpc → route table). in my case it was wrong.
, IP, Autoscaling, .