错误类型1:
错误内容如下:2013-11-12 23:28:31,575 WARN org.apache.zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnectjava.net.ConnectException: Connection refusedat sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)2013-11-12 23:28:31,675 WARN org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for hbasemaster2013-11-12 23:28:31,676 INFO org.apache.hadoop.hbase.util.RetryCounter: Sleeping 8000ms before retry #3...2013-11-12 23:28:31,676 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server slave002172.25.60.202:2181. Will not attempt to authenticate using SASL (无法定位登录配置)
解决办法:
每个机器都系统时间首先相同,版本一致。再有就是hbase-default.xml 这个文件把所有节点都配进去。 错误类型2:
在XP eclipse中 做J2ee程序连接到 远程 Hbase 。出现异常:
[cpt-service]16:34:47,851 INFO ZooKeeper:100 - Client environment:java.io.tmpdir=/home/hadoop/apache-tomcat-6/apache-tomcat-6.0.37/temp[cpt-service]16:34:47,852 INFO ZooKeeper:100 - Client environment:java.compiler=<NA>[cpt-service]16:34:47,852 INFO ZooKeeper:100 - Client environment:os.name=Linux[cpt-service]16:34:47,852 INFO ZooKeeper:100 - Client environment:os.arch=i386[cpt-service]16:34:47,853 INFO ZooKeeper:100 - Client environment:os.version=2.6.18-prep[cpt-service]16:34:47,853 INFO ZooKeeper:100 - Client environment:user.name=hadoop[cpt-service]16:34:47,853 INFO ZooKeeper:100 - Client environment:user.home=/home/hadoop[cpt-service]16:34:47,854 INFO ZooKeeper:100 - Client environment:user.dir=/home/hadoop/apache-tomcat-6/apache-tomcat-6.0.37/logs[cpt-service]16:34:47,856 INFO ZooKeeper:438 - Initiating client connection, connectString=node192:2181,node198:2181,node152:2181 sessionTimeout=180000 watcher=hconnection[cpt-service]16:34:47,862 DEBUG ClientCnxn:99 - zookeeper.disableAutoWatchReset is false[cpt-service]16:34:47,894 INFO RecoverableZooKeeper:104 - The identifier of this process is 6728@node198[cpt-service]16:34:47,900 INFO ClientCnxn:966 - Opening socket connection to server node198/10.2.0.198:2181. Will not attempt to authenticate using SASL (无法定位登录配置)[cpt-service]16:34:47,906 INFO ClientCnxn:849 - Socket connection established to node198/10.2.0.198:2181, initiating session[cpt-service]16:34:47,907 DEBUG ClientCnxn:889 - Session establishment request sent on node198/10.2.0.198:2181[cpt-service]16:34:47,907 DEBUG ZooKeeperSaslClient:519 - Could not retrieve login configuration: java.lang.SecurityException: 无法定位登录配置[cpt-service]16:34:47,909 DEBUG ZooKeeperSaslClient:519 - Could not retrieve login configuration: java.lang.SecurityException: 无法定位登录配置[cpt-service]16:34:47,913 INFO ClientCnxn:1207 - Session establishment complete on server node198/10.2.0.198:2181, sessionid = 0x40a7f8343b002d, negotiated timeout = 180000[cpt-service]16:34:47,915 DEBUG ZooKeeperSaslClient:519 - Could not retrieve login configuration: java.lang.SecurityException: 无法定位登录配置[cpt-service]16:34:47,916 DEBUG ZooKeeperWatcher:294 - hconnection Received ZooKeeper Event, type=None, state=SyncConnected, path=null[cpt-service]16:34:47,916 DEBUG ZooKeeperSaslClient:519 - Could not retrieve login configuration: java.lang.SecurityException: 无法定位登录配置[cpt-service]16:34:47,916 DEBUG ZooKeeperSaslClient:519 - Could not retrieve login configuration: java.lang.SecurityException: 无法定位登录配置[cpt-service]16:34:47,917 DEBUG ZooKeeperSaslClient:519 - Could not retrieve login configuration: java.lang.SecurityException: 无法定位登录配置[cpt-service]16:34:47,920 DEBUG ZooKeeperWatcher:371 - hconnection-0x40a7f8343b002d connected
12/09/29 12:29:36 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection
12/09/29 12:29:36 INFO zookeeper.ClientCnxn: Opening socket connection to server /127.0.0.1:2181
12/09/29 12:29:36 INFO 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.
12/09/29 12:29:36 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 6479@fansyPC
12/09/29 12:29:36 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: 拒绝连接
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:286)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1035)