0

I have a fully functioning Apache Spark Hive ThriftServer 1.2.1 which is tested with beeline and SQL Developer (both works). The configuration for this server is as follows:

  <property>
     <name>hive.server2.authentication</name>
     <value>NONE</value>
  </property>

  <property>
     <name>hive.metastore.schema.verification</name>
     <value>false</value>
  </property>

 <property>
    <name>hive.server2.enable.doAs</name>
    <value>true</value>
 </property>

But Simba ODBC cannot establish connection with it (though the server respond with error message). Everytime the client side throws the following exception after 2 minutes:

    [S1000][unixODBC][Simba][SparkODBC] (22) Error from ThriftHiveClient: EAGAIN (timed out)
    [ISQL]ERROR: Could not SQLConnect

And the server side throws the following exception:

java.lang.RuntimeException: org.apache.thrift.transport.TTransportException
    at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:219)
    at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:189)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.thrift.transport.TTransportException
    at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
    at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
    at org.apache.thrift.transport.TSaslTransport.receiveSaslMessage(TSaslTransport.java:182)
    at org.apache.thrift.transport.TSaslServerTransport.handleSaslStartMessage(TSaslServerTransport.java:125)
    at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:253)
    at org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41)
    at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216)
    ... 4 more

We've exhausted all options and this symptom is the only response we can get from server. Has someone encounter this error before and fix it?

P.S: The operating system of the client side is SUSE, which is listed as one of the supported OS by Spark ODBC driver.

tribbloid
  • 4,823
  • 10
  • 46
  • 81

3 Answers3

1

If your server has hive.server2.authentication set to NONE, you will need to use the User Name authentication mechanism and supply a valid user name because your server has hive.server2.enable.doAs set to true. For Linux, that means you need to configure your DSN with AuthMech=1 to use the correct authentication method. Then you will need to pass in a valid user name when you run isql (e.g. isql DSN UID). I hope this helps.

wma
  • 11
  • 1
0

If you are still having problem, would it be possible to show us your DSN? For Spark 1.1.x and later make sure you also have SparkServerType=3 in your DSN. Thanks.

Holman
  • 26
  • 1
0

I have this working by adding this to hive-site.xml :

  <property>
    <name>hive.server2.authentication</name>
    <value>NONE</value>
  </property>

Then in the server with the unixODBC and with simbaODBC driver installed, I changed the odbc.ini file to this (note that the user is in hive-site.xml):

[SPARK]
Description=Spark ODBC Driver (64-bit) DSN
Driver=/opt/simba/sparkodbc/lib/64/libsimbasparkodbc64.so
Host=192.168.100.10
Port=10000
SparkServerType=3
AuthMech=2
UID=hive

Then I connect using isql and the DSN in odbc.ini

isql -v SPARK

Hope it helps !

kavukata
  • 1
  • 1