drb on windows not connecting

  • Thread starter Joel VanderWerf
  • Start date
J

Joel VanderWerf

The drb examples just hang without doing anything. However, the tsvr.rb
and clnt.rb (not drb, just TCP), work fine, so I don't think it's a
firewall issue (I've tried shutting down the ZoneAlarm firewall, just to
be sure).

The only sign of any connection is that exiting the server causes an
exception in the client:

==== TERM 1 ====
C:\ruby\tmp\drb-sample>ruby name.rb druby://localhost:7640
druby://localhost:7640
[return] to exit


C:\ruby\tmp\drb-sample>

==== TERM 2 ====

C:\ruby\tmp\drb-sample>ruby namec.rb druby://localhost:7640
c:/ruby/lib/ruby/1.8/drb/drb.rb:103:in `read': Invalid argument
(Errno::EINVAL)
from c:/ruby/lib/ruby/1.8/drb/drb.rb:103:in `load'
from c:/ruby/lib/ruby/1.8/drb/drb.rb:149:in `recv_reply'
from c:/ruby/lib/ruby/1.8/drb/drb.rb:291:in `recv_reply'
from c:/ruby/lib/ruby/1.8/drb/drb.rb:474:in `send_message'
from c:/ruby/lib/ruby/1.8/drb/drb.rb:408:in `method_missing'
from c:/ruby/lib/ruby/1.8/drb/drb.rb:407:in `open'
from c:/ruby/lib/ruby/1.8/drb/drb.rb:407:in `method_missing'
from namec.rb:18

C:\ruby\tmp\drb-sample>

=================

This is with 1.8.0 (2003-08-04) mswin32.

TIA for any suggestions.
 
S

Shashank Date

Joel VanderWerf said:
The drb examples just hang without doing anything.

In name.rb, just replace the gets after the puts '[return] to exit'
with DRb.thread.join and see the fun ;-)
However, the tsvr.rb

Which tsvr.rb are you talking of ..I don't see it my sample dir ?

HTH,
-- shanko
 
S

Shashank Date

Shashank Date said:
Joel VanderWerf said:
The drb examples just hang without doing anything.

In name.rb, just replace the gets after the puts '[return] to exit'
with DRb.thread.join and see the fun ;-)

This is a solution to similar problems with some other drb
programs too (like rinda/ring.rb) on Win 32.
Unfortunately, this solution makes stoping the server process a pain.
I haven't found a graceful exit solution yet.
Which tsvr.rb are you talking of ..I don't see it my sample dir ?

Ok, found it. Thanks,
-- shanko
 
J

Joel VanderWerf

Shashank said:
The drb examples just hang without doing anything.


In name.rb, just replace the gets after the puts '[return] to exit'
with DRb.thread.join and see the fun ;-)

Ok, got it now.

Anyone know why the behavior differs from linux to windows?
Which tsvr.rb are you talking of ..I don't see it my sample dir ?

Strangely, it is installed in

\ruby\doc\Ruby-1.8.0\sample

Seems like it should be in

\ruby\samples
 
J

Joel VanderWerf

Joel said:
Shashank said:
The drb examples just hang without doing anything.



In name.rb, just replace the gets after the puts '[return] to exit'
with DRb.thread.join and see the fun ;-)


Ok, got it now.

Anyone know why the behavior differs from linux to windows?

I suppose #gets hangs the other threads? Ugh. Oh, well. I'm writing GUI
stuff anyway, so I don't care too much about the console on windows.
 
C

Chris Morris

Joel said:
I suppose #gets hangs the other threads? Ugh. Oh, well. I'm writing
GUI stuff anyway, so I don't care too much about the console on windows.

Another option is to use srvany.exe -- I've had this work well (although
srvany.exe is only available in the NT Resource Kit, I believe -- not free)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

drb works on one system fails on other 2
drb load limit 3
trying to get drb to work ... 0
DRb and exceptions 2
dchat 0
Interaction of debug.h and DRb 0
DRb and unknown_methods 2
FreeRIDE - Debug mode hangs 2

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,614
Members
45,292
Latest member
EttaCasill

Latest Threads

Top