You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi
I tried to emit druid metrics to Kafka by druid-metrics-to-kafka, but unfortunately faced some problems.
At first:
Traceback (most recent call last):
File "druid-metrics-collector.py", line 66, in
cherrypy.quickstart(KafkaMetrics(BROKER_LIST, TOPIC))
File "druid-metrics-collector.py", line 35, in init
client = KafkaClient(broker_list)
TypeError: init() takes exactly 1 argument (2 given)
Then I changed the import of KafkaClient from "from kafka.client import KafkaClient" to "from kafka import KafkaClient" and a new problem was encountered:
ERROR:kafka.producer:Unable to send messages
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/kafka/producer/base.py", line 424, in _send_messages
fail_on_error=self.sync_fail_on_error
File "/usr/lib/python2.7/site-packages/kafka/client.py", line 649, in send_produce_request
resps = self._send_broker_aware_request(payloads, encoder, decoder)
File "/usr/lib/python2.7/site-packages/kafka/client.py", line 253, in _send_broker_aware_request
conn = self._get_conn(host, broker.port, afi)
File "/usr/lib/python2.7/site-packages/kafka/client.py", line 74, in _get_conn
conn.connect()
File "/usr/lib/python2.7/site-packages/kafka/conn.py", line 283, in connect
ret = self._sock.connect_ex((self.host, self.port))
AttributeError: 'NoneType' object has no attribute 'connect_ex'
My python is "Python 2.7.5" and my pip is "pip 9.0.1". @theduderog@arrawatia: Would you please help me solve these problems?
The text was updated successfully, but these errors were encountered:
changing the import of KafkaClient from "from kafka.client import KafkaClient" to "from kafka import KafkaClient" works for me.
My python is Python2.7.5 and my pip is also 9.0.1.
maybe your kafka servers have some problems
hi
I tried to emit druid metrics to Kafka by druid-metrics-to-kafka, but unfortunately faced some problems.
At first:
Traceback (most recent call last):
File "druid-metrics-collector.py", line 66, in
cherrypy.quickstart(KafkaMetrics(BROKER_LIST, TOPIC))
File "druid-metrics-collector.py", line 35, in init
client = KafkaClient(broker_list)
TypeError: init() takes exactly 1 argument (2 given)
Then I changed the import of KafkaClient from "from kafka.client import KafkaClient" to "from kafka import KafkaClient" and a new problem was encountered:
ERROR:kafka.producer:Unable to send messages
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/kafka/producer/base.py", line 424, in _send_messages
fail_on_error=self.sync_fail_on_error
File "/usr/lib/python2.7/site-packages/kafka/client.py", line 649, in send_produce_request
resps = self._send_broker_aware_request(payloads, encoder, decoder)
File "/usr/lib/python2.7/site-packages/kafka/client.py", line 253, in _send_broker_aware_request
conn = self._get_conn(host, broker.port, afi)
File "/usr/lib/python2.7/site-packages/kafka/client.py", line 74, in _get_conn
conn.connect()
File "/usr/lib/python2.7/site-packages/kafka/conn.py", line 283, in connect
ret = self._sock.connect_ex((self.host, self.port))
AttributeError: 'NoneType' object has no attribute 'connect_ex'
My python is "Python 2.7.5" and my pip is "pip 9.0.1".
@theduderog @arrawatia: Would you please help me solve these problems?
The text was updated successfully, but these errors were encountered: