0

I have installed rbhive gem(0.6.0) in ruby 1.9 and I am getting this error when I am trying to run the following piece of code in irb:

res = RBHive.tcli_connect('172.16.1.52', :port => 9_999) do |connection| <br>
  connection.fetch('SHOW TABLES')<br>
end<br>


Thrift::ApplicationException: Thrift::ApplicationException from /usr/lib64/ruby/gems/1.9.1/gems/thrift-0.9.0/lib/thrift/client.rb:58:in `handle_exception'
from /usr/lib64/ruby/gems/1.9.1/gems/thrift-0.9.0/lib/thrift/client.rb:46:in `receive_message'
from /usr/lib64/ruby/gems/1.9.1/gems/rbhive-0.6.0/lib/thrift/t_c_l_i_service.rb:26:in `recv_OpenSession'
from /usr/lib64/ruby/gems/1.9.1/gems/rbhive-0.6.0/lib/thrift/t_c_l_i_service.rb:18:in `OpenSession'
from /usr/lib64/ruby/gems/1.9.1/gems/rbhive-0.6.0/lib/rbhive/t_c_l_i_connection.rb:155:in `open_session'
from /usr/lib64/ruby/gems/1.9.1/gems/rbhive-0.6.0/lib/rbhive/t_c_l_i_connection.rb:55:in `tcli_connect'
from (irb):9
from /usr/bin/irb:12:in `<main>'

I am trying to do this in irb console. I am not sure what I am doing wrong in this.

Can anyone help me to resolve this issue?

Thanks, Soham

JensG
  • 13,148
  • 4
  • 45
  • 55
Soham
  • 13
  • 7
  • 1
    You are getting this exception _trying to call what_? Please post your code causing the exception to happen. – Aleksei Matiushkin Dec 12 '16 at 11:49
  • "res = RBHive.tcli_connect('172.16.1.52', :port => 9_999) do |connection| connection.fetch('SHOW TABLES') end". This is the code which I am trying to run in my irb. – Soham Dec 12 '16 at 11:52
  • Please put this code in the question itself in the first place. It looks like there is nothing listening for incoming connection at `172.16.1.52:9999`. – Aleksei Matiushkin Dec 12 '16 at 11:59
  • Do I need to have some configuration to connect it to hive? and if yes then what should be the configuration and in which file this needs to be done? I have my thrift service up and running. - @mudasobwa – Soham Dec 12 '16 at 12:16
  • Looks as if someone is indeed listening at the other side. [The code received the exceoption from the server end and rethrows it](https://github.com/apache/thrift/blob/0.9.x/lib/rb/lib/thrift/client.rb#L46). The big question is, what caused the server to emit an `ApplicationException`? That's usually a sign of something unexpected happening on the server while processing the call, e.g. an uncaught non-Thrift exception. – JensG Dec 13 '16 at 10:09

0 Answers0