Most probably you are using the wrong "nc" command. Not kidding :P there are two different "nc" packages, and the syntax is different betweem then. In debian-like distros they are netcat-openbsd and netcat-traditional, but I ran into the same problems with netcat in CentOS (I can't remember the name of the packages, sorry) until I realized I was using it wrong.
On Tue, Feb 18, 2014 at 11:21 AM, 刘明敏 <[email protected]> wrote: > I try to get zookeeper stat from shell by using nc, > > This works: call nc localhost 2181 first, then type in: *stat*. > > while echo "stat" | nc localhost 2181 returns Nothing. > > Any idea why it doesn't work? > > Thanks ;-) > > -- > Best Regards > > ---------------------- > 刘明敏 | mmLiu > -- --
