java.net.ConnectException: Connection refused error when running Hive

This is because hive is not able to contact your namenode

Check if your hadoop services has started properly.

Run the command jps to see what all services are running.


The reason why you get this error is that Hive needs hadoop as its base. So, you need to start Hadoop first.

Here are some steps.

Step1: download hadoop and unzip it

Step2: cd #your_hadoop_path

Step3: ./bin/hadoop namenode -format

Step4: ./sbin/start-all.sh

And then, go back to #your_hive_path and start hive again

Tags:

Hadoop

Hive