解决hbase部署过程中出现的bug--hbase-0.98.12.1-hadoop2/bin/hbase-daemon.sh: line 207: core: command not found

一、hbase部署

1.将hbase的tar包上传至linux的/home下,然后解压缩

2. 然后修改hbase/conf/下的hbase-env.sh中JAVA_HOME的java路径配置/JAVA_HOEM可以快速定位到需要修改的位置

3. 不使用HBase的默认zookeeper配置:HBASE_MANAGES_ZK=false

4. 修改配置hbase/conf下面的hbase-site.xml文件,加入如下代码

hbase.rootdir

hdfs://(集群名字,在mysql的DES中查看)/hbase

hbase.cluster.distributed

true

hbase.zookeeper.quorum

node001,node002,node003

 

5. .配置con/regionservers 添加regionservers 的主机名,如node002 ,node003

6. vim 配置backup-masters 添加备份的master主机名

7. 拷贝hadoop下的配置文件hdfs-site.xml到当前目录hbase/conf/下

8. 配置hbase的环境变量 并将配置好的文件发送到其他服务节点

9. 将环境变量发送到其他服务器相应的节点,source~/.bach_profile

10. 关闭防火墙 ,然后启动zookeeper和集群,再启动hbase:start-hbase.sh

11. jps发现HRegionServer启动后马上挂掉,查看日志显示如下log

Wed Sep 19 20:07:10 CST 2018 Starting master on node001

/home/hbase-0.98.12.1-hadoop2/bin/hbase-daemon.sh: line 207: core: command not found

2018-09-19 20:07:11,315 INFO [main] util.VersionInfo: HBase 0.98.12.1-hadoop2

2018-09-19 20:07:11,316 INFO [main] util.VersionInfo: Subversion git://aspire/home/apurtell/tmp/hbase-build -r b00ec5da604d64a0bdc7d92452b1e0559f0f5d73

2018-09-19 20:07:11,316 INFO [main] util.VersionInfo: Compiled by apurtell on Sun May 17 12:55:03 PDT 2015

2018-09-19 20:07:12,270 INFO [main] util.ServerCommandLine: env:TERM=xterm

2018-09-19 20:07:12,271 INFO [main] util.ServerCommandLine: env:JAVA_HOME=/home/jdk1.7.0_75

2018-09-19 20:07:12,271 INFO [main] util.ServerCommandLine: env:SHLVL=4

2018-09-19 20:07:12,271 INFO [main] util.ServerCommandLine: env:HBASE_LOG_DIR=/home/hbase-0.98.12.1-hadoop2/bin/../logs

2018-09-19 20:07:12,271 INFO [main] util.ServerCommandLine: env:HBASE_HOME=/home/hbase-0.98.12.1-hadoop2/bin/..

2018-09-19 20:07:12,271 INFO [main] util.ServerCommandLine: env:HBASE_OPTS=-XX:+UseConcMarkSweepGC -Dhbase.log.dir=/home/hbase-0.98.12.1-hadoop2/bin/../logs -Dhbase.log.file=hbase-root-master-node001.log -Dhbase.home.dir=/home/hbase-0.98.12.1-hadoop2/bin/.. -Dhbase.id.str=root -Dhbase.root.logger=INFO,RFA -Djava.library.path=/home/hadoop-2.6.5/lib/native -Dhbase.security.logger=INFO,RFAS

2018-09-19 20:07:12,271 INFO [main] util.ServerCommandLine: env:HBASE_ENV_INIT=true

2018-09-19 20:07:12,271 INFO [main] util.ServerCommandLine: env:XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt

2018-09-19 20:55:41,974 INFO [master:node001:60000] master.ServerManager: Waiting for region servers count to settle; currently checked in 0, slept for 1532 ms, expecting minimum of 1, maximum of 2147483647, timeout of 4500 ms, interval of 1500 ms.

2018-09-19 20:55:43,352 WARN [FifoRpcScheduler.handler1-thread-2] master.ServerManager: Server node002,60020,1537362049966 has been rejected; Reported time is too far out of sync with master. Time difference of 315928ms > max allowed of 30000ms

2018-09-19 20:55:43,492 INFO [master:node001:60000] master.ServerManager: Waiting for region servers count to settle; currently checked in 0, slept for 3050 ms, expecting minimum of 1, maximum of 2147483647, timeout of 4500 ms, interval of 1500 ms.

2018-09-19 20:55:44,185 WARN [FifoRpcScheduler.handler1-thread-3] master.ServerManager: Server node003,60020,1537362052040 has been rejected; Reported time is too far out of sync with master. Time difference of 315050ms > max allowed of 30000ms

2018-09-19 20:55:45,010 INFO [master:node001:60000] master.ServerManager: Waiting for region servers count to settle; currently checked in 0, slept for 4568 ms, expecting minimum of 1, maximum of 2147483647, timeout of 4500 ms, interval of 1500 ms.

2018-09-19 20:55:46,529 INFO [master:node001:60000] master.ServerManager: Waiting for region servers count to settle; currently checked in 0, slept for 6086 ms, expecting minimum of 1, maximum of 2147483647, timeout of 4500 ms, interval of 1500 ms.

2018-09-19 20:55:48,071 INFO [master:node001:60000] master.ServerManager: Waiting for region servers count to settle; currently checked in 0, slept for 7629 ms, expecting minimum of 1, maximum of 2147483647, timeout of 4500 ms, interval of 1500 ms.

warn显示时间不同步超过设置的允许的最大时间30s,

然后进行时间同步设置 

ntpdate 0.asia.pool.ntp.org

 

重新启动hbase,问题解决!

 

你可能感兴趣的:(解决hbase部署过程中出现的bug--hbase-0.98.12.1-hadoop2/bin/hbase-daemon.sh: line 207: core: command not found)