# OpenSSL/drb problem

**URL:** <https://rubytalk.org/t/openssl-drb-problem/7254>\
**Category:** ruby-talk\
**Created:** [6 August 2003 17:28 UTC](https://rubytalk.org/t/openssl-drb-problem/7254 "2003-08-06T17:28:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathaniel\_Talbott](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@Nathaniel\_Talbott](https://rubytalk.org/u/Nathaniel_Talbott)\
**Post date:** [6 August 2003 17:28 UTC](https://rubytalk.org/t/openssl-drb-problem/7254/1 "2003-08-06T17:28:29Z")

</div>

Well, I have DRb and OpenSSL working together! I’m running in to a bit of  
trouble , though, and would appreciate any help ya’ll can offer. When I run  
my client/server app with small messages, it works great. When I run it with  
large messages, though, things aren’t so happy…

When the app is run, I can connect and log in to the server without trouble  
(all over SSL). However, once I’m logged in and request a large chunk of  
data from the server, the client application hangs waiting for the reply to  
finish. Now, two things can happen at this point:

1. If I terminate the server, the client comes up and displays the correct  
information. It appears that the client is waiting for the socket to be  
closed, and terminating the server causes this to happen.

2. If I terminate the client, I get the following error on the server (and  
it dies):

D, [2003-08-06T12:09:25.185562 #26009] DEBUG – SE Server: #urls called  
/usr/lib/ruby/site\_ruby/1.8/dbi/dbi.rb:318: warning: method redefined;  
discarding old fraction  
Exception `OpenSSL::SSL::SSLError' at /usr/lib/ruby/1.8/openssl/buffering.rb:33 - SSL_read:: Exception`OpenSSL::SSL::SSLError’ at  
/usr/lib/ruby/1.8/openssl/buffering.rb:139  
- SSL\_write::  
Exception `OpenSSL::SSL::SSLError' at /usr/lib/ruby/1.8/openssl/buffering.rb:139 - SSL_write:: bad write retry /usr/lib/ruby/1.8/openssl/buffering.rb:139:in`syswrite’: SSL\_write:: bad  
write  
retry (OpenSSL::SSL::SSLError)  
from /usr/lib/ruby/1.8/openssl/buffering.rb:139:in `do_write' from /usr/lib/ruby/1.8/openssl/buffering.rb:181:in`flush’  
from /usr/lib/ruby/1.8/openssl/buffering.rb:186:in `close' from /usr/lib/ruby/site_ruby/1.8/drb/ssl.rb:167:in`close’  
from /usr/lib/ruby/site\_ruby/1.8/drb/drb.rb:725:in `main_loop' from /usr/lib/ruby/site_ruby/1.8/drb/drb.rb:711:in`loop’  
from /usr/lib/ruby/site\_ruby/1.8/drb/drb.rb:729:in `main_loop' from /usr/lib/ruby/site_ruby/1.8/drb/drb.rb:707:in`start’  
… 9 levels…  
from ./se/server/baserunner.rb:72:in `start' from ./se/server/baserunner.rb:59:in`send’  
from ./se/server/baserunner.rb:59:in `run’  
from se/server.rb:58

It appears that buffering is interacting badly with a large message size.  
I’ll continue investigating, but if anyone can help me out, that would be  
great!

Thanks,

Nathaniel

\<:((\>\<

---

<div class="post-metadata">

**Author:** ![Michael\_Garriss1](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Michael\_Garriss1](https://rubytalk.org/u/Michael_Garriss1)\
**Post date:** [6 August 2003 17:40 UTC](https://rubytalk.org/t/openssl-drb-problem/7254/2 "2003-08-06T17:40:14Z")

</div>

Nathaniel Talbott wrote:

> Well, I have DRb and OpenSSL working together! I’m running in to a bit of  
> trouble , though, and would appreciate any help ya’ll can offer. When I run  
> my client/server app with small messages, it works great. When I run it with  
> large messages, though, things aren’t so happy…
> 
> When the app is run, I can connect and log in to the server without trouble  
> (all over SSL). However, once I’m logged in and request a large chunk of  
> data from the server, the client application hangs waiting for the reply to  
> finish. Now, two things can happen at this point:
> 
> 1. If I terminate the server, the client comes up and displays the correct  
> information. It appears that the client is waiting for the socket to be  
> closed, and terminating the server causes this to happen.
> 
> 2. If I terminate the client, I get the following error on the server (and  
> it dies):
> 
> D, [2003-08-06T12:09:25.185562 #26009] DEBUG – SE Server: #urls called  
> /usr/lib/ruby/site\_ruby/1.8/dbi/dbi.rb:318: warning: method redefined;  
> discarding old fraction  
> Exception `OpenSSL::SSL::SSLError’ at  
> /usr/lib/ruby/1.8/openssl/buffering.rb:33
> 
> - SSL\_read::  
> Exception `OpenSSL::SSL::SSLError’ at  
> /usr/lib/ruby/1.8/openssl/buffering.rb:139
> - SSL\_write::  
> Exception `OpenSSL::SSL::SSLError’ at  
> /usr/lib/ruby/1.8/openssl/buffering.rb:139
> - SSL\_write:: bad write retry  
> /usr/lib/ruby/1.8/openssl/buffering.rb:139:in `syswrite': SSL_write:: bad write retry (OpenSSL::SSL::SSLError) from /usr/lib/ruby/1.8/openssl/buffering.rb:139:in `do\_write’  
> from /usr/lib/ruby/1.8/openssl/buffering.rb:181:in `flush' from /usr/lib/ruby/1.8/openssl/buffering.rb:186:in `close’  
> from /usr/lib/ruby/site\_ruby/1.8/drb/ssl.rb:167:in `close' from /usr/lib/ruby/site_ruby/1.8/drb/drb.rb:725:in `main\_loop’  
> from /usr/lib/ruby/site\_ruby/1.8/drb/drb.rb:711:in `loop' from /usr/lib/ruby/site_ruby/1.8/drb/drb.rb:729:in `main\_loop’  
> from /usr/lib/ruby/site\_ruby/1.8/drb/drb.rb:707:in `start' ... 9 levels... from ./se/server/baserunner.rb:72:in `start’  
> from ./se/server/baserunner.rb:59:in `send' from ./se/server/baserunner.rb:59:in `run’  
> from se/server.rb:58
> 
> It appears that buffering is interacting badly with a large message size.  
> I’ll continue investigating, but if anyone can help me out, that would be  
> great!
> 
> Thanks,
> 
> Nathaniel
> 
> \<:((\>\<

I can not help you but I would love to hear more about your experience  
with DRb and OpenSSL. I’m in the process of working on a client/server  
app that uses DRb and the security issue it in the back (or side, or  
front) of my head, nagging me. I currently have no security other then  
what DRb provides. Can anyone speak to the security issues of DRb?

Michael
