gpt4 book ai didi

amazon-web-services - 当前有 9 条规则的监听器当前正在使用标识符优先级为 10 的错误 ListenerRule

转载 作者:行者123 更新时间:2023-12-05 05:39:42 24 4
gpt4 key购买 nike

我有以下(最小测试)cloudformation 模板:

AWSTemplateFormatVersion: 2010-09-09
Description: Test template

Resources:
TestTargetGroupListener:
Type: AWS::ElasticLoadBalancingV2::ListenerRule
Properties:
Actions:
- Type: fixed-response
FixedResponseConfig:
ContentType: text/plain
MessageBody: It works
StatusCode: 200
Conditions:
- Field: host-header
HostHeaderConfig:
Values:
- example.com
ListenerArn: arn:aws:elasticloadbalancing:eu-west-1:<accountid>:listener/app/<alb name>/xxx/xxx
Priority: 10

当我尝试部署它时,我收到消息:

Resource of type 'AWS::ElasticLoadBalancingV2::ListenerRule' with identifier 'Priority '10' is currently in use (Service: ElasticLoadBalancingV2, Status Code: 400, Request ID: ..., Extended Request ID: null)' already exists." (RequestToken: ..., HandlerErrorCode: AlreadyExists)

我检查了监听器并确认当前有 9 条规则(+ 最后一条规则)。

我还尝试将优先级设置为 9(如果它是基于 0 的)和 11(因为我不确定“最后”是否计入优先级),但是我收到相同的消息(对于我尝试的每个优先级) )。

监听器规则如下所示:

enter image description here

我不确定为什么会发生这种情况。我之前使用过类似的模板,在同一个监听器上没有任何问题。

更新:我通过使用监听器优先级 4 来实现此功能,该优先级(令人惊讶地)有效并使监听器在控制台中显示为第二!我还是不明白它是如何工作的。当我尝试在 AWS Web 控制台上创建 ECS 服务、附加到相同的负载监听器并且在选择监听器优先级时遇到相同的问题时,我发现可以使用 4。然而,在 Web 控制台上,我能够比通过 CF 模板更快地尝试数字。我仍然不明白问题出在哪里,我仍然不知道如何正确诊断这个错误。

最佳答案

偶然发现了同样的问题。您可以通过首先转到 EC2 管理控制台来找到优先级,在那里选择您的负载均衡器,打开监听器选项卡并单击所需的监听器 ID,它会打开一个新选项卡。优先级显示在“规则”选项卡上。

关于amazon-web-services - 当前有 9 条规则的监听器当前正在使用标识符优先级为 10 的错误 ListenerRule,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72618897/

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