【问题标题】:How to fix 'Missing version in readMessageBegin, old client?' when connecting to Cloudera Hive 1.1.0>如何修复“readMessageBegin 中缺少版本,旧客户端?”连接到 Cloudera Hive 1.1.0 时>
【发布时间】:2018-02-12 07:15:44
【问题描述】:

我有一个扩展 HiveServer2 的自定义 Hive 服务器。我可以在 CDH5 中使用以下参数启动它:

  --hiveconf "hive.server2.authentication=NOSASL" \
  --hiveconf "hive.metastore.local=true" \
  --hiveconf "hive.metastore.uris=" \
  --hiveconf "hive.metastore.sasl.enabled=false" \
  --hiveconf "fs.hdfs.impl.disable.cache=true" \
  --hiveconf "fs.file.impl.disable.cache=true" \
  --hiveconf "hive.server2.authentication.kerberos.principal=$KRB_PRINCIPAL" \
  --hiveconf "hive.server2.authentication.kerberos.keytab=$KRB_KEYTAB"

但是,每当我尝试使用直线连接到它时,我都会收到以下错误:

17/09/04 03:04:44 错误 TThreadPoolServer:发生 Thrift 错误 在处理消息的过程中。 org.apache.thrift.protocol.TProtocolException:缺少版本 readMessageBegin,老客户?在 org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:228) 在 org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:27) 在 org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56) 在 org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)

此错误与Hive - Thrift - Missing version in readMessageBegin, old client? 中报告的错误相同。但条件不同:我的认证已经设置为NOSASL,我的服务器thrift版本已经是V7了。

是否还有其他原因可能导致它被触发? (例如 JAR 地狱或 hive-site.xml 中的错误配置)

【问题讨论】:

    标签: hive thrift-protocol


    【解决方案1】:

    两天前我也遇到了同样的问题,我相信这里的问题是你在不同的传输模式下启动服务器和客户端。尝试将这些属性放入 hive-site.xml

      <property>
          <name>hive.server2.transport.mode</name>
          <value>http</value>
      </property>
    
      <property>
          <name>hive.server2.thrift.http.port</name>
          <value>10001</value>
      </property>
    
      <property>
          <name>hive.server2.thrift.http.path</name>
          <value>cliservice</value>
      </property>
    

    然后启动你的元存储:

    nohup bin/hive --service metastore &
    

    启动你的 hiveserver2

    hive --service hiveserver2 --hiveconf hive.server2.thrift.port=10001 --hiveconf hive.root.logger=INFO,console
    

    然后从直线连接:

    !connect jdbc:hive2://localhost:10001/hive;transportMode=http;httpPath=cliservice
    

    您将连接到:Apache Hive。

    【讨论】:

      猜你喜欢
      • 2016-05-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多