通过eclipse连接hbase报错,已经检查了一个星期了,还是没找错问题。听说这个论坛上都是牛人,希望能够给条明路!谢谢!
1. hbase是伪分布集群。
2. hadoop也是伪分布
3. zookeeper用的是hbase自带的,伪分布和独立的都安装过,还是一样的错误。
4. 版本hbase1.2.3 , hadoop2.7.3 ,java 1.7, eclipse 4.5.1,版本应该是没有问题的,我核对了很多遍,开始以为是版本问题,把hbase和eclipse都更新到现在这个版本,发现还是报一样的错误。
5. 几乎把网上关于这个问题的说法都检查,尝试了个遍,还是同样的问题,都快气得砸电脑了。
6. Linux系统上能启动,并且可以创建表。Hbase zkcli也可以正常启动。Jps查看也确实全部起来了。
Hbase-site配置: <property>
<name>hbase.rootdir</name>
<value>hdfs://master.hadoop:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
每次通过eclpse连接hbase,zookeeper都报错这样的信息:
2017-04-16 07:58:11,066 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181] server.NIOServerCnxn: Closed socket connection for client /192.168.190.131:48394 which had sessionid 0x15b7742f31e0006
2017-04-16 07:59:42,007 INFO [SessionTracker] server.ZooKeeperServer: Expiring session 0x15b7742f31e0006, timeout of 90000ms exceeded
2017-04-16 07:59:42,008 INFO [ProcessThread(sid:0 cport:-1):] server.PrepRequestProcessor: Processed session termination for sessionid: 0x15b7742f31e0006
2017-04-16 08:01:49,142 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181] server.NIOServerCnxnFactory: Accepted socket connection from /127.0.0.1:59818
2017-04-16 08:01:49,185 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181] server.ZooKeeperServer: Client attempting to establish new session at /127.0.0.1:59818
2017-04-16 08:01:49,192 INFO [SyncThread:0] server.ZooKeeperServer: Established session 0x15b7742f31e0007 with negotiated timeout 90000 for client /127.0.0.1:59818
2017-04-16 08:01:49,953 WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181] server.NIOServerCnxn: caught end of stream exception
EndOfStreamException: Unable to read additional data from client sessionid 0x15b7742f31e0007, likely client has closed socket
at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:228)
at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:208)
at java.lang.Thread.run(Thread.java:745)
eclipse报错信息:
2017-04-16 09:01:31,228 WARN [main] util.NativeCodeLoader (NativeCodeLoader.java:<clinit>(62)) - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2017-04-16 09:01:34,962 INFO [main] zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2017-04-16 09:01:34,981 INFO [main] zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:host.name=master.hadoop
2017-04-16 09:01:34,982 INFO [main] zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:java.version=1.7.0_71
2017-04-16 09:01:34,985 INFO [main] zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:java.vendor=Oracle Corporation
2017-04-16 09:01:34,986 INFO [main] zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:java.home=/usr/java/jdk1.7.0_71/jre
2017-04-16 09:01:35,062 INFO [main] zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:java.io.tmpdir=/tmp
2017-04-16 09:01:35,067 INFO [main] zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:java.compiler=<NA>
2017-04-16 09:01:35,070 INFO [main] zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:os.name=Linux
2017-04-16 09:01:35,080 INFO [main] zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:os.arch=amd64
2017-04-16 09:01:35,082 INFO [main] zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:os.version=2.6.32-279.el6.x86_64
2017-04-16 09:01:35,084 INFO [main] zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:user.name=hadoop
2017-04-16 09:01:35,096 INFO [main] zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:user.home=/home/hadoop
2017-04-16 09:01:35,113 INFO [main] zookeeper.ZooKeeper (Environment.java:logEnv(100)) - Client environment:user.dir=/home/hadoop/workspace/hadoop
2017-04-16 09:01:35,258 INFO [main] zookeeper.ZooKeeper (ZooKeeper.java:<init>(438)) - Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection
2017-04-16 09:01:36,026 INFO [main] zookeeper.RecoverableZooKeeper (RecoverableZooKeeper.java:<init>(104)) - The identifier of this process is 5475@master.hadoop
2017-04-16 09:01:36,135 INFO [main-SendThread(localhost:2181)] zookeeper.ClientCnxn (ClientCnxn.java:logStartConnect(975)) - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2017-04-16 09:01:36,553 INFO [main-SendThread(localhost:2181)] zookeeper.ClientCnxn (ClientCnxn.java:primeConnection(852)) - Socket connection established to localhost/127.0.0.1:2181, initiating session
2017-04-16 09:01:36,674 INFO [main-SendThread(localhost:2181)] zookeeper.ClientCnxn (ClientCnxn.java:onConnected(1235)) - Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x15b77751edd0007, negotiated timeout = 90000
Exception in thread "main" java.lang.IllegalArgumentException: Not a host:port pair: PBUF
master.hadoop�}��ֻ�+
at org.apache.hadoop.hbase.util.Addressing.parseHostname(Addressing.java:60)
at org.apache.hadoop.hbase.ServerName.<init>(ServerName.java:101)
at org.apache.hadoop.hbase.ServerName.parseVersionedServerName(ServerName.java:283)
at org.apache.hadoop.hbase.MasterAddressTracker.bytesToServerName(MasterAddressTracker.java:77)
at org.apache.hadoop.hbase.MasterAddressTracker.getMasterAddress(MasterAddressTracker.java:61)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:703)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:126)
at Hbase.hhbase.main(hhbase.java:28)
|