hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From أنس الليثي <dev.fano...@gmail.com>
Subject Re: Connecting PHP application to Hive Thrift Server 2
Date Sun, 08 Mar 2015 18:04:12 GMT
thanks George for reply but I am using beeline to connect to Hive Server
without modifying anything and it works fine.

Also I have a java application that connects to the same server without
using any authentication and every thing works fine.


If you have any idea what the error message means kindly mention it.

Best regards

On 8 March 2015 at 20:22, George Livingston <georgeli2010@gmail.com> wrote:

> Hi
>
> I think you need to set authentication value as NOSASL
>
> Regards
> George
> On Mar 8, 2015 5:29 PM, "أنس الليثي" <dev.fanooos@gmail.com> wrote:
>
>> Dears
>>
>> I am using this client
>> <https://github.com/garamon/php-thrift-hive-client> to connect to hive
>> thrift server but the server is throwing the following exception
>>
>>
>> *2015-03-08 14:54:15,097 ERROR
>> org.apache.thrift.server.TThreadPoolServer: Error occurred during
>> processing of message.*
>> *java.lang.RuntimeException:
>> org.apache.thrift.transport.TTransportException: Invalid status -128*
>> * at
>> org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:219)*
>> * at
>> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:227)*
>> * 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: Invalid
>> status -128*
>> * at
>> org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:230)*
>> * at
>> org.apache.thrift.transport.TSaslTransport.receiveSaslMessage(TSaslTransport.java:184)*
>> * at
>> org.apache.thrift.transport.TSaslServerTransport.handleSaslStartMessage(TSaslServerTransport.java:125)*
>> * at
>> org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:262)*
>> * at
>> org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41)*
>> * at
>> org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216)*
>> * ... 4 more*
>>
>>
>>
>>
>> Also the sample code I am using is below
>>
>> *<?php*
>> *$GLOBALS['THRIFT_ROOT'] = dirname(__FILE__) . '/lib';*
>> *require_once $GLOBALS['THRIFT_ROOT'] .
>> '/packages/hive_service/ThriftHive.php';*
>> *require_once $GLOBALS['THRIFT_ROOT'] . '/transport/TSocket.php';*
>> *require_once $GLOBALS['THRIFT_ROOT'] . '/protocol/TBinaryProtocol.php';*
>> *require_once dirname(__FILE__) . '/ThriftHiveClientEx.php';*
>> *$transport = new TSocket('10.62.82.16', 10000);*
>> *$client = new ThriftHiveClientEx(new TBinaryProtocol($transport));*
>> *$transport->open();*
>> *$client->execute('SHOW TABLES');*
>> *var_dump($client->fetchAll());*
>> *$transport->close();*
>>
>>
>> Although when connecting using beeline everything works fine.
>>
>> What is the problem here ?
>>
>> --
>> Anas Rabei
>> Senior Software Developer
>> Mubasher.info
>> anas.rabei@mubasher.info
>>
>


-- 
Anas Rabei
Senior Software Developer
Mubasher.info
anas.rabei@mubasher.info

Mime
View raw message