学习大数据没有想得那么容易,且行且珍惜,今天学习了一种解决bug的方法,分享于此。
当配置了hbase的时候,启动,前台输入node04:60010,提示错误。
错误提示如下:
2018-07-14 11:58:07,397 DEBUG [main] zookeeper.MiniZooKeeperCluster: Failed binding ZK Server to client port: 2181
java.io.IOException: Could not start ZK at requested port of 2181. ZK was started at port: -1. Aborting as clients (e.g. shell) will not be able to find this ZK quorum.
Could not start ZK at requested port of 2181. ZK was started at port: -1. Aborting as clients (e.g. shell) will not be able to find this ZK quorum.
不能启动,大概意思是端口被占用了。
解决思路是:
重新去更换一个端口号试试
或者:
找出是谁占用了我的端口号————>将该被占用的端口号的东西杀死————>重启,再次访问
由于时间较紧张,本次只按照第二种去做,第一种谁找到解决方法了可以在文末留言评论,一起讨论
解决办法:
netstat -antp | fgrep 2181
找出到底是谁占用了我的端口
我这里找出来的是:
tcp 0 0 :::2181 :::* LISTEN 1258/java
tcp 0 0 ::ffff:192.168.198.24:2181 ::ffff:192.168.198.21:39432 ESTABLISHED 1258/java
然后执行:kill -9 1258
重新启动:
start-hbase.sh
重新访问这就好了。