You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected to perform all operations in clients in multiple DRB connections.
Actual Behavior
In each client it throws an exception like below:
Hello, world!
Exception in thread "Ruby-0-Thread-1: /home/shahkia/.rvm/rubies/jruby-9.1.5.0/lib/ruby/stdlib/drb/drb.rb:1539" java.nio.channels.ClosedSelectorException
at sun.nio.ch.SelectorImpl.keys(SelectorImpl.java:68)
at org.jruby.util.io.SelectorPool.put(SelectorPool.java:88)
at org.jruby.util.io.SelectExecutor.selectEnd(SelectExecutor.java:59)
at org.jruby.util.io.SelectExecutor.go(SelectExecutor.java:44)
at org.jruby.RubyIO.select(RubyIO.java:3381)
at org.jruby.RubyIO$INVOKER$s$0$3$select.call(RubyIO$INVOKER$s$0$3$select.gen)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:720)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:197)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:338)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:163)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:78)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:144)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:130)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:189)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:131)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:340)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:78)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:144)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:130)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:189)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:131)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:340)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:78)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:144)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:130)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:189)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:131)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:340)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:132)
at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:148)
at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:66)
at org.jruby.runtime.Block.call(Block.java:126)
at org.jruby.RubyProc.call(RubyProc.java:324)
at org.jruby.RubyProc.call(RubyProc.java:249)
at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:104)
at java.lang.Thread.run(Thread.java:745)
I have 3 DRb servers with same code as bellow and different port:
require 'drb/drb'
class MyApp
def greet
'Hello, world!'
end
end
object = MyApp.new
DRb.start_service('druby://localhost:9999', object)
DRb.thread.join
In client I have:
require 'drb/drb'
DRb.start_service
remote_object = DRbObject.new_with_uri('druby://localhost:9999')
remote_object2 = DRbObject.new_with_uri('druby://localhost:9998')
remote_object3 = DRbObject.new_with_uri('druby://localhost:9997')
100.times do
puts remote_object.greet
10.times do
puts remote_object2.greet
100.times do
puts remote_object2.greet
end
end
end
After running client for more than once, it throws an error like mentioned above. Why?
The text was updated successfully, but these errors were encountered:
Environment
9.1.5.0
)Expected Behavior
DRB
connections.Actual Behavior
I have 3 DRb servers with same code as bellow and different port:
In client I have:
After running client for more than once, it throws an error like mentioned above. Why?
The text was updated successfully, but these errors were encountered: