2
回答
WARN org.apache.zookeeper.ClientCnxn: Session 0x0 for server null
开发十年,就只剩下这套Java开发体系了   

`

 我估计是ZOOKEEPER启动不起来,请大家帮我看看是什么原因,我研究了两天了,实在不知道怎么弄了

使用文件如下:

CentOS_5.5_Final.iso

jdk-6u35-linux-i586.bin

hadoop-0.20.2-cdh3u2.tar.gz

hbase-0.94.0.tar.gz

 

 

 

 

我估计是ZOOKEEPER启动不起来,请大家帮我看看是什么原因,我研究了两天了,实在不知道怎么弄了

[Hadoop@chen hbase-0.94.0]$ vi logs/hbase-Hadoop-master-chen.ran.log 中出现了如下警告信息,使用list查hbase也不成功

WARN org.apache.zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect

cd $HBASE_HOME

cd $HADOOP_HOME

 

[Hadoop@chen hadoop-0.20.2-cdh3u2]$ vi conf/core-site.xml :

 

<property>

<name>fs.default.name</name>

<value>hdfs://master:9000</value>

</property>

<property>

<name>hadoop.tmp.dir</name>

<value>/u01/hadoop/datastore</value>

</property>

 

 

 

[Hadoop@chen hadoop-0.20.2-cdh3u2]$ vi conf/hdfs-site.xml:

<property>

<name>dfs.replication</name>

<value>1</value>

</property>

 

[Hadoop@chen hadoop-0.20.2-cdh3u2]$ vi conf/masters:

master  

 

[Hadoop@chen hadoop-0.20.2-cdh3u2]$ vi conf/slaves:

slave2 

 

 

[Hadoop@chen hadoop-0.20.2-cdh3u2]$ vi conf/mapred-site.xml

<property> 

<name>mapred.job.tracker</name> 

<value>master:9001</value> 

</property> 

 

 

[Hadoop@chen hbase-0.94.0]$ vi conf/hbase-site.xml

<configuration>

<property>

<name>hbase.rootdir</name>

<value>hdfs://master:9000/hbase</value>

</property>

 

<property>

<name>hbase.cluster.distributed</name>

<value>true</value>

</property>

 

<property>

<name>hbase.master</name>

<value>master:60000</value>

</property>

 

<property>

<name>hbase.zookeeper.quorum</name>

<value>master</value>

</property>

</configuration>

 

[Hadoop@chen hbase-0.94.0]$ vi conf/hbase-env.sh

export JAVA_HOME=/usr/java/jdk1.6.0_06/

export HBASE_OPTS="-XX:+UseConcMarkSweepGC"

export HBASE_LOG_DIR=${HBASE_HOME}/logs

export HBASE_MANAGES_ZK=true

 

 

[Hadoop@chen hbase-0.94.0]$ jps

8601 NameNode

8802 JobTracker

8738 SecondaryNameNode

10760 Jps

 

[Hadoop@Slave ~]$ jps

7055 Jps

6133 DataNode

6221 TaskTracker

[Hadoop@Slave ~]$

 

 

[root@Slave ~]# vi /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

#127.0.0.1              Slave.Hadoop Slave localhost.localdomain localhost

#::1            localhost6.localdomain6 localhost6

 

192.168.0.253           Slave.Hadoop Slave localhost.localdomain localhost

127.0.0.1               localhost6.localdomain6 localhost6

 

192.168.0.251 master

192.168.0.253 slave2

#127.0.0.1 localhost

 

[Hadoop@chen hbase-0.94.0]$  vi /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

#127.0.0.1              chen.ran chen localhost.localdomain localhost

#::1            localhost6.localdomain6 localhost6

 

127.0.0.1 localhost6.localdomain6 localhost6

192.168.0.251    chen.ran chen localhost.localdomain localhost

 

#192.168.0.251 hostname

 

 

192.168.0.251 master

192.168.0.253 slave2

#127.0.0.1 localhost

 

 

 

为什么会出现:

 

 

 

[Hadoop@chen hbase-0.94.0]$ bin/start-hbase.sh

Hadoop@master 's password:

master: starting zookeeper, logging to /usr/local/hbase-0.94.0/bin/../logs/hbase-Hadoop-zookeeper-chen.ran.out

starting master, logging to /usr/local/hbase-0.94.0/logs/hbase-Hadoop-master-chen.ran.out

Hadoop@slave2 's password:

slave2: starting regionserver, logging to /usr/local/hbase-0.94.0/bin/../logs/hbase-Hadoop-regionserver-Slave.Hadoop.out

#localhost: ssh: #localhost: Temporary failure in name resolution

 

 

查看日志是zookeeper没起来

[Hadoop@chen hbase-0.94.0]$ vi logs/hbase-Hadoop-master-chen.ran.log

 

 

        ... 5 more

Fri Sep 21 11:36:31 CST 2012 Starting master on chen.ran

core file size          (blocks, -c) 0

data seg size           (kbytes, -d) unlimited

scheduling priority             (-e) 0

file size               (blocks, -f) unlimited

pending signals                 (-i) 16384

max locked memory       (kbytes, -l) 32

max memory size         (kbytes, -m) unlimited

open files                      (-n) 1024

pipe size            (512 bytes, -p) 8

POSIX message queues     (bytes, -q) 819200

real-time priority              (-r) 0

stack size              (kbytes, -s) 10240

cpu time               (seconds, -t) unlimited

max user processes              (-u) 16384

virtual memory          (kbytes, -v) unlimited

file locks                      (-x) unlimited

2012-09-21 11:36:33,618 INFO org.apache.hadoop.hbase.util.VersionInfo: HBase 0.94.0

2012-09-21 11:36:33,618 INFO org.apache.hadoop.hbase.util.VersionInfo: Subversion https://svn.apache.org/repos/asf/hbase/branches/0.94 -r 1332822

2012-09-21 11:36:33,618 INFO org.apache.hadoop.hbase.util.VersionInfo: Compiled by jenkins on Tue May  1 21:43:54 UTC 2012

2012-09-21 11:36:33,816 DEBUG org.apache.hadoop.hbase.master.HMaster: Set serverside HConnection retries=100

2012-09-21 11:36:33,618 INFO org.apache.hadoop.hbase.util.VersionInfo: Compiled by jenkins on Tue May  1 21:43:54 UTC 2012

2012-09-21 11:36:33,816 DEBUG org.apache.hadoop.hbase.master.HMaster: Set serverside HConnection retries=100

2012-09-21 11:36:34,389 INFO org.apache.hadoop.ipc.HBaseServer: Starting Thread-1

2012-09-21 11:36:34,390 INFO org.apache.hadoop.ipc.HBaseServer: Starting Thread-1

2012-09-21 11:36:34,390 INFO org.apache.hadoop.ipc.HBaseServer: Starting Thread-1

2012-09-21 11:36:34,390 INFO org.apache.hadoop.ipc.HBaseServer: Starting Thread-1

2012-09-21 11:36:34,391 INFO org.apache.hadoop.ipc.HBaseServer: Starting Thread-1

2012-09-21 11:36:34,391 INFO org.apache.hadoop.ipc.HBaseServer: Starting Thread-1

2012-09-21 11:36:34,391 INFO org.apache.hadoop.ipc.HBaseServer: Starting Thread-1

2012-09-21 11:36:34,392 INFO org.apache.hadoop.ipc.HBaseServer: Starting Thread-1

2012-09-21 11:36:34,392 INFO org.apache.hadoop.ipc.HBaseServer: Starting Thread-1

2012-09-21 11:36:34,395 INFO org.apache.hadoop.ipc.HBaseServer: Starting IPC Server listener on 60000

2012-09-21 11:36:34,403 INFO org.apache.hadoop.hbase.ipc.HBaseRpcMetrics: Initializing RPC Metrics with hostName=HMaster, port=60000

2012-09-21 11:36:34,560 INFO org.apache.zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.3-1240972, built on 02/06/2012 10:48 GMT

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:host.name=chen.ran

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.version=1.6.0_06

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.vendor=Sun Microsystems Inc.

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.home=/usr/java/jdk1.6.0_06/jre

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.class.path=/usr/local/hbase-0.94.0/conf:/usr/java/jdk1.6.0_06//lib/tools.jar:/usr/local/hbase-0.94.0:/usr/local/hbase-0.94.0/hbase-0.94.0.jar:/usr/local/hbase-0.94.0/hbase-0.94.0-tests.jar:/usr/local/hbase-0.94.0/lib/activation-1.1.jar:/usr/local/hbase-0.94.0/lib/asm-3.1.jar:/usr/local/hbase-0.94.0/lib/avro-1.5.3.jar:/usr/local/hbase-0.94.0/lib/avro-ipc-1.5.3.jar:/usr/local/hbase-0.94.0/lib/commons-beanutils-1.7.0.jar:/usr/local/hbase-0.94.0/lib/commons-beanutils-core-1.8.0.jar:/usr/local/hbase-0.94.0/lib/commons-cli-1.2.jar:/usr/local/hbase-0.94.0/lib/commons-codec-1.4.jar:/usr/local/hbase-0.94.0/lib/commons-collections-3.2.1.jar:/usr/local/hbase-0.94.0/lib/commons-configuration-1.6.jar:/usr/local/hbase-0.94.0/lib/commons-digester-1.8.jar:/usr/local/hbase-0.94.0/lib/commons-el-1.0.jar:/usr/local/hbase-0.94.0/lib/commons-httpclient-3.1.jar:/usr/local/hbase-0.94.0/lib/commons-io-2.1.jar:/usr/local/hbase-0.94.0/lib/commons-lang-2.5.jar:/usr/local/hbase-0.94.0/lib/commons-logging-1.1.1.jar:/usr/local/hbase-0.94.0/lib/commons-math-2.1.jar:/usr/local/hbase-0.94.0/lib/commons-net-1.4.1.jar:/usr/local/hbase-0.94.0/lib/core-3.1.1.jar:/usr/local/hbase-0.94.0/lib/guava-r09.jar:/usr/local/hbase-0.94.0/lib/hadoop-core-0.20.2-cdh3u2.jar:/usr/local/hbase-0.94.0/lib/hadoop-core-1.0.2.jar:/usr/local/hbase-0.94.0/lib/high-scale-lib-1.1.1.jar:/usr/local/hbase-0.94.0/lib/httpclient-4.1.2.jar:/usr/local/hbase-0.94.0/lib/httpcore-4.1.3.jar:/usr/local/hbase-0.94.0/lib/jackson-core-asl-1.5.5.jar:/usr/local/hbase-0.94.0/lib/jackson-jaxrs-1.5.5.jar:/usr/local/hbase-0.94.0/lib/jackson-mapper-asl-1.5.5.jar:/usr/local/hbase-0.94.0/lib/jackson-xc-1.5.5.jar:/usr/local/hbase-0.94.0/lib/jamon-runtime-2.3.1.jar:/usr/local/hbase-0.94.0/lib/jasper-compiler-5.5.23.jar:/usr/local/hbase-0.94.0/lib/jasper-runtime-5.5.23.jar:/usr/local/hbase-0.94.0/lib/jaxb-api-2.1.jar:/usr/local/hbase-0.94.0/lib/jaxb-impl-2.1.12.jar:/usr/local/hbase-0.94.0/lib/jersey-core-1.4.jar:/usr/local/hbase-0.94.0/lib/jersey-json-1.4.jar:/usr/local/hbase-0.94.0/lib/jersey-server-1.4.jar:/usr/local/hbase-0.94.0/lib/jettison-1.1.jar:/usr/local/hbase-0.94.0/lib/jetty-6.1.26.jar:/usr/local/hbase-0.94.0/lib/jetty-util-6.1.26.jar:/usr/local/hbase-0.94.0/lib/jruby-complete-1.6.5.jar:/usr/local/hbase-0.94.0/lib/jsp-2.1-6.1.14.jar:/usr/local/hbase-0.94.0/lib/jsp-api-2.1-6.1.14.jar:/usr/local/hbase-0.94.0/lib/libthrift-0.8.0.jar:/usr/local/hbase-0.94.0/lib/log4j-1.2.16.jar:/usr/local/hbase-0.94.0/lib/netty-3.2.4.Final.jar:/usr/local/hbase-0.94.0/lib/protobuf-java-2.4.0a.jar:/usr/local/hbase-0.94.0/lib/servlet-api-2.5-6.1.14.jar:/usr/local/hbase-0.94.0/lib/slf4j-api-1.5.8.jar:/usr/local/hbase-0.94.0/lib/slf4j-log4j12-1.5.8.jar:/usr/local/hbase-0.94.0/lib/snappy-java-1.0.3.2.jar:/usr/local/hbase-0.94.0/lib/stax-api-1.0.1.jar:/usr/local/hbase-0.94.0/lib/velocity-1.7.jar:/usr/local/hbase-0.94.0/lib/xmlenc-0.52.jar:/usr/local/hbase-0.94.0/lib/zookeeper-3.4.3.jar:/usr/local/hadoop-0.20.2-cdh3u2/conf:/usr/java/jdk1.6.0_06//lib/tools.jar:/usr/local/hadoop-0.20.2-cdh3u2:/usr/local/hadoop-0.20.2-cdh3u2/hadoop-core-0.20.2-cdh3u2.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/ant-contrib-1.0b3.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/aspectjrt-1.6.5.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/aspectjtools-1.6.5.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/commons-cli-1.2.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/commons-codec-1.4.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/commons-daemon-1.0.1.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/commons-el-1.0.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/commons-httpclient-3.1.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/commons-logging-1.0.4.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/commons-logging-api-1.0.4.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/commons-net-1.4.1.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/core-3.1.1.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/hadoop-fairscheduler-0.20.2-cdh3u2.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/hsqldb-1.8.0.10.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/jackson-core-asl-1.5.2.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/jackson-mapper-asl-1.5.2.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/jasper-compiler-5.5.12.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/jasper-runtime-5.5.12.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/jets3t-0.6.1.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/jetty-6.1.26.cloudera.1.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/jetty-servlet-tester-6.1.26.cloudera.1.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/jetty-util-6.1.26.cloudera.1.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/jsch-0.1.42.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/junit-4.5.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/kfs-0.2.2.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/log4j-1.2.15.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/mockito-all-1.8.2.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/oro-2.0.8.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/servlet-api-2.5-20081211.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/servlet-api-2.5-6.1.14.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/slf4j-api-1.4.3.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/slf4j-log4j12-1.4.3.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/xmlenc-0.52.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/jsp-2.1/jsp-2.1.jar:/usr/local/hadoop-0.20.2-cdh3u2/lib/jsp-2.1/jsp-api-2.1.jar

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.library.path=/usr/local/hadoop-0.20.2-cdh3u2/lib/native/Linux-i386-32:/usr/local/hbase-0.94.0/lib/native/Linux-i386-32

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.compiler=<NA>

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.compiler=<NA>

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:os.name=Linux

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:os.arch=i386

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:os.version=2.6.18-194.el5

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:user.name=Hadoop

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:user.home=/home/Hadoop

2012-09-21 11:36:34,561 INFO org.apache.zookeeper.ZooKeeper: Client environment:user.dir=/usr/local/hbase-0.94.0

2012-09-21 11:36:34,562 INFO org.apache.zookeeper.ZooKeeper: Initiating client connection, connectString=master:2181 sessionTimeout=180000 watcher=master:60000

2012-09-21 11:36:34,584 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server /192.168.0.251:2181

2012-09-21 11:36:34,587 INFO org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper: The identifier of this process is 12934@chen.ran

2012-09-21 11:36:34,588 INFO org.apache.zookeeper.client.ZooKeeperSaslClient: Client will not SASL-authenticate because the default JAAS configuration section 'Client' could not be found. If you are not using SASL, you may ignore this. On the other hand, if you expected SASL to work, please fix your JAAS configuration.

2012-09-21 11:36:34,593 WARN org.apache.zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect

java.net.ConnectException: Connection refused

        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574)

        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:286)

        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1035)

2012-09-21 11:36:34,721 WARN org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase

2012-09-21 11:36:34,721 INFO org.apache.hadoop.hbase.util.RetryCounter: Sleeping 2000ms before retry #1...

2012-09-21 11:36:35,799 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server chen.ran/192.168.0.251:2181

2012-09-21 11:36:35,800 INFO org.apache.zookeeper.client.ZooKeeperSaslClient: Client will not SASL-authenticate because the default JAAS configuration section 'Client' could not be found. If you are not using SASL, you may ignore this. On the other hand, if you expected SASL to work, please fix your JAAS configuration.

2012-09-21 11:36:35,800 WARN org.apache.zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect

java.net.ConnectException: Connection refused

        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574)

        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:286)

        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1035)

2012-09-21 11:36:36,973 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server chen.ran/192.168.0.251:2181

2012-09-21 11:36:36,974 INFO org.apache.zookeeper.client.ZooKeeperSaslClient: Client will not SASL-authenticate because the default JAAS configuration section 'Client' could not be found. If you are not using SASL, you may ignore this. On the other hand, if you expected SASL to work, please fix your JAAS configuration.

2012-09-21 11:36:36,974 WARN org.apache.zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect

java.net.ConnectException: Connection refused

        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574)

        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:286)

        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1035)

2012-09-21 11:36:37,079 WARN org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase

2012-09-21 11:36:37,079 INFO org.apache.hadoop.hbase.util.RetryCounter: Sleeping 4000ms before retry #2...

2012-09-21 11:36:38,142 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server chen.ran/192.168.0.251:2181

2012-09-21 11:36:38,142 INFO org.apache.zookeeper.client.ZooKeeperSaslClient: Client will not SASL-authenticate because the default JAAS configuration section 'Client' could not be found. If you are not using SASL, you may ignore this. On the other hand, if you expected SASL to work, please fix your JAAS configuration.

2012-09-21 11:36:38,143 WARN org.apache.zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect

java.net.ConnectException: Connection refused

        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574)

        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:286)

        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1035)

                                                                                                                        

 

举报
vani
发帖于6年前 2回/12K+阅
顶部