Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getprotobyname_r failed warning on ubuntu xenial minimal #3955

Closed
etehtsea opened this issue Jun 7, 2016 · 2 comments
Closed

getprotobyname_r failed warning on ubuntu xenial minimal #3955

etehtsea opened this issue Jun 7, 2016 · 2 comments

Comments

@etehtsea
Copy link
Contributor

etehtsea commented Jun 7, 2016

Environment

jruby 9.1.2.0 (2.3.0) 2016-05-26 7357c8f OpenJDK 64-Bit Server VM 25.91-b14 on 1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14 +jit [linux-x86_64]
ubuntu 16.04 LTS

Steps to reproduce:

docker run --rm -it etehtsea/jruby-ubuntu:9.1.2.0 jruby -v -e "require 'socket'; p Socket.new(2,1,0)"
jruby 9.1.2.0 (2.3.0) 2016-05-26 7357c8f OpenJDK 64-Bit Server VM 25.91-b14 on 1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14 +jit [linux-x86_64]
Jun 07, 2016 6:02:52 AM jnr.netdb.NativeProtocolsDB load
WARNING: Failed to load native protocols db
java.lang.RuntimeException: getprotobyname_r failed
    at jnr.netdb.NativeProtocolsDB$LinuxNativeProtocolsDB.getProtocolByName(NativeProtocolsDB.java:180)
    at jnr.netdb.NativeProtocolsDB.load(NativeProtocolsDB.java:80)
    at jnr.netdb.NativeProtocolsDB.access$000(NativeProtocolsDB.java:40)
    at jnr.netdb.NativeProtocolsDB$SingletonHolder.<clinit>(NativeProtocolsDB.java:47)
    at jnr.netdb.NativeProtocolsDB.getInstance(NativeProtocolsDB.java:43)
    at jnr.netdb.Protocol$ProtocolDBSingletonHolder.load(Protocol.java:107)
    at jnr.netdb.Protocol$ProtocolDBSingletonHolder.<clinit>(Protocol.java:103)
    at jnr.netdb.Protocol.getProtocolDB(Protocol.java:96)
    at jnr.netdb.Protocol.getProtocolByNumber(Protocol.java:59)
    at org.jruby.ext.socket.RubySocket.<init>(RubySocket.java:667)
    at org.jruby.ext.socket.RubySocket$1.allocate(RubySocket.java:133)
    at org.jruby.RubyClass.allocate(RubyClass.java:227)
    at org.jruby.RubyClass.newInstance(RubyClass.java:903)
    at org.jruby.RubyIO.newInstance(RubyIO.java:867)
    at org.jruby.RubyIO$INVOKER$s$0$0$newInstance.call(RubyIO$INVOKER$s$0$0$newInstance.gen)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:217)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:213)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:353)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:227)
    at DashE.invokeOther5:new(-e)
    at DashE.RUBY$script(-e:1)
    at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
    at org.jruby.ir.Compiler$1.load(Compiler.java:111)
    at org.jruby.Ruby.runScript(Ruby.java:833)
    at org.jruby.Ruby.runScript(Ruby.java:825)
    at org.jruby.Ruby.runNormally(Ruby.java:760)
    at org.jruby.Ruby.runFromMain(Ruby.java:579)
    at org.jruby.Main.doRunFromMain(Main.java:425)
    at org.jruby.Main.internalRun(Main.java:313)
    at org.jruby.Main.run(Main.java:242)
    at org.jruby.Main.main(Main.java:204)

#<Socket:fd 23>

Expected behaviour (9.0.5.0):

docker run --rm -it etehtsea/jruby-ubuntu:9.0.5.0 jruby -v -e "require 'socket'; p Socket.new(2,1,0)"
jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d OpenJDK 64-Bit Server VM 25.91-b14 on 1.8.0_91-8u91-b14-1~bpo8+1-b14 +jit [linux-amd64]
#<Socket:fd 23>
@headius headius added this to the Invalid or Duplicate milestone Sep 6, 2016
@ghost
Copy link

ghost commented Oct 18, 2016

For the next person who stumbles upon this issue while searching madly for a way to resolve the warning:

It appears to be caused by the absence of /etc/protocols, which, in the case of Ubuntu Xenial, can be resolved with apt-get install netbase.

mark-cooper added a commit to archivesspace/archivesspace that referenced this issue Mar 4, 2021
- Update Ubuntu base image
- Use the MySQL 8 connector (works with 5.7)
- Add netbase resolves (jruby/jruby#3955)
- Remove New Relic init for local test env (maintained in external repo)
- Use MySQL 8
- Update Solr build files and use 8.8
@aryeh-looker
Copy link
Contributor

@Jarpy thank you!!

niquerio added a commit to mlibrary/catalog_solr_index that referenced this issue Aug 1, 2022
* per jruby/jruby#3955 adds netbase to get rid
of a warning
* updates mock-ht Dockerfile because it was using an old verion of node
and ruby
niquerio added a commit to mlibrary/catalog_solr_index that referenced this issue Aug 1, 2022
* per jruby/jruby#3955 adds netbase to get rid
of a warning
* updates mock-ht Dockerfile because it was using an old verion of node
and ruby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants