记录一下耗时4天的hive无法监听10000端口的解决方案
·
花了很久很久,总是监听不到 10000 端口,最后原因找到,是因为我的hive.server2.thrift.bind.host 写错了。
[hadoop@localhost nohupout]$ grep -A 3 \
'hive.server2.thrift.bind.host' /usr/local/hive/conf/hive-site.xml
输出:
<name>hive.server2.thrift.bind.host</name>
<value>localhost</value>
<description>Bind host on which to run the HiveServer2 Thrift service.</description>
</property>
被这个 localhost 给迷惑了了
[hadoop@localhost nohupout]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
看起来好像localhost也可以,不过输入hostname 查看,但是这个怎么这么奇怪,还不知道为什么会这样
[hadoop@localhost nohupout]$ hostname
localhost.localdomain
然后,我改了一下 hive.server2.thrift.bind.host,保持和输出一致
[hadoop@localhost nohupout]$ grep -A 3 \
> 'hive.server2.thrift.bind.host' /usr/local/hive/conf/hive-site.xml
输出:
<name>hive.server2.thrift.bind.host</name>
<value>localhost.localdomain</value>
</property>
<property>
然后重启,就能成功监听了
[hadoop@localhost nohupout]$ netstat -tulnp | grep 10000
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 0 127.0.0.1:10000 :::* LISTEN 29554/java
更多推荐


所有评论(0)