amazon-ecs-agent is always restarting -
i have autoscaling group on amazon, spawns server instances.
my aws-cli config is:
[default] s3 = signature_version = s3v4 addressing_style = path region = eu-central-1
my ecs-agent config gets read s3 aws-cli @ instance bootup , follows:
ecs_cluster=cluster-mongodb ecs_engine_auth_type=dockercfg ecs_engine_auth_data={"domain.com":{"auth":"bsaewfgvewgf23g9hv3","email":""}}
sadly ecs-agent on spawned instance restarting after 10 secs, instead of registering cluster "cluster-mongodb".
the error log 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 enabled. attempting 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 ecs 2016-02-05t14:41:07z [error] 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 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 connection
someone has seen before? maybe related messed security groups/lb config?
thanks in advance
[edit] found solution:
check, if subnet registered right route table (vpc -> route tables). in case wrong one.
additionally instances needed public ip assigned launch configuration of autoscaling group, special setup.
that message indicates instance cannot https post ecs.eu-central-1.amazonaws.com
endpoint.
make sure security groups and/or vpc configuration allows outbound https ecs endpoint.
you can confirm endpoint connectivity instance endpoint command line:
curl https://ecs.eu-central-1.amazonaws.com
that should return message similar following:
<missingauthenticationtokenexception> <message>missing authentication token</message> </missingauthenticationtokenexception>
Comments
Post a Comment