Thanks to Jun Rao.Using a ZK shell to connect to ZK is no problem.Today, I use 
kafka-console-producer.sh to test, it also very slow at begin. It block for 
some minute before can send message.The log with  kafka-console-producer.sh is 
blow:  
----- Original Message -----
From: Jun Rao <[email protected]>
To: [email protected], [email protected]
Subject: Re: a problem with producer(it block for some minutes)
Date: 2012-08-31 12:56

Could you try connecting ZK from a ZK shell and see if there is a
connection issue?
Thanks,
Jun
On Thu, Aug 30, 2012 at 4:19 AM, <[email protected]> wrote:
>  Hi,all
>         I meet a problem with producer. When the producer client is
> initializing, it block for some minutes.    I find it block at "producer =
> new Producer<String, String>(config)".   Is it the problem of zookeeper? I
> think so. But I could not find what wrong with it.    The cluster is an
> zookeeper and four brokers.   At the begin, the cluster work well. The
> producer client and consumer client work well too.     But now, the
> initialization of producer client is very slow, it block at "producer = new
> Producer<String, String>(config)"      for some minutes. When the
> connection has finished, it work well.       The consumer client work well
> now. It has not occured block when initializing.  I use the kafka 0.7.1.  I
> want to know what is the reason. How can I resolve it?        Thanks.

Reply via email to