gpt4 book ai didi

amazon-web-services - MSK 上的 "Kafka Timed out waiting for a node assignment."

转载 作者:行者123 更新时间:2023-12-03 08:11:21 40 4
gpt4 key购买 nike

规范:

我还尝试按照 Amazon MSK Library for AWS Identity and Access Management 的建议添加 IAM 身份验证信息。它说要在 config/client.properties 中添加以下内容:

# Sets up TLS for encryption and SASL for authN.
security.protocol = SASL_SSL

# Identifies the SASL mechanism to use.
sasl.mechanism = AWS_MSK_IAM

# Binds SASL client implementation.
# sasl.jaas.config = software.amazon.msk.auth.iam.IAMLoginModule required;

# Encapsulates constructing a SigV4 signature based on extracted credentials.
# The SASL client bound by "sasl.jaas.config" invokes this class.
sasl.client.callback.handler.class = software.amazon.msk.auth.iam.IAMClientCallbackHandler

# Binds SASL client implementation. Uses the specified profile name to look for credentials.
sasl.jaas.config = software.amazon.msk.auth.iam.IAMLoginModule required awsProfileName="kafka-client";

kafka-client 是作为实例配置文件附加到 EC2 实例的 IAM 角色。

网络:我使用 VPC Reachability Analyzer 来确认安全组配置正确,并且我用作 Producer 的 EC2 实例可以访问无服务器 MSK 集群。

我正在尝试做的事情:创建一个主题。

我的尝试:bin/kafka-topics.sh --create --partitions 1 --replication-factor 1 --topic faststart-events --bootstrap-server boot-zclcyva3.c2.kafka-serverless.us-east-2.amazonaws.com:9098结果:

Error while executing topic command : Timed out waiting for a node assignment. Call: createTopics
[2022-01-17 01:46:59,753] ERROR org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: createTopics
(kafka.admin.TopicCommand$)

我也在尝试:使用明文端口 9092。( 9098 is the IAM-authentication port in MSK ,无服务器 MSK 默认使用 IAM 身份验证。)

我在 SO 上找到的有关此节点分配错误的所有其他帖子均不包括 MSK。我尝试了类似 uncommenting the listener setting in server.properties 的建议,但这并没有改变任何事情。

安装 kcat 进行故障排除对我来说不起作用,因为 Amazon Linux 2 使用的 yum 包管理器没有开箱即用的安装,并且自 these instructions我在检查 libcurl(通过编译)失败...失败(失败)

问题:关于解决此“节点分配”错误还有其他提示吗?

最佳答案

创建的属性文件不会自动使用;您的命令需要包含 --command-config client.properties,其中此属性文件记录在 linked IAM page 上的 MSK 文档中.

提取...

ssl.truststore.location=<PATH_TO_TRUST_STORE_FILE>
security.protocol=SASL_SSL
sasl.mechanism=AWS_MSK_IAM
sasl.jaas.config=software.amazon.msk.auth.iam.IAMLoginModule required;
sasl.client.callback.handler.class=software.amazon.msk.auth.iam.IAMClientCallbackHandler

或者,如果明文端口不起作用,则可能存在其他网络问题

除了这些步骤之外,我建议联系 MSK 支持人员,并告诉他们update the "Create a Topic" page不再使用 Zookeeper,请记住 Kafka 3.0 is not (yet) supported

关于amazon-web-services - MSK 上的 "Kafka Timed out waiting for a node assignment.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70735879/

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