Connection error: <class 'thrift.transport.TTransport.TTransportException'> Could not connect to localhost: 21000

I am trying to install cloudera impala on my local computer (32-bit ubuntu) without the cloudera manager (they do not support 32-bit ubuntu, I also tried and failed).

I tried the following commands to load the impala from the repository.

  $ 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 

Everything is fine here. My impala / conf / hive-site.xml is as follows

 <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> 

My impala / conf / hdfs-site.xml looks like this.

 <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> 

Now I tried to connect to localhost on impala-shell. But, it gives me this error

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

FYI, I use mysql for the metastor for my hive-hadoop cluster.

+4
source share
4 answers

I had the same issue when executing a command from statestore Node. Try executing impala-shell from any Node daemon. Worked for me!

+2
source

There is nothing in the definition of localhost , but the question is whether the corresponding service is really available on the corresponding port. First, I recommend checking if the service is available.

The following command will show you if the service is listening on the port (and on which IP interface). This may differ from the localhost interface.

 netstat -a -n | grep 21000 

Note that localhost usually means IP 127.0.0.1 , but in the default Ubuntu configuration it looks like a different IP address (e.g. 127.0.1.1 ). The recommended solution is to fix /etc/hosts (there are a lot of articles about this). Also check this answer .

+1
source

Make sure all Impala daemons are running: Impala Daemon, Impala Catalog Server Daemon, and Impala StateStore Daemon.

This solved the problem for me.

+1
source

This is because you are using localhost in your configuration settings. Use the fully qualified domain name instead of localhost and restart the shell.

-1
source

Source: https://habr.com/ru/post/1486848/


All Articles