Thanks for the replies, guys. I've spent about 12 hours on this so
far, and I'm still totally stumped, though, could anyone take a quick
look at this and see if they have any other ideas?
- I reverted my FreeBSD 5.3 back to the default GENERIC kernel. No change.
- I completely shut off all firewalls all around. No change.
- I tried newest stable-CVS build of Ruby. No change.
Here are my results with the EXACT SAME client.rb and server.rb
scripts all running the newest stable Ruby 1.8.2 (2004-12-25) on
different computers, all with no firewall, and all (except Linux)
right next to eachother on the same 192.168.0.* subnet
DRb TESTS:
CLIENT SERVER SUCCESS?
Mac Mac YES!
FreeBSD Mac no
Mac FreeBSD no
FreeBSD FreeBSD no
OpenBSD Linux YES
Mac Linux YES
FreeBSD Linux YES
FreeBSD OpenBSD YES
In other words:
If Linux is the server, ALL work.
If OpenBSD is the server, ALL work.
If Mac is the server, MAC works.
If FreeBSD is the server, NONE work.
I've got it printing all these little "I'm here" statements, so I know
exactly where it dies.
DRb server returns a reference to an object where class = "Logger" and
object_id = 67897744.
Client receives an object where class = "DRb::DRbObject" and object_id
is 364316.
It gets as far as saying it received the Object-reference back, and
can call local/generic kernel methods on it like .class and .object_id
But when I try to call any remote methods on the Object-reference, it
waits for a few minutes, then gives this error:
/usr/local/lib/ruby/1.8/drb/drb.rb:724:in `open': druby://server:8787
#<Errno::ETIMEDOUT: Operation timed out - connect(2)> (DRb::DRbConnError)
(All platforms die at that exact same line. Same error.)
Could it be that a remote-method called on a DRbUndumped
object-reference sends a different kind of TCP/IP packet than all the
other successful DRb calls up to that point?
Can anyone think of anything else it might be?
I'm not just hobbying with this. I really need to use DRb for work.
Thanks!
···
On Tue, 29 Mar 2005 08:44:32 -0800, Miles Keaton <mileskeaton@gmail.com> wrote:
Looking for any Ruby users on FreeBSD.
I think Ruby in FreeBSD freezes when receiving a reference to a remote object.
Can you please try the code-sample, here?
http://www.ruby-doc.org/stdlib/libdoc/drb/rdoc/classes/DRb.html
The one under the header "Remote objects under dRuby", halfway down the page.
Try having it communicate across two different computers, where
FreeBSD is the server.
Can you get it to work?
For me, on many different FreeBSD boxes, it freezes when it tries to
call this line:
logger.log("Hello, world!")
Everything works until that point.
This same freeze happens with
http://pragmaticprogrammer.com/titles/ruby/code/smp670.html
It works when both processes are on the same box, but not if they are
on two separate computers.
What they all have in common is DRbUndumped - so I'm guessing that's
the problem.
But I can't for the life of me figure out what would make a FreeBSD
server not-respond when receiving a reference to a remote object.
If you pass a copy of the object, with Class defined on both sides, it
works fine.
But if you make it a reference to the original object, it doesn't respond.
Is this a Ruby bug or a FreeBSD threads-bug?