hbase配置-集群无法启动问题

root@cslave2:/]#jps
2834 NodeManager
2487 DataNode
12282 Jps
2415 QuorumPeerMain


root@cslave2:/]#sudo service hbase-regionserver start 
Starting Hadoop HBase regionserver daemon: starting regionserver, logging to /var/log/hbase/hbase-hbase-regionserver-cslave2.out
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
hbase-regionserver.



--------------1  解决----
root@cslave2:/]#vi /etc/hbase/conf/hbase-env.sh
注销以下内容:
# Configure PermSize. Only needed in JDK7. You can safely remove it for JDK8+
export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=256m"
export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=256m"



---------再次启动---------
root@cslave2:/]#sudo service hbase-regionserver start 
Starting Hadoop HBase regionserver daemon: starting regionserver, logging to /var/log/hbase/hbase-hbase-regionserver-cslave2.out
hbase-regionserver.
root@cslave2:/]#jps
12928 Jps
2834 NodeManager
2487 DataNode
2415 QuorumPeerMain



------------------------使用重启服务------------------
root@cslave2:/]#sudo service hbase-regionserver restart 
Restarting Hadoop HBase regionserver daemon: Stopping Hadoop HBase regionserver daemon: no regionserver to stop because no pid file /var/run/hbase/hbase-hbase-regionserver.pid
hbase-regionserver.
Starting Hadoop HBase regionserver daemon: starting regionserver, logging to /var/log/hbase/hbase-hbase-regionserver-cslave2.out
hbase-regionserver.




--------------2  问题解决----------
root@cslave2:/]#vi /etc/hbase/conf/hbase-env.sh
放开注释:
# The directory where pid files are stored. /tmp by default.
# export HBASE_PID_DIR=/var/hadoop/pids


---------第三次启动---------
root@cslave2:/]#sudo service hbase-regionserver start
Starting Hadoop HBase regionserver daemon: mkdir: cannot create directory `/var/hadoop': Permission denied
starting regionserver, logging to /var/log/hbase/hbase-hbase-regionserver-cslave2.out
/usr/lib/hbase/bin/hbase-daemon.sh: line 225: /var/hadoop/pids/hbase-hbase-regionserver.pid: No such file or directory
ERROR.


--------------3  问题解决----------
root@cslave2:/]#mkdir -p /var/hadoop


---------第四次启动----报错相同-----
root@cslave2:/]#sudo service hbase-regionserver start
root@cslave2:/]#sudo service hbase-regionserver start
Starting Hadoop HBase regionserver daemon: mkdir: cannot create directory `/var/hadoop/pids': Permission denied
starting regionserver, logging to /var/log/hbase/hbase-hbase-regionserver-cslave2.out
/usr/lib/hbase/bin/hbase-daemon.sh: line 225: /var/hadoop/pids/hbase-hbase-regionserver.pid: No such file or directory
ERROR.


------问题查找---
存在/var/hadoop目录,对比原来目录,权限问题,赋予相同


--------------4  问题解决----------
root@cslave2:/var]#chown -R hbase:hbase /var/hadoop/


---------第五次启动----报错相同-----
root@cslave2:/var]#sudo service hbase-regionserver start
Starting Hadoop HBase regionserver daemon: starting regionserver, logging to /var/log/hbase/hbase-hbase-regionserver-cslave2.out
ERROR.
root@cslave2:/var]#jps
2834 NodeManager
2487 DataNode
14606 Jps
2415 QuorumPeerMain


---------第五次启动----使用重启服务查看错误-----
root@cslave2:/var]#sudo service hbase-regionserver restart
Restarting Hadoop HBase regionserver daemon: Stopping Hadoop HBase regionserver daemon: no regionserver to stop because no pid file /var/hadoop/pids/hbase-hbase-regionserver.pid
hbase-regionserver.
Starting Hadoop HBase regionserver daemon: starting regionserver, logging to /var/log/hbase/hbase-hbase-regionserver-cslave2.out
ERROR.

-------5 问题解决------------
root@cslave2:/]#vi /etc/hbase/conf/hbase-env.sh
因为hbase/conf目录下的配置不正确导致的,
为hbase/conf/hbase-env.sh添加export HBASE_MANAGES_ZK=false即可。
# Tell HBase whether it should manage it's own instance of Zookeeper or not.
# export HBASE_MANAGES_ZK=true
追加:
export HBASE_MANAGES_ZK=false


---------第六次启动---------
root@cslave2:/var]#sudo service hbase-regionserver start
Starting Hadoop HBase regionserver daemon: starting regionserver, logging to /var/log/hbase/hbase-hbase-regionserver-cslave2.out
ERROR.
root@cslave2:/]#sudo service hbase-regionserver restart
Restarting Hadoop HBase regionserver daemon: Stopping Hadoop HBase regionserver daemon: no regionserver to stop because no pid file /var/hadoop/pids/hbase-hbase-regionserver.pid
hbase-regionserver.
Starting Hadoop HBase regionserver daemon: starting regionserver, logging to /var/log/hbase/hbase-hbase-regionserver-cslave2.out
ERROR.



-------6 问题查找------------
查看日志
regionserver.HRegionServer: Master rejected startup because clock is out of sync

时间不同步

------问题解决--------
root@cslave2:/]#ntpdate cMaster
      报错:21 May 16:49:23 ntpdate[16524]: no server suitable for synchronization found
       解决:root@cslave2:/]#yum install -y ntpdate
