How to fix 'Missing version in readMessageBegin, old client?' when connecting to Cloudera Hive 1.1.0>

4.8k views Asked by At

I have a customized Hive server that extends HiveServer2. I can launch it using the following parameters in 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"

However, whenever I try to connect to it using beeline, I got the following error:

17/09/04 03:04:44 ERROR TThreadPoolServer: Thrift error occurred during processing of message. org.apache.thrift.protocol.TProtocolException: Missing version in readMessageBegin, old client? at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:228) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:27) at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56) at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

This error is identical to the one reported in Hive - Thrift - Missing version in readMessageBegin, old client?. But the condition is different: my authentication is already set to NOSASL, and my server thrift version is already V7.

Is there any other reason that could cause it to be triggered? (e.g. JAR hell or incorrect configuration from hive-site.xml)

1

There are 1 answers

0
Rohit Barnwal On

I was facing the same problem 2 days back, I believe problem here is you are starting server and client on different transport mode. Try putting these properties in 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>

Then start your metastore:

nohup bin/hive --service metastore &

Start your hiveserver2

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

Then to connect from beeline:

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

You will be connected to: Apache Hive.