连接错误:<class'swetift.transport.ttransport.ttransportexception'=“”>无法连接到localhost:21000 </class>

时间:2013-06-18 14:47:55

标签: hadoop hive impala

我正在尝试在没有cloudera管理器的情况下在我的本地机器(32位ubuntu)上安装cloudera impala(他们不支持32位ubuntu,我也试过并失败了)。

我尝试过以下命令从存储库下载impala。

    $ sudo apt-get install impala-shell
    $ sudo apt-get install impala             # Binaries for daemons
    $ sudo apt-get install impala-server      # Service start/stop script
    $ sudo apt-get install impala-state-store # Service start/stop script 

到这里它工作得很好。我的impala / conf / hive-site.xml看起来像这样

<property>
<name>hive.metastore.local</name>
<value>false</value>
</property>

<property>
<name>hive.metastore.uris</name>
<value>thrift://localhost:9083</value>
</property>

<property>
<name>hive.metastore.client.socket.timeout</name>
<value>3600</value>
<description>MetaStore Client socket timeout in seconds</description>
</property>

我的impala / conf / hdfs-site.xml看起来像这样。

<property>
    <name>dfs.client.read.shortcircuit</name>
    <value>true</value>
</property>

<property>
    <name>dfs.domain.socket.path</name>
    <value>/var/run/hadoop-hdfs/dn._PORT</value>
</property>

<property>
    <name>dfs.client.file-block-storage-locations.timeout</name>
    <value>3000</value>
</property>

现在,我试图在impala-shell上连接到localhost。但是,它给了我这个错误

Error connecting: <class 'thrift.transport.TTransport.TTransportException'>, Could not connect to localhost:21000

仅供参考,我正在使用mysql作为我的hive-hadoop集群的Metastore。

4 个答案:

答案 0 :(得分:3)

从statestore Node执行命令时遇到了同样的问题。尝试从任何守护程序节点执行impala-shell。为我工作!

答案 1 :(得分:1)

指定localhost本身没有任何内容,但问题是适当的端口是否有适当的服务。我建议先检查服务是否可用。

以下命令将显示服务是否正在侦听端口(以及在哪个IP接口上)。 它可以是与localhost不同的界面。

netstat -a -n | grep 21000

请注意localhost通常表示IP 127.0.0.1,但在默认的Ubuntu配置中,它看起来像不同的IP地址(如127.0.1.1)。建议的解决方案是纠正/etc/hosts(有很多关于此的文章)。另请查看this answer

答案 2 :(得分:1)

确保所有Impala守护程序都在运行:Impala守护程序,Impala目录服务器守护程序和Impala StateStore守护程序。

这解决了我的问题。

答案 3 :(得分:-1)

这是因为您在配置设置中使用localhost。使用完全限定的域名而不是localhost并重新启动shell。