kafaka 单机安装 及 连通性测试

http://czj4451.iteye.com/blog/2041096

/user/local/kafka_2.9.2-0.8.1.1

KAFKA

单机测试连通性,成功:producer端输入什么内容,cusumer端就显示什么内容。 ok

http://czj4451.iteye.com/blog/2041096
http://czj4451.iteye.com/blog/2041096

dataLength = 9
numChildren = 0
[zk: 127.0.0.1:2181(CONNECTED) 13] get /mykey2
myvalue22
cZxid = 0xfe
ctime = Tue Jun 28 06:11:15 PDT 2016
mZxid = 0x10e
mtime = Tue Jun 28 06:12:25 PDT 2016
pZxid = 0xfe
cversion = 0
dataVersion = 1
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 9
numChildren = 0
[zk: 127.0.0.1:2181(CONNECTED) 14] set /mykey1
[zk: 127.0.0.1:2181(CONNECTED) 15] get /mykey1
myvalue11
cZxid = 0xfa
ctime = Tue Jun 28 06:10:59 PDT 2016
mZxid = 0x10a
mtime = Tue Jun 28 06:12:10 PDT 2016
pZxid = 0xfa
cversion = 0
dataVersion = 1
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 9
numChildren = 0
[zk: 127.0.0.1:2181(CONNECTED) 16] get /mykey1
myvalue11
cZxid = 0xfa
ctime = Tue Jun 28 06:10:59 PDT 2016
mZxid = 0x10a
mtime = Tue Jun 28 06:12:10 PDT 2016
pZxid = 0xfa
cversion = 0
dataVersion = 1
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 9
numChildren = 0
[zk: 127.0.0.1:2181(CONNECTED) 17] delete /mykey1
[zk: 127.0.0.1:2181(CONNECTED) 18] get /mykey1   
Node does not exist: /mykey1
[zk: 127.0.0.1:2181(CONNECTED) 19] 2016-06-28 06:55:50,623 [myid:] - INFO  [main-SendThread(127.0.0.1:2181):ClientCnxn$SendThread@1098] - Unable to read additional data from server sessionid 0x15596acc2aa0005, likely server has closed socket, closing socket connection and attempting reconnect

WATCHER::

WatchedEvent state:Disconnected type:None path:null
2016-06-28 06:55:52,632 [myid:] - INFO  [main-SendThread(127.0.0.1:2181):ClientCnxn$SendThread@975] - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2016-06-28 06:55:52,633 [myid:] - INFO  [main-SendThread(127.0.0.1:2181):ClientCnxn$SendThread@852] - Socket connection established to 127.0.0.1/127.0.0.1:2181, initiating session

WATCHER::

WatchedEvent state:Expired type:None path:null
2016-06-28 06:55:52,635 [myid:] - INFO  [main-EventThread:ClientCnxn$EventThread@512] - EventThread shut down
2016-06-28 06:55:52,635 [myid:] - INFO  [main-SendThread(127.0.0.1:2181):ClientCnxn$SendThread@1094] - Unable to reconnect to ZooKeeper service, session 0x15596acc2aa0005 has expired, closing socket connection

