B
Brandon Coleman
I have spent several hours trying to workout why drb ruby will not allow
a remote pc to connect to my server to pull objects..
Here's where I stand with the problem:
Debian server is on 192.168.0.2 running ruby 1.8.2
Windows client is on 192.168.0.37 running ruby 1.8.4
I know the versions are different, but I'm worried that updating Debian
might break some packages.. I'm still looking into that part.. if I
could at least get it to connect I would be happy
run drbtest.rb on debian server, do the following tests,
run drbclient from debian server: connects
run drbclient from a windows machine: does not connect
run telnet to the drb port on debian server: does not connect
run telnet to the drb port, but have netcat running: connects
for some reason I can't get access to that port from another machine
with ruby running. I have tried to create an ACL list, but it doesn't
seem to help. If anyone can point me in the direction of documentation,
or a code snippet that might fix the problem, it would be greatly
appreciated.
Server code snippet:
--------------------------------
require 'drb'
require 'drb/acl'
class TestServer
def doit
"Hello, Distributed World"
end
end
acl = ACL.new(%w[deny all
allow 192.168.0.*
allow localhost
allow 127.0.0.1
] )
DRb.install_acl(acl)
aServerObject = TestServer.new
DRb.start_service('druby://cindy:88585', aServerObject)
DRb.thread.join # Don't exit just yet!
Client code snippet:
--------------------------------
require 'drb'
DRb.start_service()
obj = DRbObject.new(nil, 'druby://cindy:9999')
# Now use obj
p obj.doit
a remote pc to connect to my server to pull objects..
Here's where I stand with the problem:
Debian server is on 192.168.0.2 running ruby 1.8.2
Windows client is on 192.168.0.37 running ruby 1.8.4
I know the versions are different, but I'm worried that updating Debian
might break some packages.. I'm still looking into that part.. if I
could at least get it to connect I would be happy
run drbtest.rb on debian server, do the following tests,
run drbclient from debian server: connects
run drbclient from a windows machine: does not connect
run telnet to the drb port on debian server: does not connect
run telnet to the drb port, but have netcat running: connects
for some reason I can't get access to that port from another machine
with ruby running. I have tried to create an ACL list, but it doesn't
seem to help. If anyone can point me in the direction of documentation,
or a code snippet that might fix the problem, it would be greatly
appreciated.
Server code snippet:
--------------------------------
require 'drb'
require 'drb/acl'
class TestServer
def doit
"Hello, Distributed World"
end
end
acl = ACL.new(%w[deny all
allow 192.168.0.*
allow localhost
allow 127.0.0.1
] )
DRb.install_acl(acl)
aServerObject = TestServer.new
DRb.start_service('druby://cindy:88585', aServerObject)
DRb.thread.join # Don't exit just yet!
Client code snippet:
--------------------------------
require 'drb'
DRb.start_service()
obj = DRbObject.new(nil, 'druby://cindy:9999')
# Now use obj
p obj.doit