1

I'm observing Consumer instance not found error, at the time of consumer registration even if consumer instance is not timedout. Using Confluent API's.

Following are steps followed for this negative testing:

Running a script for consumer registration.

Kafka Topology : 3 ZK instance (where 2 ZK are dummy value) and 1 node cluster (single instance of rest-proxy & broker node).

When script is in progress for consumer registration, have cancelled the script & re-run it. Have seen that for the last registered consumer, Instance not found error is returned. But, in logs after some ms, 200 OK is listed for that consumer registration request [Consumer name in shared below logs : CGStress_TEST111111111111111_6].

[2018-08-28 09:05:48,411] INFO http://localhost:8082/v1/consumer/CGStress_TEST111111111111111_5 Service: 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] INFO 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] INFO http://localhost:8082/mr/v1/consumer/CGStress_TEST111111111111111_6 Service: 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":"Consumer instance not found.","error":40403},"time":"2018-08-28 09:05:48.421"}}} [2018-08-28 09:05:48,423] INFO 127.0.0.1 - - [28/Aug/2018:09:05:48 +0000] "POST /mr/v1/consumer/CGStress_TEST111111111111111_5 HTTP/1.1" 200 205 15 (io.confluent.rest-utils.requests) [2018-08-28 09:05:48,431] INFO 127.0.0.1 - - [28/Aug/2018:09:05:48 +0000] "POST /mr/v1/consumer/CGStress_TEST111111111111111_6 HTTP/1.1" 404 61 13 (io.confluent.rest-utils.requests) [2018-08-28 09:05:49,299] WARN Client session timed out, have not heard from server in 1501ms for sessionid 0x0 (org.apache.zookeeper.ClientCnxn) [2018-08-28 09:05:49,300] INFO Client session timed out, have not heard from server in 1501ms for sessionid 0x0, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn) [2018-08-28 09:05:49,400] INFO Opening socket connection to server localhost/0:0:0:0:0:0:0:1:32181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn) [2018-08-28 09:05:49,400] INFO Socket connection established to localhost/0:0:0:0:0:0:0:1:32181, initiating session (org.apache.zookeeper.ClientCnxn) [2018-08-28 09:05:49,403] INFO Session establishment complete on server localhost/0:0:0:0:0:0:0:1:32181, sessionid = 0x1657f54045b00f3, negotiated timeout = 6000 (org.apache.zookeeper.ClientCnxn) [2018-08-28 09:05:49,403] INFO zookeeper state changed (SyncConnected) (org.I0Itec.zkclient.ZkClient) [2018-08-28 09:05:49,404] INFO [CGStress_TEST111111111111111_6_UbuntuNTP-1535447146187-7b4d0350], starting auto committer every 60000 ms (kafka.consumer.ZookeeperConsumerConnector) {"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: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] INFO 127.0.0.1 - - [28/Aug/2018:09:05:46 +0000] "POST /mr/v1/consumer/CGStress_TEST111111111111111_6 HTTP/1.1" 200 124 3239 (io.confluent.rest-utils.requests) root@UbuntuNTP:~/CloudServices/MsgRelay#

Is this something related to dummy zk instance added?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Pooja
  • 481
  • 1
  • 8
  • 15

0 Answers0