使用 python fast-data-producer.py stock-analyzer 192.168.99.100:9092跑kafka出现 BufferError: Local: Queue full



  • docker ps 可看见kafka已经跑起来,但在执行fast-data-producer.py的时候在程序第30行p.produce(topic, value=payload)产生了BufferError,如下图:
    应该怎么办?
    Kafka producer BufferError
    (envKafka) Henrys-MacBook-Pro:kafka henrywan16$ docker ps
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    a2545e12fe27 redis:alpine “docker-entrypoint.sh” 3 hours ago Up 3 hours 0.0.0.0:6379->6379/tcp redis
    6e200b1e10f0 cassandra:3.7 “/docker-entrypoint.s” 3 hours ago Up 3 hours 0.0.0.0:7001->7001/tcp, 0.0.0.0:7199->7199/tcp, 0.0.0.0:9042->9042/tcp, 7000/tcp, 0.0.0.0:9160->9160/tcp cassandra
    14af422d45e7 confluent/kafka “/usr/local/bin/kafka” 3 hours ago Up 3 hours 0.0.0.0:9092->9092/tcp kafka
    2b436f948916 confluent/zookeeper “/usr/local/bin/zk-do” 3 hours ago Up 3 hours 0.0.0.0:2181->2181/tcp, 0.0.0.0:2888->2888/tcp, 0.0.0.0:3888->3888/tcp zookeeper
    (envKafka) Henrys-MacBook-Pro:kafka henrywan16$ python fast-data-producer.py stock-analyzer 192.168.99.100:9092
    2016-11-28 11:26:58,960 Start to generate data and write to kafka
    %3|1480361218.996|FAIL|rdkafka#producer-1| 14af422d45e7:9092/0: Failed to resolve ‘14af422d45e7:9092’: nodename nor servname provided, or not known
    %3|1480361218.996|ERROR|rdkafka#producer-1| 14af422d45e7:9092/0: Failed to resolve ‘14af422d45e7:9092’: nodename nor servname provided, or not known
    2016-11-28 11:26:59,909 Wrote 100000 records to Kafka in 0.949213981628 seconds
    Traceback (most recent call last):
    File “fast-data-producer.py”, line 75, in
    generate_and_write_data(producer, topic_name)
    File “fast-data-producer.py”, line 30, in generate_and_write_data
    p.produce(topic, value=payload)
    BufferError: Local: Queue full
    2016-11-28 11:26:59,910 Flushing pending messages to kafka
    2016-11-28 11:32:00,747 Finish flushing pending messages to kafka
    (envKafka) Henrys-MacBook-Pro:kafka henrywan16$
    已经试过了使用新的python virtualenv,无效;删除docker-machine rm bigdata 再运行,无效;删除所有containers再run,无效。
    非常感谢


登录后回复
 

与 BitTiger Community 的连接断开,我们正在尝试重连,请耐心等待