1

我在消费者注册时观察到消费者实例未找到错误,即使消费者实例没有超时。使用 Confluent API。

以下是此负面测试所遵循的步骤:

运行用于消费者注册的脚本。

Kafka 拓扑:3 个 ZK 实例(其中 2 个 ZK 是虚拟值)和 1 个节点集群(rest-proxy 和代理节点的单个实例)。

当脚本正在进行消费者注册时,已取消脚本并重新运行它。已经看到,对于最后注册的消费者,返回的是Instance not found错误。但是,在一些毫秒之后的日志中,为该消费者注册请求列出了 200 OK [在共享以下日志中的消费者名称:CGStress_TEST111111111111111_6]。

[2018-08-28 09:05:48,411] 信息http://localhost:8082/v1/consumer/CGStress_TEST111111111111111_5服务:TransacationId:5 EntityId:ed_1 Authorized:true Allowed:true (io.confluent.kafkarest.resources.SecurityRestrictions) {"X-Nssvc-serviceid":null,"Type":"API","X-Nssvc-customerid ":null,"Client-IP":"127.0.0.1","Severity":"INFO","X-Cws-Transactionid":"5","message":{"request":{"content-length ":81,"method":"POST","time":"2018-08-28 09:05:48.409","uri":"mr/v1/consumer/CGStress_TEST111111111111111_5","entity-id":" ed_1","user-agent":"python-requests/2.11.1"},"response":{"status_code":200,"time":"2018-08-28 09:05:48.412"}}} [2018-08-28 09:05:48,412] 信息 127.0.0。1 - - [28/Aug/2018:09:05:48 +0000]“POST /mr/v1/consumer/CGStress_TEST111111111111111_4 HTTP/1.1”200 205 19(io.confluent.rest-utils.requests)[2018-08 -28 09:05:48,420] 信息http://localhost:8082/mr/v1/consumer/CGStress_TEST11111111111111_6服务:TransacationId:6 EntityId:ed_1 Authorized:true Allowed:true (io.confluent.kafkarest.resources.SecurityRestrictions) {"X-Nssvc-serviceid":null,"Type":"API","X-Nssvc-customerid ":null,"Client-IP":"127.0.0.1","Severity":"INFO","X-Cws-Transactionid":"6","message":{"request":{"content-length ":81,"method":"POST","time":"2018-08-28 09:05:48.419","uri":"mr/v1/consumer/ CGStress_TEST111111111111111_6 ","entity-id":" ed_1","user-agent":"python-requests/2.11.1"},"response":{" status_code":404,"error_response":{"message":"未找到消费者实例。","error":40403}400] INFO 打开与服务器 localhost/0:0:0:0:0:0:0:1:32181 的套接字连接。不会尝试使用 SASL 进行身份验证(未知错误)(org.apache.zookeeper.ClientCnxn)[2018-08-28 09:05:49,400] INFO 与 localhost/0:0:0:0:0:0 建立的套接字连接:0:1:32181,启动会话(org.apache.zookeeper.ClientCnxn)[2018-08-28 09:05:49,403] INFO服务器localhost / 0:0:0:0:0:0上的会话建立完成: 0:1:32181, sessionid = 0x1657f54045b00f3, 协商超时 = 6000 (org.apache.zookeeper.ClientCnxn) [2018-08-28 09:05:49,403] INFO zookeeper 状态已更改 (SyncConnected) (org.I0Itec.zkclient.ZkClient ) [2018-08-28 09:05:49,404] INFO [CGStress_TEST111111111111111_6_UbuntuNTP-1535447146187-7b4d0350],每 60000 毫秒启动一次自动提交程序 (kafka.consumer.ZookeeperConsumerConnector) {"X-Nssvc-serviceid":null,"Type{"request":{"content-length":81,"method":"POST","time":"2018-08-28 09:05:46.172","uri":"mr/v1/consumer/ CGStress_TEST111111111111111_6","entity-id":"ed_1","user-agent":"python-requests/2.11.1"},"response":{"status_code":200,"time":"2018-08- 28 09:05:49.405"}}} [2018-08-28 09:05:49,409] 信息 127.0.0.1 - - [28/Aug/2018:09:05:46 +0000] “POST /mr/v1/消费者/CGStress_TEST111111111111111_6 HTTP/1.1" 200 124 3239 (io.confluent.rest-utils.requests) root@UbuntuNTP:~/CloudServices/MsgRelay#

这与添加的虚拟 zk 实例有关吗?

4

0 回答 0