Hbase单机安装出现的错误

刘志丽 2012-07-02
执行“bin/hbase shell”时无问题,继续执行“create 'test', 'cf'”时,出现如下错误:2012-06-28 21:39:41,261 INFO org.apache.zookeeper.server.NIOServerCnxnFactory: binding to port 0.0.0.0/0.0.0.0:2181
2012-06-28 21:39:41,279 INFO org.apache.zookeeper.server.persistence.FileTxnSnapLog: Snapshotting: 0x0 to /tmp/hbase-hadoopor/zookeeper/zookeeper_0/version-2/snapshot.0
2012-06-28 21:39:41,407 INFO org.apache.zookeeper.server.NIOServerCnxnFactory: Accepted socket connection from /127.0.0.1:34223
2012-06-28 21:39:41,412 INFO org.apache.zookeeper.server.NIOServerCnxn: Processing stat command from /127.0.0.1:34223
2012-06-28 21:39:41,427 INFO org.apache.zookeeper.server.NIOServerCnxn: Stat command output
2012-06-28 21:39:41,428 INFO org.apache.zookeeper.server.NIOServerCnxn: Closed socket connection for client /127.0.0.1:34223 (no session established for client)
2012-06-28 21:39:41,429 INFO org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster: Started MiniZK Cluster and connect 1 ZK server on client port: 2181
2012-06-28 21:39:41,548 DEBUG org.apache.hadoop.hbase.master.HMaster: Set serverside HConnection retries=100
2012-06-28 21:39:42,422 ERROR org.apache.hadoop.hbase.master.HMasterCommandLine: Failed to start master
java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMasterCommandLine$LocalHMasterCannot assign requested address
at org.apache.hadoop.hbase.util.JVMClusterUtil.createMasterThread(JVMClusterUtil.java:134)
at org.apache.hadoop.hbase.LocalHBaseCluster.addMaster(LocalHBaseCluster.java:198)
at org.apache.hadoop.hbase.LocalHBaseCluster.<init>(LocalHBaseCluster.java:148)
at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:140)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:103)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1754)
Caused by: java.net.BindException: Problem binding to /221.238.203.46:0 : Cannot assign requested address
at org.apache.hadoop.hbase.ipc.HBaseServer.bind(HBaseServer.java:242)
at org.apache.hadoop.hbase.ipc.HBaseServer$Listener.<init>(HBaseServer.java:456)
at org.apache.hadoop.hbase.ipc.HBaseServer.<init>(HBaseServer.java:1505)
at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.<init>(WritableRpcEngine.java:296)
at org.apache.hadoop.hbase.ipc.WritableRpcEngine.getServer(WritableRpcEngine.java:245)
at org.apache.hadoop.hbase.ipc.WritableRpcEngine.getServer(WritableRpcEngine.java:55)
at org.apache.hadoop.hbase.ipc.HBaseRPC.getServer(HBaseRPC.java:401)
at org.apache.hadoop.hbase.ipc.HBaseRPC.getServer(HBaseRPC.java:390)
at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:251)
at org.apache.hadoop.hbase.master.HMasterCommandLine$LocalHMaster.<init>(HMasterCommandLine.java:215)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.hadoop.hbase.util.JVMClusterUtil.createMasterThread(JVMClusterUtil.java:131)
... 7 more
Caused by: java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at org.apache.hadoop.hbase.ipc.HBaseServer.bind(HBaseServer.java:240)
... 21 more
mbb007 2012-08-02
Hbase的standalone模式需要运行在127.0.0.1上,你可以去/etc/hosts里检查一下,看看你的用户名所对应的IP是不是127.0.0.1,像ubuntu这种linux一般来说是会把你的IP设置成127.0.1.1的
枯芦苇 2012-10-09
试一下这个,修改hbase-site.xml 配置文件中的“hbase.zookeeper.quorum”属性的值为
“127.0.0.1”。
allon517 2012-12-21
HMasterCommandLine这个类是启动时加载配置调用,看看你的配置文件
itsoul 2013-06-13
你好,这个问题你解决了吗,解决方法是怎样的?
tstcylq 2014-01-14
可能是什么原因也不去分析了,直接说答案:

把ubuntu的host文件里面的内容统统删除,然后手动加上一行

192.168.10.48 ubuntu

重启ubuntu和hbase,问题解决。
Global site tag (gtag.js) - Google Analytics