[英]Ceph BucketNotifications do not push messages to Kafka
我有一個ceph
與三個節點測試集群radosgw
安裝在第一個節點上。 ceph
版本14.2.6
(f0aa067ac7a02ee46ea48aa26c6e298b5ea272e9)鸚鵡螺(穩定)
# cat /etc/ceph/ceph.conf
[global]
fsid = a204e3b5-b0e1-4598-aadc-f46011b562f0
mon_initial_members = ceph-test-01, ceph-test-02, ceph-test-03
mon_host = 172.19.19.252,172.19.19.251,172.19.19.244
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
public network = 172.19.19.0/24
rgw_frontends = beast port=80
以及用於接收消息的 Apache Kafka 代理。
我根據官方CEPH
文檔創建了一個主題:
( https://docs.ceph.com/docs/master/radosgw/notifications/ )。
POST http://ceph-test-01/?Action=CreateTopic&Name=bucketnotifications&push-endpoint=kafka://kafka-test-01:9092 with S3 credentials
Response:
<CreateTopicResponse xmlns="https://sns.amazonaws.com/doc/2010-03-31/">
<CreateTopicResult>
<TopicArn>arn:aws:sns:us::bucketnotifications</TopicArn>
</CreateTopicResult>
<ResponseMetadata>
<RequestId>14804357-9c29-437d-9789-c127e1c13d23.44108.275</RequestId>
</ResponseMetadata>
</CreateTopicResponse>
我創建了一個名為new-bucket
並檢查了它的配置:
GET http://ceph-test-01/new-bucket?notification
Response:
<NotificationConfiguration>
<TopicConfiguration>
<Id>bucketnotifications</Id>
<Topic>arn:aws:sns:us::bucketnotifications</Topic>
<Event>s3:ObjectCreated:*</Event>
<Event>s3:ObjectRemoved:*</Event>
</TopicConfiguration>
</NotificationConfiguration>
當我向存儲桶添加或刪除文件時, ceph
不會將通知推送到 Apache Kafka 主題。 Radosgw
日志(調試模式開啟)包含以下字符串:
2020-03-04 10:58:00.533 7f29a8da3700 20 notification: 'bucketnotifications' on topic: 'bucketnotifications' and bucket: 'new-bucket' (unique topic: 'bucketnotifications') apply to event of type: 's3:ObjectCreated:Put'
2020-03-04 10:58:00.533 7f29a8da3700 1 ERROR: failed to create push endpoint: kafka://kafka-test-01:9092 due to: pubsub endpoint configuration error: unknown schema in: kafka://kafka-test-01:9092
2020-03-04 10:58:00.533 7f29a8da3700 5 req 188 0.248s s3:put_obj WARNING: publishing notification failed, with error: -22
但是 Apache Kafka 沒有創建新主題。
似乎 nautilus 版本中存在一個 kafka 架構不會檢查的錯誤。 您可以升級到支持此架構的15.2.0
版或等待 nautilus 上的錯誤修復更新。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.