Hi Andrew,

Yes I did look at the below Wiki page earlier. I didn’t modify any default 
settings for HiveServer2 so the hive.server.authentication is “NONE” at this 
point (which probably results to “SASL” by default I guess).

Also if you look at the beeline output, it is able to connect to HiveServer2 
but not giving any response for the query “show tables”.

Thanks
- Atul

From: Andrew Mains [mailto:andrew.ma...@kontagent.com]
Sent: Wednesday, December 03, 2014 2:46 AM
To: user@hive.apache.org
Subject: Re: JDBC/beeline client hangs with HiverServer2 (0.13.1)

Hi Atul,

The setting you pasted is for the metastore's authentication (setting to false 
means SASL is disabled there). The setting you want is:



hive.server2.authentication – Authentication mode, default NONE. Options are 
NONE, NOSASL, KERBEROS, LDAP, PAM and CUSTOM.

See https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2

Andrew


On 12/2/14, 11:48 PM, Atul Paldhikar (apaldhik) wrote:
Hi Prasad,

My default hive-site.xml has following, doesn’t that mean “sasl” is disabled ?

<property>
  <name>hive.metastore.sasl.enabled</name>
  <value>false</value>
  <description>If true, the metastore Thrift interface will be secured with 
SASL. Clients must authenticate with Kerberos.</description>
</property>

Also the normal Hive login gives following output for show tables

hive> show tables;
OK
ex_address
invites
invites2
pokes
temp_address
Time taken: 0.517 seconds, Fetched: 5 row(s)
hive>

However the beeline (without “auth=noSasl”) gives a strange error output, with 
“auth=noSasl” it just hangs and the exits with an exception

$ beeline
Beeline version 0.13.1 by Apache Hive
beeline> !connect jdbc:hive2://finattr-comp-dev-01:10000/default "" "" 
org.apache.hive.jdbc.HiveDriver
Connecting to jdbc:hive2://finattr-comp-dev-01:10000/default
Connected to: Apache Hive (version 0.13.1)
Driver: Hive JDBC (version 0.13.1)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://finattr-comp-dev-01:10000/def>
0: jdbc:hive2://finattr-comp-dev-01:10000/def> show tables;
Error: For input string: "5000L" (state=,code=0)
0: jdbc:hive2://finattr-comp-dev-01:10000/def>

Thanks
- Atul

From: Prasad Mujumdar [mailto:pras...@cloudera.com]
Sent: Tuesday, December 02, 2014 10:21 AM
To: user@hive.apache.org<mailto:user@hive.apache.org>
Subject: Re: JDBC/beeline client hangs with HiverServer2 (0.13.1)


  By default the sasl auth is enabled, you don't need to set 'auth=noSasl' 
unless you configured non-sasl auth.
What errors did you see in the server log initially when noSasl option was not 
passed ?

thanks
Prasad


On Tue, Dec 2, 2014 at 10:08 AM, Atul Paldhikar (apaldhik) 
<apald...@cisco.com<mailto:apald...@cisco.com>> wrote:
Trying again, any pointers is really appreciated !

Thanks
- Atul

From: Atul Paldhikar (apaldhik)
Sent: Monday, December 01, 2014 1:50 PM
To: user@hive.apache.org<mailto:user@hive.apache.org>
Subject: JDBC/beeline client hangs with HiverServer2 (0.13.1)

Hi,

I am trying to connect to Hive via JDBC client (Java code) but the connection 
hands forever. The same issue with beeline client also. I did google around and 
add “auth=noSasl” to my JDBC URL but still no luck.

HiveServer2 startup :

nohup hive --service hiveserver2

Beeline client :

beeline>!connect jdbc:hive2://finattr-comp-dev-01:10000/default;auth=noSasl "" 
"" org.apache.hive.jdbc.HiveDriver
Connecting to jdbc:hive2://finattr-comp-dev-01:10000/default;auth=noSasl
14/12/01 13:47:35 ERROR jdbc.HiveConnection: Error opening session
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.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
        at 
org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
        at 
org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
        at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
        at 
org.apache.hive.service.cli.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:156)
        at 
org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:143)
        at 
org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:415)
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:193)
        at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
        at java.sql.DriverManager.getConnection(DriverManager.java:571)
        at java.sql.DriverManager.getConnection(DriverManager.java:187)

Thanks
- Atul


Reply via email to