Kafka/PillowTop Errors - LeaderNotAvailableError: TopicMetadata(topic='domain', error=5, partitions=[])

Dear all,

Possibly my last major error. Any leads on this? thanks for sharing.

Error on web page:

PillowTop Errors

Sorry! There was an error with your query, it has been logged, please try
another query.

Error in /tmp/django.log -

2016-11-03 13:58:41,854 ERROR Internal Server Error:
/hq/admin/system/system_ajax
Traceback (most recent call last):
File
"/home/commcarehq/commcare-hq/local/lib/python2.7/site-packages/django/core/handlers/base.py",
line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/home/commcarehq/commcare-hq/corehq/apps/domain/decorators.py”,
line 361, in _inner
return view_func(request, *args, **kwargs)
File “/home/commcarehq/commcare-hq/corehq/apps/hqadmin/views.py”, line
292, in system_ajax
pillow_meta = get_all_pillows_json()
File
"/home/commcarehq/commcare-hq/corehq/ex-submodules/pillowtop/utils.py",
line 121, in get_all_pillows_json
return [get_pillow_json(pillow_config) for pillow_config in
pillow_configs]
File
"/home/commcarehq/commcare-hq/corehq/ex-submodules/pillowtop/utils.py",
line 144, in get_pillow_json
offsets = pillow.get_change_feed().get_current_offsets()
File
"/home/commcarehq/commcare-hq/corehq/apps/change_feed/consumer/feed.py",
line 110, in get_current_offsets
return get_multi_topic_offset(self.topics)
File “/home/commcarehq/commcare-hq/corehq/apps/change_feed/topics.py”,
line 59, in get_multi_topic_offset
return _get_topic_offsets(topics, latest=True)
File “/home/commcarehq/commcare-hq/corehq/apps/change_feed/topics.py”,
line 74, in _get_topic_offsets
responses = client.send_offset_request(offset_requests)
File
"/home/commcarehq/commcare-hq/local/lib/python2.7/site-packages/kafka/client.py",
line 507, in send_offset_request
KafkaProtocol.decode_offset_response)
File
"/home/commcarehq/commcare-hq/local/lib/python2.7/site-packages/kafka/client.py",
line 166, in _send_broker_aware_request
payload.partition)
File
"/home/commcarehq/commcare-hq/local/lib/python2.7/site-packages/kafka/client.py",
line 86, in _get_leader_for_partition
self.load_metadata_for_topics(topic)
File
"/home/commcarehq/commcare-hq/local/lib/python2.7/site-packages/kafka/client.py",
line 378, in load_metadata_for_topics
kafka.common.check_error(topic_metadata)
File
"/home/commcarehq/commcare-hq/local/lib/python2.7/site-packages/kafka/common.py",
line 233, in check_error
raise error_class(response)
LeaderNotAvailableError: TopicMetadata(topic=‘domain’, error=5,
partitions=[])

It seems like kafka is not properly running/setup.

If you’ve setup and configured it I’ve found that sometimes restarting it
(or restarting docker if you’re running in a container) resolves this.

You also need to run ./manage.py create_kafka_topics before running (though
that would fail with a different error)

··· On Thu, Nov 3, 2016 at 4:04 PM, Eucalyptus D wrote:

Dear all,

Possibly my last major error. Any leads on this? thanks for sharing.

Error on web page:

PillowTop Errors

Sorry! There was an error with your query, it has been logged, please try
another query.

Error in /tmp/django.log -

2016-11-03 13:58:41,854 ERROR Internal Server Error:
/hq/admin/system/system_ajax
Traceback (most recent call last):
File “/home/commcarehq/commcare-hq/local/lib/python2.7/site-packa
ges/django/core/handlers/base.py”, line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/home/commcarehq/commcare-hq/corehq/apps/domain/decorators.py”,
line 361, in _inner
return view_func(request, *args, **kwargs)
File “/home/commcarehq/commcare-hq/corehq/apps/hqadmin/views.py”, line
292, in system_ajax
pillow_meta = get_all_pillows_json()
File “/home/commcarehq/commcare-hq/corehq/ex-submodules/pillowtop/utils.py”,
line 121, in get_all_pillows_json
return [get_pillow_json(pillow_config) for pillow_config in
pillow_configs]
File “/home/commcarehq/commcare-hq/corehq/ex-submodules/pillowtop/utils.py”,
line 144, in get_pillow_json
offsets = pillow.get_change_feed().get_current_offsets()
File “/home/commcarehq/commcare-hq/corehq/apps/change_feed/consumer/feed.py”,
line 110, in get_current_offsets
return get_multi_topic_offset(self.topics)
File “/home/commcarehq/commcare-hq/corehq/apps/change_feed/topics.py”,
line 59, in get_multi_topic_offset
return _get_topic_offsets(topics, latest=True)
File “/home/commcarehq/commcare-hq/corehq/apps/change_feed/topics.py”,
line 74, in _get_topic_offsets
responses = client.send_offset_request(offset_requests)
File “/home/commcarehq/commcare-hq/local/lib/python2.7/site-packages/kafka/client.py”,
line 507, in send_offset_request
KafkaProtocol.decode_offset_response)
File “/home/commcarehq/commcare-hq/local/lib/python2.7/site-packages/kafka/client.py”,
line 166, in _send_broker_aware_request
payload.partition)
File “/home/commcarehq/commcare-hq/local/lib/python2.7/site-packages/kafka/client.py”,
line 86, in _get_leader_for_partition
self.load_metadata_for_topics(topic)
File “/home/commcarehq/commcare-hq/local/lib/python2.7/site-packages/kafka/client.py”,
line 378, in load_metadata_for_topics
kafka.common.check_error(topic_metadata)
File “/home/commcarehq/commcare-hq/local/lib/python2.7/site-packages/kafka/common.py”,
line 233, in check_error
raise error_class(response)
LeaderNotAvailableError: TopicMetadata(topic=‘domain’, error=5,
partitions=[])


You received this message because you are subscribed to the Google Groups
"CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.