apache kafka MM2 curl命令
Posted
技术标签:
【中文标题】apache kafka MM2 curl命令【英文标题】:apache kafka MM2 curl command 【发布时间】:2021-12-27 01:22:05 【问题描述】:我正在使用 SASL/SCRAM 运行 AWS MSK v2.7.0。我有一个运行 kafka 连接器和镜像制造商 2 (MM2) 的 ec2 实例。我能够在没有任何问题的情况下启动分发服务器,但是当我运行 curl 命令启动工作程序时,输出看起来很好,但没有数据正在复制。 svc_1 原则对源和目标都具有以下权限:
主题:
-读取 -创建 -描述 -describe-configs
组: -描述 -阅读
curl -s -X POST -H 'Content-Type: application/json' --data @/app/kafka/config/worker.json http://host.cloud.domain.com:8083/connectors -v
上述命令的输出:
* Trying 172.x.x.x:8083...
* Connected to host.cloud2.domain.com (172.x.x.x) port 8083 (#0)
> POST /connectors HTTP/1.1
> Host: host.cloud2.domain.com:8083
> User-Agent: curl/7.76.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 1882
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 201 Created
< Date: Mon, 15 Nov 2021 21:06:52 GMT
< Location: http://host.cloud2.domain.com:8083/connectors/worker-prod-01-mm2-worker
< Content-Type: application/json
< Content-Length: 1735
< Server: Jetty(9.4.33.v20201020)
<
"name":"worker-prod-01-mm2-worker","config":"connector.class":"org.apache.kafka.connect.mirror.MirrorSourceConnector","name":"worker-prod-01-mm2-worker","topics":"data.*","tasks.max":"2","source.cluster.alias":"source","target.cluster.alias":"target","source.cluster.bootstrap.servers":"b-1.kafka.uswest-2.amazonaws.com:9096","target.cluster.bootstrap.servers":"b-1.kafka.us-west-2.amazonaws.com:9096","source->target.enabled":"true","target->source.enabled":"false","offset-syncs.topic.replication.factor":"3","topics.exclude":".*[\\-\\.]internal, .*\\.replica, __consumer_offsets","groups.blacklist":"console-consumer-.*, connect-.*, __.*","topic.creation.default.replication.factor":"3","topic.creatio* Connection #0 to host host.cloud2.domain.com left intact
n.default.partitions":"24","key.converter":"org.apache.kafka.connect.converters.ByteArrayConverter","value.converter":"org.apache.kafka.connect.converters.ByteArrayConverter","source.cluster.sasl.mechanism":"SCRAM-SHA-512","source.cluster.security.protocol":"SASL_SSL","source.cluster.sasl.jaas.config":"org.apache.kafka.common.security.scram.ScramLoginModule required username=\"svc_1\" password=\"xxx290MM0L\";","target.cluster.security.protocol":"SASL_SSL","target.cluster.sasl.mechanism":"SCRAM-SHA-512","target.cluster.sasl.jaas.config":"org.apache.kafka.common.security.scram.ScramLoginModule required username=\"svc_1\" password=\"xxx4WWVuA\";","tasks":[],"type":"source"
另外,当我跑步时:
curl -s http://host.cloud2.domain.com:8083/connectors
我得到的只是 []。我也没有在日志中看到任何错误。有人可以让我知道我错过了什么或做错了什么吗?
谢谢,
【问题讨论】:
Connect 集群有多大? 【参考方案1】:经过我之前的步骤后,我想通了。它最终成为ACL问题。我首先授予操作全部,允许全部到组。那没有用。我将主题权限更改为全部操作,全部允许。那行得通。
【讨论】:
以上是关于apache kafka MM2 curl命令的主要内容,如果未能解决你的问题,请参考以下文章