【问题标题】:AWS Elastic Beanstalk Application gives LimitExceeded: PORTS errorAWS Elastic Beanstalk 应用程序给出了 LimitExceeded: PORTS 错误
【发布时间】:2022-09-26 09:32:04
【问题描述】:

我正在尝试使用 AWS Elastic Beanstalk 部署应用程序。我在使用 EBS 之前部署了应用程序,但这次很棘手。

应用程序使用 80 和 4000-4100 端口。

我能够映射端口 80,但无法映射其他端口。

在 docker-compose 文件中,端口被定义为一个范围;

    ports:
      - 8000:8000
      - 4000-4100:4000-4100

由于我找不到如何映射端口范围,我一一给出端口映射如下;

{  
  \"AWSEBDockerrunVersion\": 2,
  \"volumes\": [],
  \"containerDefinitions\": [
    {
...      
     \"portMappings\": [
        {
          \"containerPort\": 8080,
          \"hostPort\": 80
        },
        {
          \"hostPort\": 4000,
          \"containerPort\": 4000
        },
        {
          \"hostPort\": 4001,
          \"containerPort\": 4001
        },
        {
          \"hostPort\": 4002,
          \"containerPort\": 4002
        },
...

但 EBS 给出以下错误;

Encountered error starting new ECS task: {
... eb-ecs: \"failures\": [
... eb-ecs: {
... eb-ecs: \"reason\": \"LimitExceeded: PORTS\",

如何映射这些端口?任何帮助,将不胜感激

    标签: amazon-web-services deployment amazon-elastic-beanstalk port


    【解决方案1】:

    我能找到的唯一解决方案是;将端口数量减少到 90 个。

    以后如果需要更多端口,可以根据端口号设置转发规则

    【讨论】:

      猜你喜欢
      • 2015-03-05
      • 2015-09-18
      • 2017-03-04
      • 2020-07-26
      • 1970-01-01
      • 2021-10-11
      • 2021-02-11
      • 2021-04-30
      • 2018-04-16
      相关资源
      最近更新 更多