虚拟机下centos6.5 64位的,一master,三slave,启动hadoop2.5.2+zookeeper3.4.6,查看进程都是很正常,也稳定,但是开启hbase1.0之后,过一会,master的HMaster 就挂了。slave上HRegionServer的进程正常。弄了两天了。求助。
mortbay.log: failed Server@7555b920: java.net.BindException: 地址已在使用
2016-04-26 02:18:39,262 ERROR [main] master.HMasterCommandLine: Master exiting
java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster
at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1982)
at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:198)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:139)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:126)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1996)
Caused by: java.net.BindException: 地址已在使用
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:315)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.apache.hadoop.hbase.master.HMaster.putUpJettyServer(HMaster.java:414)
at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:379)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1977)
... 5 more
2016-04-26 02:18:39,291 INFO [Shutdown] mortbay.log: Shutdown hook executing
2016-04-26 02:18:39,299 INFO [Shutdown] mortbay.log: Stopped SelectChannelConnector@0.0.0.0:16030
2016-04-26 02:18:39,315 INFO [Shutdown] mortbay.log: Shutdown hook complete
两个配置如下;
1.Zookeeper3.4.6Zookeeper在配置整个环境变量,在~/.bashrc下配置 exportZOOKEEPER_HOME=/hadoop/zookeeper3.4.6 exportPATH=$ZOOKEEPER_HOME/bin:$ZOOKEEPER_HOME/conf:$PATH 另一种形式,到时候再试试: exportPATH=$PATH:$ZOOKEEPER_HOME/bin:$ZOOKEEPER_HOME/conf 各节点及主机Zookeeper 安装目录下创建文件夹zookeeper(data(myid,value=对应配置机器的id)) /zookeeper/conf/zoo.cfg dataDir=/hadoop/zookeeper3.4.6/zookeeper/data #dataLogDir=/hadoop/zookeeper3.4.6/zookeeper/logs # the port at which the clients willconnect clientPort=2181 server.1=Master.hadoop:2888:3888 server.2=Slave1.hadoop:2888:3888 server.3=Slave2.hadoop:2888:3888 server.4=Slave3.hadoop:2888:3888 2.HBase1.0 安装目录下创建文件夹 tmp HBase1.0 的环境变量配置,~/.bashrc export HBASE_HOME=/hadoop/hbase1 export PATH=$PATH:$HBASE_HOME/bin /conf/hbase.env.sh # The java implementation to use. Java 1.7+ required. export JAVA_HOME=/hadoop/java/jdk/jdk1.8.0_77 # Extra Java CLASSPATH elements. Optional. exportHBASE_CLASSPATH=/hadoop/hadoop-2.6.0/etc/Hadoop #这一句有的没有配置 # Tell HBase whether it should manage it'sown instance of Zookeeper or not. export HBASE_MANAGES_ZK=false #false 不用Hbase自带的zookeeper。 /conf/hbase-site.xml <configuration> <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.master.info.port</name> <value>16030</value> </property> <property> <name>hbase.zookeeper.quorum</name> <value>Master.hadoop,Slave1.hadoop,Slave2.hadoop,Slave3.hadoop</value> </property> <property> <name>hbase.tmp.dir</name> <value>/hadoop/hbase1/tmp</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/hadoop/hbase1/zookeeper3.4.6/zookeeper/data</value> <property> <name>hbase.rpc.timeout</name> <value>1200000</value> </property>
<property> <name>hbase.snapshot.master.timeoutMillis</name> <value>1200000</value> </property> </property> </configuration> conf/regionservers Slave1.hadoop Slave2.hadoop Slave3.hadoop
|