jruby / docker-jruby

MIT License
18 stars 27 forks source link

Socket.getservbyname on 9.2.5.1-jre-alpine raises Java::JavaLang::RuntimeException instead of SocketError #39

Closed boskowski closed 4 years ago

boskowski commented 5 years ago

inside 9.2.5.1-jre-alpine:

irb(main):001:0> require 'socket'
=> true
irb(main):002:0> Socket.getservbyname "http"
=> 80
irb(main):003:0> Socket.getservbyname "foo"
Traceback (most recent call last):
       16: from org.jruby.RubyKernel.eval(RubyKernel.java:1046)
       15: from org.jruby.RubyKernel.evalCommon(RubyKernel.java:1084)
       14: from org.jruby.ir.interpreter.Interpreter.evalWithBinding(Interpreter.java:196)
       13: from org.jruby.ir.interpreter.Interpreter.evalCommon(Interpreter.java:172)
       12: from org.jruby.ir.interpreter.Interpreter.INTERPRET_EVAL(Interpreter.java:118)
       11: from org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
       10: from org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:317)
        9: from org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:172)
        8: from org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:346)
        7: from org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:199)
        6: from org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:797)
        5: from org.jruby.ext.socket.RubySocket$INVOKER$s$0$1$getservbyname.call(RubySocket$INVOKER$s$0$1$getservbyname.gen)
        4: from org.jruby.ext.socket.RubySocket.getservbyname(RubySocket.java:300)
        3: from org.jruby.ext.socket.SocketUtils.getservbyname(SocketUtils.java:113)
        2: from jnr.netdb.Service.getServiceByName(Service.java:54)
        1: from jnr.netdb.NativeServicesDB$LinuxServicesDB.getServiceByName(NativeServicesDB.java:220)
Java::JavaLang::RuntimeException (getservbyname_r failed)
cpuguy83 commented 4 years ago

alpine is no longer supported (and was always problematic). Thanks!