【发布时间】:2022-01-17 13:00:45
【问题描述】:
规格:
- 预览版中的无服务器 Amazon MSK。
- t2.xlarge EC2 实例与 Amazon Linux 2
- 从https://dlcdn.apache.org/kafka/3.0.0/kafka_2.13-3.0.0.tgz安装了Kafka
- openjdk 版本“11.0.13”2021-10-19 LTS
- OpenJDK 运行时环境 18.9(内部版本 11.0.13+8-LTS)
- OpenJDK 64 位服务器 VM 18.9(内部版本 11.0.13+8-LTS,混合模式, 分享)
- Gradle 7.3.3
- https://github.com/aws/aws-msk-iam-auth,构建成功。
我还尝试按照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 可达性分析器确认安全组配置正确,并且我用作生产者的 EC2 实例可以访问无服务器 MSK 集群。
我正在尝试做的事情:创建一个主题。
我是如何尝试的:bin/kafka-topics.sh --create --partitions 1 --replication-factor 1 --topic quickstart-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 进行故障排除对我来说不起作用,因为没有现成的安装 yum 包管理器,Amazon Linux 2 使用它,而且these instructions 在checking for libcurl (by compile)... failed (fail) 对我来说失败了.
问题:关于解决这个“节点分配”错误的任何其他提示?
【问题讨论】:
-
我感觉您会从 MSK 支持部门得到更直接的答复
标签: amazon-web-services amazon-ec2 apache-kafka serverless