Forum: JRuby drb server fails when yielding to client

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
19d0e6c6acf1337e1855dc1468ba1c89?d=identicon&s=25 Manish Sapariya (manishsapariya)
on 2009-05-19 10:32
(Received via mailing list)
Hi,
Resending this with new subject line.

I looked at the Jira and Googled it. I could not find any issues which
talks about this or similar issue. My little debugging using wireshark
shows that server is closing connection while yielding to client, no
exception or error on server side.

=============
/opt/jruby/lib/ruby/1.8/drb/drb.rb:570:in `load': connection closed
(DRb::DRbConnError)
         from /opt/jruby/lib/ruby/1.8/drb/drb.rb:632:in `recv_reply'
         from /opt/jruby/lib/ruby/1.8/drb/drb.rb:922:in `recv_reply'
         from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1200:in `send_message'
         from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1091:in
`method_missing'
         from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1175:in `open'
         from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1090:in
`method_missing'
         from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1108:in `with_friend'
         from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1089:in
`method_missing'
         from simpleclient.rb:5
================

Here is my simple server
=============
require 'drb/drb'

module DCP
    class Site
      include DRbUndumped
                 def test()
                         yield
                 end
    end
end

if __FILE__ == $0
    DRb.start_service("druby://localhost:7654", DCP::Site.new)
    puts DRb.uri
    DRb.thread.join
end
=============

======And client=======
require 'drb/drb'

DRb.start_service
there = DRbObject.new_with_uri('druby://localhost:7654')
there.test() {
         puts "This is what was expected"
}
=======================

Any ideas? Shall I create ticket?

Thanks and Regards,
Manish

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-05-19 17:04
(Received via mailing list)
I think Tom Enebo is looking into this; it looks like we're allowing
Proc to be marshalled when we should not, and perhaps trying to marshal
it when we should not. I think he was on to something...Tom, you want to
comment on progress?

Manish Sapariya wrote:
> (DRb::DRbConnError)
>
>    end
> require 'drb/drb'
> Thanks and Regards,
> Manish
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
13313ac2ec7ba7c43b1b952db034ff3b?d=identicon&s=25 Thomas E Enebo (Guest)
on 2009-05-19 20:10
(Received via mailing list)
Yep I am looking into this one today.  I just need to dump the proper
TypeError and then see if things are working.  I do think there may be
multiple problems too :(

Still I think drb is one of the better use cases to show JRuby's
compatibility, so I would like your script to work (and BTW using a
proc across drb client/server is pretty damn cool).

-Tom

On Tue, May 19, 2009 at 9:46 AM, Charles Oliver Nutter
<charles.nutter@sun.com> wrote:
>> I looked at the Jira and Googled it. I could not find any issues which
>>        from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1091:in `method_missing'
>>
>>   DRb.start_service("druby://localhost:7654", DCP::Site.new)
>> there.test() {
>> To unsubscribe from this list, please visit:
>
>
>



--
Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: enebo@acm.org , tom.enebo@gmail.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
13313ac2ec7ba7c43b1b952db034ff3b?d=identicon&s=25 Thomas E Enebo (Guest)
on 2009-05-19 22:42
(Received via mailing list)
So I can get your example to run fine with the marshaling fix I made
in commit 6bafaf5, BUT I cannot get 127.0.0.1 or localhost to work as
part of DRB service string.  I need to use my DHCP assigned address
and everything works.  I think it is something strange on my mac, but
I am looking into it a bit since I have no idea why it is broken.
Interestingly, I noticed ::1 (ipv6) does work???

-Tom

On Tue, May 19, 2009 at 1:08 PM, Thomas E Enebo <tom.enebo@gmail.com>
wrote:
> On Tue, May 19, 2009 at 9:46 AM, Charles Oliver Nutter
>>>
>>>        from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1200:in `send_message'
>>> require 'drb/drb'
>>> if __FILE__ == $0
>>> there = DRbObject.new_with_uri('druby://localhost:7654')
>>> ---------------------------------------------------------------------
>>   http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>
>
> --
> Blog: http://www.bloglines.com/blog/ThomasEEnebo
> Email: enebo@acm.org , tom.enebo@gmail.com
>



--
Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: enebo@acm.org , tom.enebo@gmail.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
13313ac2ec7ba7c43b1b952db034ff3b?d=identicon&s=25 Thomas E Enebo (Guest)
on 2009-05-19 23:02
(Received via mailing list)
Actually I forgot to add the changed files so it is this commit:
http://github.com/jruby/jruby/commit/59a4474a6105b...

On Tue, May 19, 2009 at 3:42 PM, Thomas E Enebo <tom.enebo@gmail.com>
wrote:
>> Yep I am looking into this one today.  I just need to dump the proper
>> <charles.nutter@sun.com> wrote:
>>>> I looked at the Jira and Googled it. I could not find any issues which
>>>>        from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1091:in `method_missing'
>>>>
>>>>   DRb.start_service("druby://localhost:7654", DCP::Site.new)
>>>> there.test() {
>>>> To unsubscribe from this list, please visit:
>>>
>
>
> --
> Blog: http://www.bloglines.com/blog/ThomasEEnebo
> Email: enebo@acm.org , tom.enebo@gmail.com
>



--
Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: enebo@acm.org , tom.enebo@gmail.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
19d0e6c6acf1337e1855dc1468ba1c89?d=identicon&s=25 Manish Sapariya (manishsapariya)
on 2009-05-21 06:17
(Received via mailing list)
Thanks for fix, Thomas.
Regards,
Manish

Thomas E Enebo wrote:
>>
>>>
>>>>> Hi,
>>>>>        from /opt/jruby/lib/ruby/1.8/drb/drb.rb:632:in `recv_reply'
>>>>> Here is my simple server
>>>>> end
>>>>>
>>>>> Manish
>>>>
>>
>>
>> --
>> Blog: http://www.bloglines.com/blog/ThomasEEnebo
>> Email: enebo@acm.org , tom.enebo@gmail.com
>>
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.