Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

unable to connect to HiveServer2

unable to connect to HiveServer2

Explorer

Hi I am newbie , please help me 

 

Beeline version 0.12.0-cdh5.0.0

 

Below are the steps are been performed 

 

1. /etc/hive/conf/hive-site.xml

 

<configuration>

  <property>
    <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:mysql://guna:3306/metastore</value>  
  </property>
  <property>
    <name>javax.jdo.option.ConnectionDriverName</name>
    <value>com.mysql.jdbc.Driver</value>
  </property>  
  <property>
    <name>javax.jdo.option.ConnectionUserName</name>
    <value>hiveuser</value>
  </property>
  <property>
    <name>javax.jdo.option.ConnectionPassword</name>
    <value>password</value>
  </property>

  <property>
    <name>datanucleus.autoCreateSchema</name>
    <value>false</value>
  </property>
  <property>
    <name>datanucleus.fixedDatastore</name>
    <value>true</value>
  </property>
  <property>
    <name>datanucleus.autoStartMechanism</name>
    <value>SchemaTable</value>
  </property>

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

  <property>
    <name>hive.support.concurrency</name>
    <value>true</value>
  </property>
  <property>
    <name>hive.zookeeper.quorum</name>
    <value>guna,tigerZ,hory</value>
  </property>

</configuration>

2. Created  the Hive warehouse directory in HDFS.

 

3. Made the MySQL connector jar file accessible to Hive 

 

4. Initialized the Hive Metastore in MySQL database

 

5. sudo service hive-metastore start 

checked with sudo jps - able to see Runjar 

 

6. sudo service hive-server2 start

 

When I execute the below beeline in my guna teriminal I am getting the below error  please help me 

 

beeline -u jdbc:hive2://guna:10000/default -n username 
scan complete in 3ms
Connecting to jdbc:hive2://guna:10000/default
Error: Invalid URL: jdbc:hive2://guna:10000/default (state=08S01,code=0)
Beeline version 0.12.0-cdh5.0.0 by Apache Hive
0: jdbc:hive2://guna:10000/default>

Thanks in advance 

1 REPLY 1
Highlighted

Re: unable to connect to HiveServer2

Master Guru
Do you see any error logged on the HiveServer2 log (you will find it under /var/log/hive/ on the host you run that service on)?

Can you also try re-running the beeline command but with the below export done first?

export HADOOP_ROOT_LOGGER=TRACE,console