kylin启动netstat: n: unknown or uninstrumented protocol

版权声明:本文为博主九师兄(QQ群:spark源代码 198279782 欢迎来探讨技术)原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_21383435/article/details/89924257

检查hadoop配置的时候出现问题
报错如下

lcc@lcc apache-kylin-2.6.0-hbase1x$ bin/check-env.sh
Retrieving hadoop conf dir...
KYLIN_HOME is set to /Users/lcc/soft/kylin/apache-kylin-2.6.0-hbase1x
19/05/07 18:02:48 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
19/05/07 18:02:52 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
19/05/07 18:02:57 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
netstat: n: unknown or uninstrumented protocol

熟悉linux 的人都知道这个肯定是使用了 netstat命令参数错误造成的。那么这个肯定是跟网络有关的,于是我很轻松的定位到了 check-port-availability.sh 这个脚本文件中。打开代码一看,果不其然,里面第26行使用了 netstat这个命令

# check the availability of the port
kylin_port_in_use=`netstat -tlpn | grep "\b${kylin_port}\b"`

错误原因其实也跟上一个是一样的,都是因为mac 下不支持某些参数造成的。mac下使用的lsof来替代netstat

修改如下:

kylin_port_in_use=`lsof  -i :"${kylin_port}" -sTCP:LISTEN`

原文:https://blog.csdn.net/weilanzhuan1/article/details/89392128

猜你喜欢

转载自blog.csdn.net/qq_21383435/article/details/89924257
今日推荐