beeline not able to connect to hiveserver2

前端 未结 7 1768
孤城傲影
孤城傲影 2021-02-07 13:31

I have a CDH 5.3 instance. I start the hive-server2 by first starting the hive-metastore and then the hive-server from command line. After this I use beeline to connect to my

7条回答
  •  终归单人心
    2021-02-07 14:06

    In this case,your hiveserver2 service was not started.please follow blow steps to check and fix. step: 1.see hive.log file to check "Service:HiveServer2 is started."

    1) find / -name hive.log
    2) vim hive.log
      in hive.log file ,if you can not find "Service:HiveServer2 is started.",then prove hiveserver2 is not started.
    

    2.start hiveserver2 command: ./bin/hiveserver2

    3.see hive.log。 if you can find "Service:HiveServer2 is started." in hive.log. then connect hiveserver2 by beeline.

    4.connect hiveserver2 ./bin/beeline !connect jdbc:hive2://localhost:10000

    5.below information can appeare.

    Beeline version 1.2.1 by Apache Hive
    beeline> !connect jdbc:hive2://localhost:10000
    Connecting to jdbc:hive2://localhost:10000
    Enter username for jdbc:hive2://localhost:10000: root
    Enter password for jdbc:hive2://localhost:10000: ******
    Connected to: Apache Hive (version 1.2.1)
    Driver: Hive JDBC (version 1.2.1)
    Transaction isolation: TRANSACTION_REPEATABLE_READ
    

提交回复
热议问题