gpt4 book ai didi

amazon-web-services - amazon-ecs-agent始终在重新启动

转载 作者:行者123 更新时间:2023-12-04 23:18:02 27 4
gpt4 key购买 nike

我在亚马逊上有一个自动扩展组,它产生服务器实例。

我的aws-cli配置为:

[default]
s3 =
signature_version = s3v4
addressing_style = path
region = eu-central-1

我的ecs-agent配置在实例启动时通过aws-cli从s3中读取,如下所示:
ECS_CLUSTER=cluster-mongodb
ECS_ENGINE_AUTH_TYPE=dockercfg
ECS_ENGINE_AUTH_DATA={"domain.com":{"auth":"bsaewfgvewgf23g9hv3","email":""}}

令人遗憾的是,生成的实例上的ecs-agent总是在10秒后重新启动,而不是注册到集群“cluster-mongodb”。

错误日志在这里:
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

有人看过吗?
这可能与困惑的安全组/LB配置有关吗?

提前致谢

[编辑]找到了解决方案:

检查子网是否已注册到正确的路由表(vpc->路由表)。就我而言,那是错误的。

另外,我的实例需要由Autoscaling组的启动配置分配的公用IP,但这对我的设置很特殊。

最佳答案

该消息表明您的实例无法对ecs.eu-central-1.amazonaws.com端点执行HTTPS POST。

确保您的安全组和/或VPC配置允许对ECS endpoint进行出站HTTPS。

您可以通过命令行确认从实例到端点的端点连接性:

curl https://ecs.eu-central-1.amazonaws.com

那应该返回类似于以下内容的消息:
<MissingAuthenticationTokenException>
<Message>Missing Authentication Token</Message>
</MissingAuthenticationTokenException>

关于amazon-web-services - amazon-ecs-agent始终在重新启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35227012/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com