oot@cslave2:/]#/usr/sbin/ntpdate 192.168.1.120
ntpdate -u  cMaster



---------第七次启动hbase----报错-----
root@cslave2:/var]#sudo service hbase-regionserver start
---------第七次启动----使用重启服务查看错误-----
root@cslave2:/var]#sudo service hbase-regionserver restart
Restarting Hadoop HBase regionserver daemon: Stopping Hadoop HBase regionserver daemon: stopping regionserver....
hbase-regionserver.
Starting Hadoop HBase regionserver daemon: starting regionserver, logging to /var/log/hbase/hbase-hbase-regionserver-cslave2.out
ERROR.
root@cslave2:/]#jps
2834 NodeManager
18038 Jps
2487 DataNode
17960 HRegionServer
2415 QuorumPeerMain

---------第七次查错误-----
root@cslave2:/]#cd  var/log/hbase/
root@cslave2:/var/log/hbase]#ll
root@cslave2:/var/log/hbase]#vim hbase-hbase-regionserver-cslave2.log
发现有些错误信息是昨晚的,所以打算删掉日志,再重新启动HRegionServer服务,再查看日志
没有具体错误信息



-----------------------------问题解决,批量启动服务------操作回顾------
总结:修改了vi /etc/hbase/conf/hbase-env.sh   /etc/hbase/conf/hbase-site.xml
root@cslave2:/]#mkdir -p /var/hadoop
root@cslave2:/var]#chown -R hbase:hbase /var/hadoop/
root@cslave2:/]#yum install -y ntpdate
oot@cslave2:/]#/usr/sbin/ntpdate 192.168.1.120   #cMaster

---文件批量发送--
root@cslave2:/]#scp /etc/hbase/conf/hbase-env.sh cSlave1:/etc/hbase/conf/hbase-env.sh
root@cslave2:/]#scp /etc/hbase/conf/hbase-env.sh cSlave0:/etc/hbase/conf/hbase-env.sh
root@cslave2:/]#scp /etc/hbase/conf/hbase-env.sh cClient:/etc/hbase/conf/hbase-env.sh
root@cslave2:/]#scp /etc/hbase/conf/hbase-env.sh cMaster:/etc/hbase/conf/hbase-env.sh

root@cslave2:/]#scp /etc/hbase/conf/hbase-site.xml cSlave1:/etc/hbase/conf/hbase-site.xml
root@cslave2:/]#scp /etc/hbase/conf/hbase-site.xml cSlave0:/etc/hbase/conf/hbase-site.xml
root@cslave2:/]#scp /etc/hbase/conf/hbase-site.xml cClient:/etc/hbase/conf/hbase-site.xml
root@cslave2:/]#scp /etc/hbase/conf/hbase-site.xml cMaster:/etc/hbase/conf/hbase-site.xml

------------试启动cSlave1上的HRegionServer服务---错误-------
root@cSlave1:/etc/hbase/conf]#sudo service hbase-regionserver start
Starting Hadoop HBase regionserver daemon: starting regionserver, logging to /var/log/hbase/hbase-hbase-regionserver-cSlave1.out
/usr/lib/hbase/bin/hbase-daemon.sh: line 225: /var/hadoop/pids/hbase-hbase-regionserver.pid: Permission denied
ERROR.

----试执行cSlave2上的操作----
root@cslave1:/]#mkdir -p /var/hadoop
root@cslave1:/var]#chown -R hbase:hbase /var/hadoop/
root@cslave1:/]#yum install -y ntpdate
root@cslave1:/]#/usr/sbin/ntpdate 192.168.1.120  

------------再次启动cSlave1上的HRegionServer服务----------
root@cSlave1:/etc/hbase/conf]#sudo service hbase-regionserver start
此时,启动错误,但jps成功
主节点端口60010上,新增cSlave1节点


问题总结111:新节点要进行以下操作:
mkdir -p /var/hadoop
chown -R hbase:hbase /var/hadoop/
yum install -y ntpdate
/usr/sbin/ntpdate 192.168.1.120  

sudo service hbase-regionserver start

---------------------------------其余节点运行  问题总结111命令----
sudo service hbase-master restart    #cmaster

--------cMaster  问题---------------
root@cMaster:/etc/hbase/conf]#sudo service hbase-master restart
no master to stop because no pid file /var/hadoop/pids/hbase-hbase-master.pid
Stopped HBase master daemon:                               [  OK  ]
starting master, logging to /var/log/hbase/hbase-hbase-master-cMaster.out
Failed to start HBase master daemon. Return value: 3       [FAILED]
root@cMaster:/etc/hbase/conf]#sudo service hbase-regionserver start
hbase-regionserver: unrecognized service



root@cMaster:/etc/hbase/conf]#rm -rf  /var/log/hbase/hbase-hbase-master-cMaster.log 
root@cMaster:/etc/hbase/conf]#sudo service hbase-master restart
no master to stop because no pid file /var/hadoop/pids/hbase-hbase-master.pid
Stopped HBase master daemon:                               [  OK  ]
starting master, logging to /var/log/hbase/hbase-hbase-master-cMaster.out
Failed to start HBase master daemon. Return value: 3       [FAILED]
root@cMaster:/etc/hbase/conf]#vi /var/log/hbase/hbase-hbase-master-cMaster.log 
日志分析无错误



=========hbase集群启动成功============

你可能感兴趣的:(hbase配置-集群无法启动问题)