Transport Exception while running the demo

100 views
Skip to first unread message

Alex Nelson

unread,
Mar 26, 2012, 2:36:24 PM3/26/12
to flo...@googlegroups.com
Hello All,

I have been having quite a bit of trouble getting the demo to work.
I have built the flockDB framework on several instances of Ubuntu, and each time I can proceed through the demo until I start running queries against the database.
I can even run curl:localhost:9990/server_info.txt and get a response stating that the server is up. However, when I run any query on port 7915 I get the following error:


Flock::Edges::FlockDB::Client::TransportException: Flock::Edges::FlockDB::Client::TransportException
        from /usr/lib/ruby/gems/1.8/gems/thrift-0.8.0/lib/thrift/transport/socket.rb:109:in `read'
        from /usr/lib/ruby/gems/1.8/gems/thrift-0.8.0/lib/thrift/transport/buffered_transport.rb:76:in `read_into_buffer'
        from /usr/lib/ruby/gems/1.8/gems/thrift-0.8.0/lib/thrift/protocol/binary_protocol.rb:190:in `read_i32'
        from /usr/lib/ruby/gems/1.8/gems/thrift-0.8.0/lib/thrift/protocol/binary_protocol.rb:116:in `read_message_begin'
        from /usr/lib/ruby/gems/1.8/gems/thrift-0.8.0/lib/thrift/client.rb:45:in `receive_message'
        from /usr/lib/ruby/gems/1.8/gems/flockdb-0.7.1/lib/flock/gen-rb/flock_d_b.rb:169:in `recv_select'
        from /usr/lib/ruby/gems/1.8/gems/flockdb-0.7.1/lib/flock/gen-rb/flock_d_b.rb:161:in `select'
        from /usr/lib/ruby/gems/1.8/gems/thrift_client-0.8.1/lib/thrift_client/abstract_thrift_client.rb:150:in `send'
        from /usr/lib/ruby/gems/1.8/gems/thrift_client-0.8.1/lib/thrift_client/abstract_thrift_client.rb:150:in `handled_proxy'
        from /usr/lib/ruby/gems/1.8/gems/thrift_client-0.8.1/lib/thrift_client/abstract_thrift_client.rb:60:in `select'
        from /usr/lib/ruby/gems/1.8/gems/flockdb-0.7.1/lib/flock/operations/select_operation.rb:31:in `get_results'
        from /usr/lib/ruby/gems/1.8/gems/flockdb-0.7.1/lib/flock/operations/select_operation.rb:40:in `operation'
        from /usr/lib/ruby/gems/1.8/gems/flockdb-0.7.1/lib/flock/operation.rb:48:in `call'
        from /usr/lib/ruby/gems/1.8/gems/flockdb-0.7.1/lib/flock/operation.rb:48:in `get_results'
        from /usr/lib/ruby/gems/1.8/gems/flockdb-0.7.1/lib/flock/operation.rb:22:in `current_page'
        from /usr/lib/ruby/gems/1.8/gems/flockdb-0.7.1/lib/flock/operation.rb:77:in `next?'
        from /usr/lib/ruby/gems/1.8/gems/flockdb-0.7.1/lib/flock/operation.rb:62:in `each'
        from /usr/lib/ruby/gems/1.8/gems/flockdb-0.7.1/lib/flock/operations/select_operation.rb:4:in `each'
        from (irb):5:in `to_a'
        from (irb):5

I am running the irb prompt as shown in the demo but this occurs each time. I am using Thrift version 0.5.0. SBT 0.7.4, Ruby 1.8, and have tried OpenJDK6 and SunJDK6. I am using the gizzmo installed by the rubygem, and the flockDB client and thrift_clients installed by default rubygems. The only thing that is not the exact version specified is my MySQL instance which is a little newer than 5.0.

Can anybody give me an idea of where to start looking for a fix? I have tried diagnosing the problem using Wireshark, but it looks as though the client always disconnects because it reached timeout before the server sends results. But the server should send results much faster because it is literally the empty set. I have removed the timeout but the client eventually reads a "nil" packet and then crashes regardless of the lack of a timeout. The port is definitely open and listening (I used netstat -an and saw 7915 and 7920 were listening as they are supposed to be). I am completely stuck and need help because this is my senior design project and it is far too late in the semester to switch directions...

Thanks in advance!
Alex

Rick Kilcoyne

unread,
May 20, 2012, 9:41:39 PM5/20/12
to flo...@googlegroups.com
I'm seeing the exact same stacktrace. Did you ever figure out what was wrong?

Rick

Alex Nelson

unread,
May 23, 2012, 1:08:10 PM5/23/12
to flo...@googlegroups.com
Rick,

I did figure out what was going on.
The problem we are seeing is evident only in local execution of the environment, apparently.

For a local development try this:

Change defaults hash in
/var/lib/gems/1.8/gems/flockdb-0.7.1/lib/flock/service.rb
to
DEFAULTS = {:transport_wrapper => Thrift::FramedTransport, :connect_timeout => 1 }

Which will fail the first time, but on a second connection will run through.

The solution was posted here:
https://groups.google.com/forum/?fromgroups#!msg/finaglers/uzXdOE8pWgs/fTa6rZa09ogJ

Hope this helps!
Alex
Reply all
Reply to author
Forward
0 new messages