[zk: 127.0.0.1:2181(CLOSED) 19] 
[zk: 127.0.0.1:2181(CLOSED) 19] 
[zk: 127.0.0.1:2181(CLOSED) 19] get /mykey1   
Not connected
[zk: 127.0.0.1:2181(CLOSED) 20] get /mykey1          
Not connected
[zk: 127.0.0.1:2181(CLOSED) 21] quit
Quitting...
[root@cdh1 zookeeper-3.4.6]# zkCli.sh -server 127.0.0.1:2181
Connecting to 127.0.0.1:2181
2016-06-28 06:56:42,733 [myid:] - INFO  [main:Environment@100] - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2016-06-28 06:56:42,737 [myid:] - INFO  [main:Environment@100] - Client environment:host.name=cdh1
2016-06-28 06:56:42,737 [myid:] - INFO  [main:Environment@100] - Client environment:java.version=1.7.0_67
2016-06-28 06:56:42,739 [myid:] - INFO  [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2016-06-28 06:56:42,739 [myid:] - INFO  [main:Environment@100] - Client environment:java.home=/user/local/jdk/jre
2016-06-28 06:56:42,739 [myid:] - INFO  [main:Environment@100] - Client environment:java.class.path=/user/local/zookeeper-3.4.6/bin/../build/classes:/user/local/zookeeper-3.4.6/bin/../build/lib/*.jar:/user/local/zookeeper-3.4.6/bin/../lib/slf4j-log4j12-1.6.1.jar:/user/local/zookeeper-3.4.6/bin/../lib/slf4j-api-1.6.1.jar:/user/local/zookeeper-3.4.6/bin/../lib/netty-3.7.0.Final.jar:/user/local/zookeeper-3.4.6/bin/../lib/log4j-1.2.16.jar:/user/local/zookeeper-3.4.6/bin/../lib/jline-0.9.94.jar:/user/local/zookeeper-3.4.6/bin/../zookeeper-3.4.6.jar:/user/local/zookeeper-3.4.6/bin/../src/java/lib/*.jar:/user/local/zookeeper-3.4.6/bin/../conf:.:/user/local/jdk/lib:/user/local/jdk/jre/lib
2016-06-28 06:56:42,739 [myid:] - INFO  [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/i386:/lib:/usr/lib
2016-06-28 06:56:42,740 [myid:] - INFO  [main:Environment@100] - Client environment:java.io.tmpdir=/tmp
2016-06-28 06:56:42,740 [myid:] - INFO  [main:Environment@100] - Client environment:java.compiler=<NA>
2016-06-28 06:56:42,741 [myid:] - INFO  [main:Environment@100] - Client environment:os.name=Linux
2016-06-28 06:56:42,742 [myid:] - INFO  [main:Environment@100] - Client environment:os.arch=i386
2016-06-28 06:56:42,742 [myid:] - INFO  [main:Environment@100] - Client environment:os.version=2.6.32-358.el6.i686
2016-06-28 06:56:42,742 [myid:] - INFO  [main:Environment@100] - Client environment:user.name=root
2016-06-28 06:56:42,742 [myid:] - INFO  [main:Environment@100] - Client environment:user.home=/root
2016-06-28 06:56:42,742 [myid:] - INFO  [main:Environment@100] - Client environment:user.dir=/user/local/zookeeper-3.4.6
2016-06-28 06:56:42,749 [myid:] - INFO  [main:ZooKeeper@438] - Initiating client connection, connectString=127.0.0.1:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@e13c84
Welcome to ZooKeeper!
2016-06-28 06:56:42,794 [myid:] - INFO  [main-SendThread(127.0.0.1:2181):ClientCnxn$SendThread@975] - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
JLine support is enabled
2016-06-28 06:56:42,817 [myid:] - INFO  [main-SendThread(127.0.0.1:2181):ClientCnxn$SendThread@852] - Socket connection established to 127.0.0.1/127.0.0.1:2181, initiating session
2016-06-28 06:56:42,846 [myid:] - INFO  [main-SendThread(127.0.0.1:2181):ClientCnxn$SendThread@1235] - Session establishment complete on server 127.0.0.1/127.0.0.1:2181, sessionid = 0x15596acc2aa0008, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None path:null
[zk: 127.0.0.1:2181(CONNECTED) 0] ls /
[storm, mykey2, zookeeper]
[zk: 127.0.0.1:2181(CONNECTED) 1] 2016-06-28 15:24:06,572 [myid:] - INFO  [main-SendThread(127.0.0.1:2181):ClientCnxn$SendThread@1098] - Unable to read additional data from server sessionid 0x15596acc2aa0008, likely server has closed socket, closing socket connection and attempting reconnect

WATCHER::

WatchedEvent state:Disconnected type:None path:null
2016-06-28 15:24:08,010 [myid:] - INFO  [main-SendThread(127.0.0.1:2181):ClientCnxn$SendThread@975] - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2016-06-28 15:24:08,019 [myid:] - INFO  [main-SendThread(127.0.0.1:2181):ClientCnxn$SendThread@852] - Socket connection established to 127.0.0.1/127.0.0.1:2181, initiating session

WATCHER::

WatchedEvent state:Expired type:None path:null
2016-06-28 15:24:08,035 [myid:] - INFO  [main-EventThread:ClientCnxn$EventThread@512] - EventThread shut down
2016-06-28 15:24:08,050 [myid:] - INFO  [main-SendThread(127.0.0.1:2181):ClientCnxn$SendThread@1094] - Unable to reconnect to ZooKeeper service, session 0x15596acc2aa0008 has expired, closing socket connection

[10]+  Stopped                 zkCli.sh -server 127.0.0.1:2181
[root@cdh1 zookeeper-3.4.6]# pwd
/user/local/zookeeper-3.4.6
[root@cdh1 zookeeper-3.4.6]# ls -l
total 1568
drwxr-xr-x  2 1000 1000    4096 Feb 20  2014 bin
-rw-rw-r--  1 1000 1000   82446 Feb 20  2014 build.xml
-rw-rw-r--  1 1000 1000   80776 Feb 20  2014 CHANGES.txt
drwxr-xr-x  2 1000 1000    4096 Jun 28 03:58 conf
drwxr-xr-x 10 1000 1000    4096 Feb 20  2014 contrib
drwxr-xr-x  3 root root    4096 Jun 28 04:02 data
drwxr-xr-x  2 1000 1000    4096 Feb 20  2014 dist-maven
drwxr-xr-x  6 1000 1000    4096 Feb 20  2014 docs
-rw-rw-r--  1 1000 1000    1953 Feb 20  2014 ivysettings.xml
-rw-rw-r--  1 1000 1000    3375 Feb 20  2014 ivy.xml
drwxr-xr-x  4 1000 1000    4096 Feb 20  2014 lib
-rw-rw-r--  1 1000 1000   11358 Feb 20  2014 LICENSE.txt
-rw-rw-r--  1 1000 1000     170 Feb 20  2014 NOTICE.txt
-rw-rw-r--  1 1000 1000    1770 Feb 20  2014 README_packaging.txt
-rw-rw-r--  1 1000 1000    1585 Feb 20  2014 README.txt
drwxr-xr-x  5 1000 1000    4096 Feb 20  2014 recipes
drwxr-xr-x  8 1000 1000    4096 Feb 20  2014 src
-rw-rw-r--  1 1000 1000 1340305 Feb 20  2014 zookeeper-3.4.6.jar
-rw-rw-r--  1 1000 1000     836 Feb 20  2014 zookeeper-3.4.6.jar.asc
-rw-rw-r--  1 1000 1000      33 Feb 20  2014 zookeeper-3.4.6.jar.md5
-rw-rw-r--  1 1000 1000      41 Feb 20  2014 zookeeper-3.4.6.jar.sha1
[root@cdh1 zookeeper-3.4.6]# zkServer.sh stop
JMX enabled by default
Using config: /user/local/zookeeper-3.4.6/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
[root@cdh1 zookeeper-3.4.6]# zkServer.sh status
JMX enabled by default
Using config: /user/local/zookeeper-3.4.6/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
[root@cdh1 zookeeper-3.4.6]# cd ../
[root@cdh1 local]# ls -l
total 14912
drwxr-xr-x 11 root   root       4096 Jun 28 05:50 apache-storm-0.9.2-incubating
drwxr-xr-x 10 root   root       4096 Jun 16 16:19 hadoop-2.6.0
drwxr-xr-x  9 root   root       4096 Jun 27 08:40 hbase-0.98.20-hadoop2
drwxr-xr-x  8 root   root       4096 Jun 16 02:50 jdk
drwxr-xr-x 10 root   root       4096 Jun 27 23:49 jzmq
drwxr-xr-x  5 root   root       4096 Apr 22  2014 kafka_2.9.2-0.8.1.1
-rwxr-xr-x  1 root   root   15067175 Jun 28 15:34 kafka_2.9.2-0.8.1.1.tgz
-rwxr-xr-x  1 root   root     123912 Jun 28 08:05 netcat-0.7.1-1.i386.rpm
drwxr-x--- 18   1000   1002     4096 Jun 27 23:56 Python-2.7.2
drwxr-xr-x  8    119    129     4096 Jun 17 08:35 scala-2.9.3
drwxr-xr-x 13 hadoop hadoop     4096 Jun 17 09:03 spark-1.4.0-bin-hadoop2.6
drwxr-xr-x  2 root   root       4096 Jun 28 15:32 src_old
drwxrwxr-x 11   1000   1000     4096 Jun 27 23:44 zeromq-4.1.2
drwxr-xr-x 11   1000   1000     4096 Jun 28 03:56 zookeeper-3.4.6
[root@cdh1 local]# cd apache-storm-0.9.2-incubating/
[root@cdh1 apache-storm-0.9.2-incubating]# ls -l
total 120
drwxr-xr-x 2 root root   4096 Jun 28 02:30 bin
-rw-r--r-- 1  502 games 34239 Jun 12  2014 CHANGELOG.md
drwxr-xr-x 2 root root   4096 Jun 28 02:42 conf
-rw-r--r-- 1  502 games   538 Mar 12  2014 DISCLAIMER
drwxr-xr-x 3  502 games  4096 May  5  2014 examples
drwxr-xr-x 3 root root   4096 Jun 28 02:30 external
drwxr-xr-x 2 root root   4096 Jun 28 02:30 lib
-rw-r--r-- 1  502 games 22822 Jun 11  2014 LICENSE
drwxr-xr-x 2 root root   4096 Jun 28 02:30 logback
drwxr-xr-x 2 root root   4096 Jun 28 05:52 logs
-rw-r--r-- 1  502 games   981 Jun 10  2014 NOTICE
drwxr-xr-x 5 root root   4096 Jun 28 02:30 public
-rw-r--r-- 1  502 games  7445 Jun  9  2014 README.markdown
-rw-r--r-- 1  502 games    17 Jun 16  2014 RELEASE
-rw-r--r-- 1  502 games  3581 May 29  2014 SECURITY.md
drwxr-xr-x 4 root root   4096 Jun 28 05:51 temp
[root@cdh1 apache-storm-0.9.2-incubating]# cd bin
[root@cdh1 bin]# ls -l
total 32
-rwxr-xr-x 1 502 games 16901 May 29  2014 storm
-rw-r--r-- 1 502 games  7337 May 28  2014 storm.cmd
-rw-r--r-- 1 502 games  3204 May 28  2014 storm-config.cmd
[root@cdh1 bin]# cd storm
bash: cd: storm: Not a directory
[root@cdh1 bin]# jps
3855 Jps
4033 ZooKeeperMain
5706 Jps
3780 supervisor
3692 nimbus
3845 core
4229 ZooKeeperMain
[root@cdh1 bin]# zkServer.sh status
JMX enabled by default
Using config: /user/local/zookeeper-3.4.6/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
[root@cdh1 bin]# zkServer.sh stop
JMX enabled by default
Using config: /user/local/zookeeper-3.4.6/bin/../conf/zoo.cfg
Stopping zookeeper ... no zookeeper to stop (could not find file /user/local/zookeeper-3.4.6/data/zookeeper_server.pid)
[root@cdh1 bin]# zkServer.sh status
JMX enabled by default
Using config: /user/local/zookeeper-3.4.6/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
[root@cdh1 bin]# storm nimbus status
Running: /user/local/jdk/bin/java -server -Dstorm.options= -Dstorm.home=/user/local/apache-storm-0.9.2-incubating -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib -Dstorm.conf.file= -cp /user/local/apache-storm-0.9.2-incubating/lib/zookeeper-3.4.5.jar:/user/local/apache-storm-0.9.2-incubating/lib/json-simple-1.1.jar:/user/local/apache-storm-0.9.2-incubating/lib/commons-fileupload-1.2.1.jar:/user/local/apache-storm-0.9.2-incubating/lib/netty-3.2.2.Final.jar:/user/local/apache-storm-0.9.2-incubating/lib/servlet-api-2.5.jar:/user/local/apache-storm-0.9.2-incubating/lib/jetty-util-6.1.26.jar:/user/local/apache-storm-0.9.2-incubating/lib/commons-codec-1.6.jar:/user/local/apache-storm-0.9.2-incubating/lib/logback-classic-1.0.6.jar:/user/local/apache-storm-0.9.2-incubating/lib/guava-13.0.jar:/user/local/apache-storm-0.9.2-incubating/lib/objenesis-1.2.jar:/user/local/apache-storm-0.9.2-incubating/lib/math.numeric-tower-0.0.1.jar:/user/local/apache-storm-0.9.2-incubating/lib/chill-java-0.3.5.jar:/user/local/apache-storm-0.9.2-incubating/lib/carbonite-1.4.0.jar:/user/local/apache-storm-0.9.2-incubating/lib/tools.logging-0.2.3.jar:/user/local/apache-storm-0.9.2-incubating/lib/jetty-6.1.26.jar:/user/local/apache-storm-0.9.2-incubating/lib/clout-1.0.1.jar:/user/local/apache-storm-0.9.2-incubating/lib/joda-time-2.0.jar:/user/local/apache-storm-0.9.2-incubating/lib/asm-4.0.jar:/user/local/apache-storm-0.9.2-incubating/lib/kryo-2.21.jar:/user/local/apache-storm-0.9.2-incubating/lib/minlog-1.2.jar:/user/local/apache-storm-0.9.2-incubating/lib/commons-io-2.4.jar:/user/local/apache-storm-0.9.2-incubating/lib/disruptor-2.10.1.jar:/user/local/apache-storm-0.9.2-incubating/lib/commons-logging-1.1.3.jar:/user/local/apache-storm-0.9.2-incubating/lib/servlet-api-2.5-20081211.jar:/user/local/apache-storm-0.9.2-incubating/lib/snakeyaml-1.11.jar:/user/local/apache-storm-0.9.2-incubating/lib/reflectasm-1.07-shaded.jar:/user/local/apache-storm-0.9.2-incubating/lib/clojure-1.5.1.jar:/user/local/apache-storm-0.9.2-incubating/lib/ring-servlet-0.3.11.jar:/user/local/apache-storm-0.9.2-incubating/lib/tools.macro-0.1.0.jar:/user/local/apache-storm-0.9.2-incubating/lib/netty-3.6.3.Final.jar:/user/local/apache-storm-0.9.2-incubating/lib/jgrapht-core-0.9.0.jar:/user/local/apache-storm-0.9.2-incubating/lib/httpcore-4.3.2.jar:/user/local/apache-storm-0.9.2-incubating/lib/storm-core-0.9.2-incubating.jar:/user/local/apache-storm-0.9.2-incubating/lib/slf4j-api-1.6.5.jar:/user/local/apache-storm-0.9.2-incubating/lib/jline-2.11.jar:/user/local/apache-storm-0.9.2-incubating/lib/tools.cli-0.2.4.jar:/user/local/apache-storm-0.9.2-incubating/lib/curator-client-2.4.0.jar:/user/local/apache-storm-0.9.2-incubating/lib/compojure-1.1.3.jar:/user/local/apache-storm-0.9.2-incubating/lib/commons-lang-2.5.jar:/user/local/apache-storm-0.9.2-incubating/lib/hiccup-0.3.6.jar:/user/local/apache-storm-0.9.2-incubating/lib/curator-framework-2.4.0.jar:/user/local/apache-storm-0.9.2-incubating/lib/logback-core-1.0.6.jar:/user/local/apache-storm-0.9.2-incubating/lib/log4j-over-slf4j-1.6.6.jar:/user/local/apache-storm-0.9.2-incubating/lib/clj-time-0.4.1.jar:/user/local/apache-storm-0.9.2-incubating/lib/ring-jetty-adapter-0.3.11.jar:/user/local/apache-storm-0.9.2-incubating/lib/ring-devel-0.3.11.jar:/user/local/apache-storm-0.9.2-incubating/lib/httpclient-4.3.3.jar:/user/local/apache-storm-0.9.2-incubating/lib/commons-exec-1.1.jar:/user/local/apache-storm-0.9.2-incubating/lib/clj-stacktrace-0.2.4.jar:/user/local/apache-storm-0.9.2-incubating/lib/ring-core-1.1.5.jar:/user/local/apache-storm-0.9.2-incubating/lib/core.incubator-0.1.0.jar:/user/local/apache-storm-0.9.2-incubating/conf -Xmx1024m -Dlogfile.name=nimbus.log -Dlogback.configurationFile=/user/local/apache-storm-0.9.2-incubating/logback/cluster.xml status
Error: Could not find or load main class status
[5]   Exit 20                 storm nimbus  (wd: /user/local/zookeeper-3.4.6)
(wd now: /user/local/apache-storm-0.9.2-incubating/bin)
[6]   Exit 20                 storm supervisor  (wd: /user/local/zookeeper-3.4.6)
(wd now: /user/local/apache-storm-0.9.2-incubating/bin)
[root@cdh1 bin]# pwd
/user/local/apache-storm-0.9.2-incubating/bin
[root@cdh1 bin]# jps
3855 Jps
4033 ZooKeeperMain
5834 Jps
3845 core
4229 ZooKeeperMain
[root@cdh1 bin]# kill -9 4033
[root@cdh1 bin]# jps
3855 Jps
4033 ZooKeeperMain
5846 Jps
3845 core
4229 ZooKeeperMain
[root@cdh1 bin]# kill -9 4229
[root@cdh1 bin]# jps
3855 Jps
5856 Jps
4033 ZooKeeperMain
3845 core
4229 ZooKeeperMain
[root@cdh1 bin]# kill -9 4229
[root@cdh1 bin]# jps
3855 Jps
4033 ZooKeeperMain
3845 core
5865 Jps
4229 ZooKeeperMain
[root@cdh1 bin]# kill -9 4033
[root@cdh1 bin]# jps
5875 Jps
3855 Jps
4033 ZooKeeperMain
3845 core
4229 ZooKeeperMain
[root@cdh1 bin]# zkServer.sh status
JMX enabled by default
Using config: /user/local/zookeeper-3.4.6/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
[root@cdh1 bin]# zkServer.sh stop
JMX enabled by default
Using config: /user/local/zookeeper-3.4.6/bin/../conf/zoo.cfg
Stopping zookeeper ... no zookeeper to stop (could not find file /user/local/zookeeper-3.4.6/data/zookeeper_server.pid)
[root@cdh1 bin]# jps
5933 Jps
3855 Jps
4033 ZooKeeperMain
3845 core
4229 ZooKeeperMain
[root@cdh1 bin]# cd /user/local/zookeeper-3.4.6/bin
[root@cdh1 bin]# jps
3855 Jps
4033 ZooKeeperMain
5947 Jps
3845 core
4229 ZooKeeperMain
[root@cdh1 bin]# zkServer.sh stop
JMX enabled by default
Using config: /user/local/zookeeper-3.4.6/bin/../conf/zoo.cfg
Stopping zookeeper ... no zookeeper to stop (could not find file /user/local/zookeeper-3.4.6/data/zookeeper_server.pid)
[root@cdh1 bin]# jps
3855 Jps
4033 ZooKeeperMain
3845 core
5969 Jps
4229 ZooKeeperMain
[root@cdh1 bin]# cd -
/user/local/apache-storm-0.9.2-incubating/bin
[root@cdh1 bin]# storm ui stop
Traceback (most recent call last):
  File "/user/local/apache-storm-0.9.2-incubating/bin/storm", line 472, in <module>
    main()
  File "/user/local/apache-storm-0.9.2-incubating/bin/storm", line 469, in main
    (COMMANDS.get(COMMAND, unknown_command))(*ARGS)
TypeError: ui() takes no arguments (1 given)
[root@cdh1 bin]# jps
3855 Jps
4033 ZooKeeperMain
5985 Jps
3845 core
4229 ZooKeeperMain
[root@cdh1 bin]# kill -9 3845
[root@cdh1 bin]# jps
3855 Jps
4033 ZooKeeperMain
5998 Jps
4229 ZooKeeperMain
[7]   Killed                  storm ui  (wd: /user/local/zookeeper-3.4.6)
(wd now: /user/local/apache-storm-0.9.2-incubating/bin)
[root@cdh1 bin]# jps
3855 Jps
4033 ZooKeeperMain
4229 ZooKeeperMain
6007 Jps
[root@cdh1 bin]# pwd
/user/local/apache-storm-0.9.2-incubating/bin
[root@cdh1 bin]# kill -9 4033
[root@cdh1 bin]# pwd
/user/local/apache-storm-0.9.2-incubating/bin
[root@cdh1 bin]# jps
3855 Jps
4033 ZooKeeperMain
6019 Jps
4229 ZooKeeperMain
[root@cdh1 bin]# vim /etc/profile
[root@cdh1 bin]# source /etc/profile
[root@cdh1 bin]# pwd
/user/local/apache-storm-0.9.2-incubating/bin
[root@cdh1 bin]# cd ../../kafka_2.9.2-0.8.1.1/bin/
[root@cdh1 bin]# pwd
/user/local/kafka_2.9.2-0.8.1.1/bin
[root@cdh1 bin]# jps
3855 Jps
4033 ZooKeeperMain
6111 Jps
4229 ZooKeeperMain
[root@cdh1 bin]# bin/zookeeper-server-start.sh config/zookeeper.properties & 
[11] 6120
[root@cdh1 bin]# bash: bin/zookeeper-server-start.sh: No such file or directory
^C
[11]   Exit 127                bin/zookeeper-server-start.sh config/zookeeper.properties
[root@cdh1 bin]# zookeeper-server-start.sh config/zookeeper.properties & 
[11] 6122
[root@cdh1 bin]# [2016-06-28 15:57:14,028] INFO Reading configuration from: config/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2016-06-28 15:57:14,030] FATAL Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain)
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing config/zookeeper.properties
	at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:110)
	at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:99)
	at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:76)
Caused by: java.lang.IllegalArgumentException: config/zookeeper.properties file is missing
	at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:94)
	... 2 more
Invalid config, exiting abnormally
^C
[11]   Exit 2                  zookeeper-server-start.sh config/zookeeper.properties
[root@cdh1 bin]# pwd
/user/local/kafka_2.9.2-0.8.1.1/bin
[root@cdh1 bin]# cd ..
[root@cdh1 kafka_2.9.2-0.8.1.1]# bin/zookeeper-server-start.sh config/zookeeper.properties & 
[11] 6150
[root@cdh1 kafka_2.9.2-0.8.1.1]# [2016-06-28 15:58:20,002] INFO Reading configuration from: config/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2016-06-28 15:58:20,003] WARN Either no config or no quorum defined in config, running  in standalone mode (org.apache.zookeeper.server.quorum.QuorumPeerMain)
[2016-06-28 15:58:20,035] INFO Reading configuration from: config/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2016-06-28 15:58:20,039] INFO Starting server (org.apache.zookeeper.server.ZooKeeperServerMain)
[2016-06-28 15:58:20,063] INFO Server environment:zookeeper.version=3.3.3-1203054, built on 11/17/2011 05:47 GMT (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,064] INFO Server environment:host.name=cdh1 (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,064] INFO Server environment:java.version=1.7.0_67 (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,064] INFO Server environment:java.vendor=Oracle Corporation (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,064] INFO Server environment:java.home=/user/local/jdk/jre (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,064] INFO Server environment:java.class.path=.:/user/local/jdk/lib:/user/local/jdk/jre/lib:/user/local/kafka_2.9.2-0.8.1.1/bin/../core/build/dependant-libs-2.8.0/*.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../perf/build/libs//kafka-perf_2.8.0*.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../clients/build/libs//kafka-clients*.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../examples/build/libs//kafka-examples*.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../contrib/hadoop-consumer/build/libs//kafka-hadoop-consumer*.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../contrib/hadoop-producer/build/libs//kafka-hadoop-producer*.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/jopt-simple-3.2.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/kafka_2.9.2-0.8.1.1.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/kafka_2.9.2-0.8.1.1-javadoc.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/kafka_2.9.2-0.8.1.1-scaladoc.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/kafka_2.9.2-0.8.1.1-sources.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/log4j-1.2.15.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/metrics-core-2.2.0.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/scala-library-2.9.2.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/slf4j-api-1.7.2.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/snappy-java-1.0.5.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/zkclient-0.3.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/zookeeper-3.3.4.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../core/build/libs/kafka_2.8.0*.jar (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,064] INFO Server environment:java.library.path=/usr/java/packages/lib/i386:/lib:/usr/lib (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,066] INFO Server environment:java.io.tmpdir=/tmp (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,066] INFO Server environment:java.compiler=<NA> (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,066] INFO Server environment:os.name=Linux (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,066] INFO Server environment:os.arch=i386 (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,066] INFO Server environment:os.version=2.6.32-358.el6.i686 (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,066] INFO Server environment:user.name=root (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,068] INFO Server environment:user.home=/root (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,068] INFO Server environment:user.dir=/user/local/kafka_2.9.2-0.8.1.1 (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,080] INFO tickTime set to 3000 (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,080] INFO minSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,080] INFO maxSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2016-06-28 15:58:20,120] INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxn)
[2016-06-28 15:58:20,142] INFO Snapshotting: 0 (org.apache.zookeeper.server.persistence.FileTxnSnapLog)
[2016-06-28 15:59:02,523] INFO Accepted socket connection from /0:0:0:0:0:0:0:1:41763 (org.apache.zookeeper.server.NIOServerCnxn)
[2016-06-28 15:59:02,572] INFO Client attempting to establish new session at /0:0:0:0:0:0:0:1:41763 (org.apache.zookeeper.server.NIOServerCnxn)
[2016-06-28 15:59:02,606] INFO Creating new log file: log.1 (org.apache.zookeeper.server.persistence.FileTxnLog)
[2016-06-28 15:59:02,686] INFO Established session 0x155993c17870000 with negotiated timeout 6000 for client /0:0:0:0:0:0:0:1:41763 (org.apache.zookeeper.server.NIOServerCnxn)
[2016-06-28 15:59:02,778] INFO Got user-level KeeperException when processing sessionid:0x155993c17870000 type:create cxid:0x4 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/brokers Error:KeeperErrorCode = NoNode for /brokers (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 15:59:02,813] INFO Got user-level KeeperException when processing sessionid:0x155993c17870000 type:create cxid:0xa zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/config Error:KeeperErrorCode = NoNode for /config (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 15:59:02,821] INFO Got user-level KeeperException when processing sessionid:0x155993c17870000 type:create cxid:0x10 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/admin Error:KeeperErrorCode = NoNode for /admin (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 15:59:03,533] INFO Got user-level KeeperException when processing sessionid:0x155993c17870000 type:setData cxid:0x1a zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/controller_epoch Error:KeeperErrorCode = NoNode for /controller_epoch (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 15:59:03,735] INFO Got user-level KeeperException when processing sessionid:0x155993c17870000 type:delete cxid:0x27 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/admin/preferred_replica_election Error:KeeperErrorCode = NoNode for /admin/preferred_replica_election (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 16:00:34,737] INFO Accepted socket connection from /127.0.0.1:51026 (org.apache.zookeeper.server.NIOServerCnxn)
[2016-06-28 16:00:34,751] INFO Client attempting to establish new session at /127.0.0.1:51026 (org.apache.zookeeper.server.NIOServerCnxn)
[2016-06-28 16:00:34,753] INFO Established session 0x155993c17870001 with negotiated timeout 6000 for client /127.0.0.1:51026 (org.apache.zookeeper.server.NIOServerCnxn)
[2016-06-28 16:00:34,968] INFO Accepted socket connection from /127.0.0.1:51027 (org.apache.zookeeper.server.NIOServerCnxn)
[2016-06-28 16:00:34,968] INFO Client attempting to establish new session at /127.0.0.1:51027 (org.apache.zookeeper.server.NIOServerCnxn)
[2016-06-28 16:00:34,970] INFO Established session 0x155993c17870002 with negotiated timeout 30000 for client /127.0.0.1:51027 (org.apache.zookeeper.server.NIOServerCnxn)
[2016-06-28 16:00:34,987] INFO Processed session termination for sessionid: 0x155993c17870002 (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 16:00:34,990] INFO Closed socket connection for client /127.0.0.1:51027 which had sessionid 0x155993c17870002 (org.apache.zookeeper.server.NIOServerCnxn)
[2016-06-28 16:00:35,163] INFO Got user-level KeeperException when processing sessionid:0x155993c17870001 type:create cxid:0x2 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/consumers/console-consumer-57356/ids Error:KeeperErrorCode = NoNode for /consumers/console-consumer-57356/ids (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 16:00:35,165] INFO Got user-level KeeperException when processing sessionid:0x155993c17870001 type:create cxid:0x3 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/consumers/console-consumer-57356 Error:KeeperErrorCode = NoNode for /consumers/console-consumer-57356 (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 16:02:03,317] INFO Got user-level KeeperException when processing sessionid:0x155993c17870000 type:setData cxid:0x37 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/config/topics/test Error:KeeperErrorCode = NoNode for /config/topics/test (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 16:02:03,380] INFO Got user-level KeeperException when processing sessionid:0x155993c17870000 type:create cxid:0x38 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/config/topics Error:KeeperErrorCode = NodeExists for /config/topics (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 16:02:03,889] INFO Got user-level KeeperException when processing sessionid:0x155993c17870000 type:create cxid:0x43 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/brokers/topics/test/partitions/0 Error:KeeperErrorCode = NoNode for /brokers/topics/test/partitions/0 (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 16:02:03,894] INFO Got user-level KeeperException when processing sessionid:0x155993c17870000 type:create cxid:0x44 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/brokers/topics/test/partitions Error:KeeperErrorCode = NoNode for /brokers/topics/test/partitions (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 16:02:03,934] INFO Got user-level KeeperException when processing sessionid:0x155993c17870000 type:create cxid:0x48 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/brokers/topics/test/partitions/1 Error:KeeperErrorCode = NoNode for /brokers/topics/test/partitions/1 (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 16:02:04,066] INFO Got user-level KeeperException when processing sessionid:0x155993c17870001 type:create cxid:0x2a zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/consumers/console-consumer-57356/owners/test Error:KeeperErrorCode = NoNode for /consumers/console-consumer-57356/owners/test (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 16:02:04,068] INFO Got user-level KeeperException when processing sessionid:0x155993c17870001 type:create cxid:0x2b zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/consumers/console-consumer-57356/owners Error:KeeperErrorCode = NoNode for /consumers/console-consumer-57356/owners (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 16:02:34,966] INFO Got user-level KeeperException when processing sessionid:0x155993c17870001 type:setData cxid:0x34 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/consumers/console-consumer-57356/offsets/test/0 Error:KeeperErrorCode = NoNode for /consumers/console-consumer-57356/offsets/test/0 (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 16:02:34,969] INFO Got user-level KeeperException when processing sessionid:0x155993c17870001 type:create cxid:0x35 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/consumers/console-consumer-57356/offsets Error:KeeperErrorCode = NoNode for /consumers/console-consumer-57356/offsets (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 16:02:34,982] INFO Got user-level KeeperException when processing sessionid:0x155993c17870001 type:setData cxid:0x39 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/consumers/console-consumer-57356/offsets/test/1 Error:KeeperErrorCode = NoNode for /consumers/console-consumer-57356/offsets/test/1 (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-06-28 16:02:34,985] INFO Got user-level KeeperException when processing sessionid:0x155993c17870001 type:create cxid:0x3a zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/consumers/console-consumer-57356/offsets/test Error:KeeperErrorCode = NodeExists for /consumers/console-consumer-57356/offsets/test (org.apache.zookeeper.server.PrepRequestProcessor)


producer 端
[root@cdh1 Desktop]# source /etc/profile
[root@cdh1 Desktop]# cd /user/local/kafka_2.9.2-0.8.1.1/bin
[root@cdh1 bin]# pwd
/user/local/kafka_2.9.2-0.8.1.1/bin
[root@cdh1 bin]# source /etc/profile
[root@cdh1 bin]# jps
3855 Jps
4033 ZooKeeperMain
6102 Jps
4229 ZooKeeperMain
[root@cdh1 bin]# jps
3855 Jps
4033 ZooKeeperMain
6140 Jps
4229 ZooKeeperMain
[root@cdh1 bin]# cd ..
[root@cdh1 kafka_2.9.2-0.8.1.1]# jps
3855 Jps
4033 ZooKeeperMain
6150 QuorumPeerMain
6171 Jps
4229 ZooKeeperMain
[root@cdh1 kafka_2.9.2-0.8.1.1]# bin/kafka-server-start.sh config/server.properties &
[1] 6182
[root@cdh1 kafka_2.9.2-0.8.1.1]# [2016-06-28 15:59:01,744] INFO Verifying properties (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,119] INFO Property broker.id is overridden to 0 (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,119] INFO Property log.cleaner.enable is overridden to false (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,123] INFO Property log.dirs is overridden to /tmp/kafka-logs (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,123] INFO Property log.retention.check.interval.ms is overridden to 60000 (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,126] INFO Property log.retention.hours is overridden to 168 (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,127] INFO Property log.segment.bytes is overridden to 536870912 (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,127] INFO Property num.io.threads is overridden to 8 (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,127] INFO Property num.network.threads is overridden to 2 (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,128] INFO Property num.partitions is overridden to 2 (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,128] INFO Property port is overridden to 9092 (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,128] INFO Property socket.receive.buffer.bytes is overridden to 1048576 (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,128] INFO Property socket.request.max.bytes is overridden to 104857600 (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,132] INFO Property socket.send.buffer.bytes is overridden to 1048576 (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,133] INFO Property zookeeper.connect is overridden to localhost:2181 (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,133] INFO Property zookeeper.connection.timeout.ms is overridden to 1000000 (kafka.utils.VerifiableProperties)
[2016-06-28 15:59:02,359] INFO [Kafka Server 0], starting (kafka.server.KafkaServer)
[2016-06-28 15:59:02,365] INFO [Kafka Server 0], Connecting to zookeeper on localhost:2181 (kafka.server.KafkaServer)
[2016-06-28 15:59:02,442] INFO Starting ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
j[2016-06-28 15:59:02,471] INFO Client environment:zookeeper.version=3.3.3-1203054, built on 11/17/2011 05:47 GMT (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,471] INFO Client environment:host.name=cdh1 (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,471] INFO Client environment:java.version=1.7.0_67 (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,471] INFO Client environment:java.vendor=Oracle Corporation (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,471] INFO Client environment:java.home=/user/local/jdk/jre (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,471] INFO Client environment:java.class.path=.:/user/local/jdk/lib:/user/local/jdk/jre/lib:/user/local/kafka_2.9.2-0.8.1.1/bin/../core/build/dependant-libs-2.8.0/*.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../perf/build/libs//kafka-perf_2.8.0*.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../clients/build/libs//kafka-clients*.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../examples/build/libs//kafka-examples*.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../contrib/hadoop-consumer/build/libs//kafka-hadoop-consumer*.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../contrib/hadoop-producer/build/libs//kafka-hadoop-producer*.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/jopt-simple-3.2.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/kafka_2.9.2-0.8.1.1.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/kafka_2.9.2-0.8.1.1-javadoc.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/kafka_2.9.2-0.8.1.1-scaladoc.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/kafka_2.9.2-0.8.1.1-sources.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/log4j-1.2.15.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/metrics-core-2.2.0.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/scala-library-2.9.2.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/slf4j-api-1.7.2.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/snappy-java-1.0.5.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/zkclient-0.3.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../libs/zookeeper-3.3.4.jar:/user/local/kafka_2.9.2-0.8.1.1/bin/../core/build/libs/kafka_2.8.0*.jar (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,471] INFO Client environment:java.library.path=/usr/java/packages/lib/i386:/lib:/usr/lib (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,471] INFO Client environment:java.io.tmpdir=/tmp (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,471] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,472] INFO Client environment:os.name=Linux (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,472] INFO Client environment:os.arch=i386 (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,472] INFO Client environment:os.version=2.6.32-358.el6.i686 (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,472] INFO Client environment:user.name=root (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,472] INFO Client environment:user.home=/root (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,472] INFO Client environment:user.dir=/user/local/kafka_2.9.2-0.8.1.1 (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,474] INFO Initiating client connection, connectString=localhost:2181 sessionTimeout=6000 watcher=org.I0Itec.zkclient.ZkClient@14f1790 (org.apache.zookeeper.ZooKeeper)
[2016-06-28 15:59:02,514] INFO Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181 (org.apache.zookeeper.ClientCnxn)
[2016-06-28 15:59:02,525] INFO Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session (org.apache.zookeeper.ClientCnxn)
[2016-06-28 15:59:02,687] INFO Session establishment complete on server localhost/0:0:0:0:0:0:0:1:2181, sessionid = 0x155993c17870000, negotiated timeout = 6000 (org.apache.zookeeper.ClientCnxn)
[2016-06-28 15:59:02,690] INFO zookeeper state changed (SyncConnected) (org.I0Itec.zkclient.ZkClient)
[2016-06-28 15:59:03,016] INFO Log directory '/tmp/kafka-logs' not found, creating it. (kafka.log.LogManager)
[2016-06-28 15:59:03,118] INFO Starting log cleanup with a period of 60000 ms. (kafka.log.LogManager)
[2016-06-28 15:59:03,126] INFO Starting log flusher with a default period of 9223372036854775807 ms. (kafka.log.LogManager)
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[2016-06-28 15:59:03,217] INFO Awaiting socket connections on 0.0.0.0:9092. (kafka.network.Acceptor)
[2016-06-28 15:59:03,220] INFO [Socket Server on Broker 0], Started (kafka.network.SocketServer)
[2016-06-28 15:59:03,413] INFO Will not load MX4J, mx4j-tools.jar is not in the classpath (kafka.utils.Mx4jLoader$)
[2016-06-28 15:59:03,497] INFO 0 successfully elected as leader (kafka.server.ZookeeperLeaderElector)
[2016-06-28 15:59:03,982] INFO Registered broker 0 at path /brokers/ids/0 with address cdh1:9092. (kafka.utils.ZkUtils$)
[2016-06-28 15:59:04,079] INFO [Kafka Server 0], started (kafka.server.KafkaServer)
[2016-06-28 15:59:04,225] INFO New leader is 0 (kafka.server.ZookeeperLeaderElector$LeaderChangeListener)
[root@cdh1 kafka_2.9.2-0.8.1.1]# jps
3855 Jps
4033 ZooKeeperMain
6182 Kafka
6150 QuorumPeerMain
6222 Jps
4229 ZooKeeperMain
[root@cdh1 kafka_2.9.2-0.8.1.1]# bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
producer123        
[2016-06-28 16:02:03,395] INFO Topic creation {"version":1,"partitions":{"1":[0],"0":[0]}} (kafka.admin.AdminUtils$)
[2016-06-28 16:02:03,449] INFO [KafkaApi-0] Auto creation of topic test with 2 partitions and replication factor 1 is successful! (kafka.server.KafkaApis)
[2016-06-28 16:02:03,915] INFO Closing socket connection to /127.0.0.1. (kafka.network.Processor)
[2016-06-28 16:02:04,168] INFO [ReplicaFetcherManager on broker 0] Removed fetcher for partitions [test,0],[test,1] (kafka.server.ReplicaFetcherManager)
[2016-06-28 16:02:04,309] WARN Error while fetching metadata [{TopicMetadata for topic test -> 
No partition metadata for topic test due to kafka.common.LeaderNotAvailableException}] for topic [test]: class kafka.common.LeaderNotAvailableException  (kafka.producer.BrokerPartitionInfo)
[2016-06-28 16:02:04,352] INFO Closing socket connection to /127.0.0.1. (kafka.network.Processor)
[2016-06-28 16:02:04,353] WARN Error while fetching metadata [{TopicMetadata for topic test -> 
No partition metadata for topic test due to kafka.common.LeaderNotAvailableException}] for topic [test]: class kafka.common.LeaderNotAvailableException  (kafka.producer.BrokerPartitionInfo)
[2016-06-28 16:02:04,356] ERROR Failed to collate messages by topic, partition due to: Failed to fetch topic metadata for topic: test (kafka.producer.async.DefaultEventHandler)
[2016-06-28 16:02:04,376] INFO Completed load of log test-0 with log end offset 0 (kafka.log.Log)
[2016-06-28 16:02:04,387] INFO Created log for partition [test,0] in /tmp/kafka-logs with properties {segment.index.bytes -> 10485760, file.delete.delay.ms -> 60000, segment.bytes -> 536870912, flush.ms -> 9223372036854775807, delete.retention.ms -> 86400000, index.interval.bytes -> 4096, retention.bytes -> -1, cleanup.policy -> delete, segment.ms -> 604800000, max.message.bytes -> 1000012, flush.messages -> 9223372036854775807, min.cleanable.dirty.ratio -> 0.5, retention.ms -> 604800000}. (kafka.log.LogManager)
[2016-06-28 16:02:04,394] WARN Partition [test,0] on broker 0: No checkpointed highwatermark is found for partition [test,0] (kafka.cluster.Partition)
[2016-06-28 16:02:04,478] WARN Error while fetching metadata [{TopicMetadata for topic test -> 
No partition metadata for topic test due to kafka.common.LeaderNotAvailableException}] for topic [test]: class kafka.common.LeaderNotAvailableException  (kafka.producer.BrokerPartitionInfo)
[2016-06-28 16:02:04,477] INFO Closing socket connection to /127.0.0.1. (kafka.network.Processor)
[2016-06-28 16:02:04,493] INFO Closing socket connection to /127.0.0.1. (kafka.network.Processor)
[2016-06-28 16:02:04,494] WARN Error while fetching metadata [{TopicMetadata for topic test -> 
No partition metadata for topic test due to kafka.common.LeaderNotAvailableException}] for topic [test]: class kafka.common.LeaderNotAvailableException  (kafka.producer.BrokerPartitionInfo)
[2016-06-28 16:02:04,494] ERROR Failed to collate messages by topic, partition due to: Failed to fetch topic metadata for topic: test (kafka.producer.async.DefaultEventHandler)
[2016-06-28 16:02:04,497] INFO Completed load of log test-1 with log end offset 0 (kafka.log.Log)
[2016-06-28 16:02:04,502] INFO Created log for partition [test,1] in /tmp/kafka-logs with properties {segment.index.bytes -> 10485760, file.delete.delay.ms -> 60000, segment.bytes -> 536870912, flush.ms -> 9223372036854775807, delete.retention.ms -> 86400000, index.interval.bytes -> 4096, retention.bytes -> -1, cleanup.policy -> delete, segment.ms -> 604800000, max.message.bytes -> 1000012, flush.messages -> 9223372036854775807, min.cleanable.dirty.ratio -> 0.5, retention.ms -> 604800000}. (kafka.log.LogManager)
[2016-06-28 16:02:04,504] WARN Partition [test,1] on broker 0: No checkpointed highwatermark is found for partition [test,1] (kafka.cluster.Partition)
[2016-06-28 16:02:04,574] INFO Closing socket connection to /192.168.111.126. (kafka.network.Processor)
[2016-06-28 16:02:04,620] INFO Closing socket connection to /127.0.0.1. (kafka.network.Processor)
[2016-06-28 16:02:04,838] INFO Closing socket connection to /192.168.111.126. (kafka.network.Processor)


---kafaka 单机测试连通性,成功:producer端输入什么内容,cusumer端就显示什么内容。 ok
.... ....



cusumer 端
[root@cdh1 kafka_2.9.2-0.8.1.1]# bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
producer123


---kafaka 单机测试连通性,成功:producer端输入什么内容,cusumer端就显示什么内容。 ok

.... ....

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

5icode.top

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值