【问题标题】:Cannot deploy using AWS code deploy : too few healthy instances are available for deployment无法使用 AWS 代码部署进行部署:可用于部署的健康实例太少
【发布时间】:2023-03-19 00:45:01
【问题描述】:

我正在尝试将应用程序从 s3 bucket 部署到 ec2 实例。我创建了一个具有所需 s3 权限的实例以及一个具有所需 ec2 权限的代码部署应用程序

当我尝试部署时,我得到了:

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. (Error code: HEALTH_CONSTRAINTS.

我进入 ec2 实例检查代码部署日志,这就是我得到的:

2018-08-18 20:52:11 INFO  [codedeploy-agent(2704)]: On Premises config file does not exist or not readable
2018-08-18 20:52:11 ERROR [codedeploy-agent(2704)]: booting child: error during start or run: Errno::ENETUNREACH - Network is unreachable - connect(2) - /usr/share/ruby/net/http.rb:878:in `initialize'

我尝试更改权限,重新启动代码部署代理,创建一个全新的 codeDEploy 应用程序。似乎没有任何效果。

【问题讨论】:

    标签: amazon-web-services aws-code-deploy


    【解决方案1】:

    为了让代理从 CodeDeploy 获取命令,您的主机需要能够通过网络访问 Internet,这可能会受到您的 EC2 安全组、VPC、主机上的配置等的限制。查看您是否有访问,尝试 ping CodeDeploy 端点:

    ping codedeploy.us-west-2.amazonaws.com
    

    尽管您应该使用主机所在区域的端点 - 请参阅 here

    如果您已将代理配置为使用代理配置,您可能需要像here 一样重启代理。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-06-12
      • 2015-10-05
      • 2016-07-10
      • 2016-04-08
      • 2021-10-19
      • 2012-11-12
      • 1970-01-01
      相关资源
      最近更新 更多