0
votes

hive> CREATE SCHEMA IF NOT EXISTS inconv_seql; FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Got exception: java.net.ConnectException Call From User-MacBook-Air.local/127.0.0.1 to localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused)

1

1 Answers

0
votes
localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused;

the above error is due to hadoop demons with the ports 9000 are not running in your local machine,

please start hadoop and then start hive by following the below steps.

1. check hadoop is running,

hduser@ubuntu:~$ jps

if you could not find any hadoop daemons running in your local, then start hadoop follow the below command,

hduser@ubuntu:~$ $HADOOP_HOME/sbin/start-all.sh

2. check the hive-site.xml,core-site.xml hive-site.xml

<property> 
<name>hive.metastore.db.type</name> 
<value>DERBY</value> 
<description> Expects one of [derby, oracle, mysql, mssql, postgres]. Type of database used by the metastore. Information schema &amp; JDBCStorageHandler depend on it. </description> 
</property> 
<property> 
<name>hive.metastore.warehouse.dir</name> 
<value>hdfs://localhost:8020/user/hive/warehouse</value> 
<description>location of default database for the warehouse</description> </property>

core-site.xml

<configuration> 
<property> 
<name>hadoop.tmp.dir</name> 
<value>/usr/local/Cellar/hadoop/hdfs/tmp</value> 
<description>A base for other temporary directories</description> 
</property> 
<property> 
<name>fs.default.name</name> 
<value>hdfs://localhost:8020</value> 
</property> 
</configuration>

and try to launch hive terminal and proceed.