我在遠程kafka集羣上定義的同一主題上運行多個kafka使用者,每個使用者都在自己的服務器上。 50臺服務器中只有5臺成功運行消費者流程。其餘的則無法啓動 - 這裏是日誌:Kafka Consumer NoMethodError:未定義的方法`length'爲零:NilClass
I, [2017-06-20T20:25:13.524287 #13302] INFO -- : Registered for conversions-processor as web1:d671ebce-bf76-4917-b504-ffd5924994f2 I, [2017-06-20T20:25:13.529857 #13302] INFO -- : 6 instances have been registered: web11:86472d4d-cc95-4a5d-bc52-d1c97a8a9c34, web1:d671ebce-bf76-4917-b504-ffd5924994f2, web14:818a5194-bb51-48d4-bd59-2221a4d3c7ac, web12:11e3f37e-5612-4306-bb1d-bf831da42052, web13:8ace8116-09a4-451c-80b2-8b199ebf45be, web10:8b17b591-9cb0-4193-a460-967ec30cc48c. bundler: failed to load command: /home/deploy/apps/test/current/exe/tracking-events-kafka-consumer.rb (/home/deploy/apps/test/current/exe/tracking-events-kafka-consumer.rb) NoMethodError: undefined method
length' for nil:NilClass
manage_partition_consumers'
/home/deploy/apps/test/shared/bundle/ruby/2.3.0/bundler/gems/kafka-consumer-268309adaabe/lib/kafka/consumer.rb:130:in
/home/deploy/apps/test/shared/bundle/ruby/2.3.0/bundler/gems/kafka-consumer-268309adaabe/lib/kafka/consumer.rb:88:inblock in each' I, [2017-06-20T20:25:15.320951 #13363] INFO -- : Registered for conversions-processor as web1:15494044-ddf7-4702-9578-ab828be62478 I, [2017-06-20T20:25:15.325198 #13363] INFO -- : 6 instances have been registered: web13:8ace8116-09a4-451c-80b2-8b199ebf45be, web12:11e3f37e-5612-4306-bb1d-bf831da42052, web10:8b17b591-9cb0-4193-a460-967ec30cc48c, web11:86472d4d-cc95-4a5d-bc52-d1c97a8a9c34, web14:818a5194-bb51-48d4-bd59-2221a4d3c7ac, web1:15494044-ddf7-4702-9578-ab828be62478. bundler: failed to load command: /home/deploy/apps/test/current/exe/tracking-events-kafka-consumer.rb (/home/deploy/apps/test/current/exe/tracking-events-kafka-consumer.rb) NoMethodError: undefined method
length' for nil:NilClass
/home/deploy/apps/test/shared/bundle/ruby/2.3.0/bundler/gems/kafka-consumer-268309adaabe/lib/kafka/consumer.rb:130:inmanage_partition_consumers'
block in each'
/home/deploy/apps/test/shared/bundle/ruby/2.3.0/bundler/gems/kafka-consumer-268309adaabe/lib/kafka/consumer.rb:88:in
如果我停在一個盒子消費者 - 我能夠成功啓動它了以前失敗的一個箱子。看來我的配置一次只允許5個用戶註冊?
我的問題是,爲什麼會發生這種情況?我該如何解決它?
任何建議或見解,一如既往,非常感謝!
感謝
謝謝!你知道嗎,增加分區數量有什麼好處嗎? – matthewalexander
「更多分區導致更高的吞吐量」:https://www.confluent.io/blog/how-to-choose-the-number-of-topicspartitions-in-a-kafka-cluster/;) –
偉大的文章!謝謝! – matthewalexander