zoukankan      html  css  js  c++  java
  • Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: Invalid status 16 (state=08S01,code=0)

    使用beeline 连接 hive 报标题所示错误。

    连接语句:

    !connect jdbc:hive2://localhost:10000/default
    

    在输入用户名和密码后,出现错误:

    20/10/24 20:28:38 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost:10000
    Unknown HS2 problem when communicating with Thrift server.
    Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: Invalid status 16 (state=08S01,code=0)
    Beeline version 3.1.2 by Apache Hive
    

    但神奇的是,如果不写上主机信息是可以的

    [20:28 hadoop@Cavin-Y7000 hive]$ beeline -u jdbc:hive2://
    SLF4J: Class path contains multiple SLF4J bindings.
    SLF4J: Found binding in [jar:file:/usr/local/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/hdfs/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
    SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
    Connecting to jdbc:hive2://
    20/10/24 20:30:27 [main]: WARN conf.HiveConf: HiveConf of name hive.server2.connection.host does not exist
    Hive Session ID = 4977083b-4d07-4ff0-930f-7afb9e214933
    20/10/24 20:30:28 [main]: WARN session.SessionState: METASTORE_FILTER_HOOK will be ignored, since hive.security.authorization.manager is set to instance of HiveAuthorizerFactory.
    20/10/24 20:30:29 [main]: WARN metastore.ObjectStore: datanucleus.autoStartMechanismMode is set to unsupported value null . Setting it to value: ignored
    20/10/24 20:30:30 [main]: WARN DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
    20/10/24 20:30:30 [main]: WARN DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
    20/10/24 20:30:30 [main]: WARN DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
    20/10/24 20:30:30 [main]: WARN DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
    20/10/24 20:30:30 [main]: WARN DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
    20/10/24 20:30:30 [main]: WARN DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
    20/10/24 20:30:31 [main]: WARN DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
    20/10/24 20:30:31 [main]: WARN DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
    20/10/24 20:30:31 [main]: WARN DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
    20/10/24 20:30:31 [main]: WARN DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
    20/10/24 20:30:31 [main]: WARN DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
    20/10/24 20:30:31 [main]: WARN DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
    Connected to: Apache Hive (version 3.1.2)
    Driver: Hive JDBC (version 3.1.2)
    Transaction isolation: TRANSACTION_REPEATABLE_READ
    Beeline version 3.1.2 by Apache Hive
    0: jdbc:hive2://>
    

    真是百思不得骑姐。网上各种找都没有任何一个人遇到这样的问题,虽然也有Could not open client transport with JDBC Uri,但他们的报错后面都会跟着Connection refuse,那个是权限问题,而我的这个问题什么具体的报错都没给。

    后来想起在 /etc/hosts 中有一条 127.0.1.1 的记录是指向本机的(我的hadoop采用伪分布式安装)。具体如下:

    127.0.1.1       Cavin-Y7000.localdomain Cavin-Y7000
    

    然后尝试着在beeline连这个IP,居然通了!

    ./bin/beeline -u jdbc:hive2://127.0.1.1:10000/default
    
  • 相关阅读:
    EasyDSS功能简介视频直播、直播鉴权(如何完美将EasyDSS过渡到新版)
    EasyNVR前端构建之输入框样式的调整
    NVR硬件录像机web无插件播放方案(支持取特定时间段视频流)
    Windows操作系统远程Linux服务器传输文件方法(以EasyDSS云平台、EasyNVR上传部署为例)
    零基础实现摄像头的全平台直播 (二)公网直播的实现
    海康、大华NVR硬件录像机录像无插件全平台访问实现播放时间轴实现
    直播与虚拟直播
    CF585EPresent for Vitalik the Philatelist【莫比乌斯反演,狄利克雷前缀和】
    AT4519[AGC032D]Rotation Sort【dp】
    P5110块速递推【特征方程,分块】
  • 原文地址:https://www.cnblogs.com/wuzhiblog/p/13871297.html
Copyright © 2011-2022 走看看