Puma fails to start in production on jRuby 1.7.11

Hi Guys,

I am trying to deploy a Rails app to my linux (Centos 6) VPS. I am
running jRuby 1.7.11 on it.
The problem is that when I try to start Puma I get this error:

The signal USR1 is in use by the JVM and will not work correctly on this
platform
[deprecated] I18n.enforce_available_locales will default to true in the
future. If you really want to skip validation of your locale you can set
I18n.enforce_available_locales = false to avoid this message.

  • Listening on
    unix:///home/user/apps/myapp/current/tmp/sockets/myapp.socket
    NativeLibrary.java:87:in loadNativeLibraries': java.lang.UnsatisfiedLinkError: /lib/libc.so.6: wrong ELF class: ELFCLASS32 from NativeLibrary.java:70:ingetNativeLibraries’
    from NativeLibrary.java:49:in getSymbolAddress' from NativeLibrary.java:59:infindSymbolAddress’
    from AsmLibraryLoader.java:117:in generateInterfaceImpl' from AsmLibraryLoader.java:59:inloadLibrary’
    from NativeLibraryLoader.java:43:in loadLibrary' from LibraryLoader.java:228:inload’
    from Library.java:123:in loadLibrary' from Library.java:80:inloadLibrary’
    from Native.java:40:in <clinit>' from Native.java:60:inlibsocket’
    from Native.java:68:in socket' from UnixServerSocketChannel.java:38:in
    from UnixServerSocket.java:29:in <init>' from UnixServerSocketChannel.java:48:inopen’
    from RubyUNIXSocket.java:243:in init_unixsock' from RubyUNIXServer.java:69:ininitialize’
    from RubyUNIXServer$INVOKER$i$1$0$initialize.gen:-1:in call' from JavaMethod.java:971:incall’
    from JavaMethod.java:677:in call' from CachingCallSite.java:286:incacheAndCall’
    from CachingCallSite.java:81:in callBlock' from CachingCallSite.java:85:incall’
    from RubyClass.java:825:in newInstance' from RubyIO.java:852:innewInstance’
    from RubyIO$INVOKER$s$0$0$newInstance.gen:-1:in call' from DynamicMethod.java:210:incall’
    from DynamicMethod.java:206:in call' from CachingCallSite.java:326:incacheAndCall’
    from CachingCallSite.java:170:in call' from CallOneArgNode.java:57:ininterpret’
    from LocalAsgnNode.java:123:in interpret' from NewlineNode.java:105:ininterpret’
    from BlockNode.java:71:in interpret' from EnsureNode.java:96:ininterpret’
    from BeginNode.java:83:in interpret' from NewlineNode.java:105:ininterpret’
    from BlockNode.java:71:in interpret' from ASTInterpreter.java:74:inINTERPRET_METHOD’
    from InterpretedMethod.java:225:in call' from DefaultMethod.java:214:incall’
    from CachingCallSite.java:346:in cacheAndCall' from CachingCallSite.java:204:incall’
    from FCallTwoArgNode.java:38:in interpret' from DAsgnNode.java:110:ininterpret’
    from NewlineNode.java:105:in interpret' from BlockNode.java:71:ininterpret’
    from IfNode.java:118:in interpret' from NewlineNode.java:105:ininterpret’
    from BlockNode.java:71:in interpret' from WhenOneArgNode.java:36:inwhenSlowTest’
    from WhenOneArgNode.java:46:in when' from CaseNode.java:133:ininterpret’
    from NewlineNode.java:105:in interpret' from BlockNode.java:71:ininterpret’
    from ASTInterpreter.java:112:in INTERPRET_BLOCK' from Interpreted19Block.java:206:inevalBlockBody’
    from Interpreted19Block.java:157:in yield' from Block.java:142:inyield’
    from RubyArray.java:1606:in eachCommon' from RubyArray.java:1613:ineach’
    from RubyArray$INVOKER$i$0$0$each.gen:-1:in call' from CachingCallSite.java:316:incacheAndCall’
    from CachingCallSite.java:145:in callBlock' from CachingCallSite.java:154:incallIter’
    from CallNoArgBlockNode.java:64:in interpret' from NewlineNode.java:105:ininterpret’
    from BlockNode.java:71:in interpret' from ASTInterpreter.java:74:inINTERPRET_METHOD’
    from InterpretedMethod.java:225:in call' from DefaultMethod.java:214:incall’
    from CachingCallSite.java:346:in cacheAndCall' from CachingCallSite.java:204:incall’
    from CallTwoArgNode.java:59:in interpret' from NewlineNode.java:105:ininterpret’
    from BlockNode.java:71:in interpret' from ASTInterpreter.java:74:inINTERPRET_METHOD’
    from InterpretedMethod.java:139:in call' from DefaultMethod.java:182:incall’
    from CachingCallSite.java:306:in cacheAndCall' from CachingCallSite.java:136:incall’
    from VCallNode.java:88:in interpret' from NewlineNode.java:105:ininterpret’
    from IfNode.java:116:in interpret' from NewlineNode.java:105:ininterpret’
    from BlockNode.java:71:in interpret' from IfNode.java:116:ininterpret’
    from NewlineNode.java:105:in interpret' from BlockNode.java:71:ininterpret’
    from ASTInterpreter.java:74:in INTERPRET_METHOD' from InterpretedMethod.java:139:incall’
    from DefaultMethod.java:182:in call' from CachingCallSite.java:306:incacheAndCall’
    from CachingCallSite.java:136:in call' from CallNoArgNode.java:60:ininterpret’
    from NewlineNode.java:105:in interpret' from BlockNode.java:71:ininterpret’
    from ASTInterpreter.java:74:in INTERPRET_METHOD' from InterpretedMethod.java:139:incall’
    from DefaultMethod.java:182:in call' from CachingCallSite.java:306:incacheAndCall’
    from CachingCallSite.java:136:in call' from CallNoArgNode.java:60:ininterpret’
    from NewlineNode.java:105:in interpret' from BlockNode.java:71:ininterpret’
    from RootNode.java:129:in interpret' from ASTInterpreter.java:121:inINTERPRET_ROOT’
    from Ruby.java:838:in runInterpreter' from Ruby.java:2766:inloadFile’
    from ExternalScript.java:66:in load' from LoadService.java:359:inload’
    from RubyKernel.java:1109:in loadCommon' from RubyKernel.java:1101:inload19’
    from RubyKernel$INVOKER$s$0$1$load19.gen:-1:in call' from DynamicMethod.java:210:incall’
    from DynamicMethod.java:206:in call' from CachingCallSite.java:326:incacheAndCall’
    from CachingCallSite.java:170:in call' from bin/puma:16:infile
    from bin/puma:-1:in load' from Ruby.java:811:inrunScript’
    from Ruby.java:804:in runScript' from Ruby.java:673:inrunNormally’
    from Ruby.java:522:in runFromMain' from Main.java:395:indoRunFromMain’
    from Main.java:290:in internalRun' from Main.java:217:inrun’
    from Main.java:197:in `main’
    ! Error starting new process as daemon, exitting

Any idea why this happens? I’ve also tried to use bundle instate
—binstubs and start puma using bin/puma instead of bundle exec, but the
same problem occurs.

Best Wishes,

Matt

Looks like a 32/64-bit mismatch. Could be that our native layer is
loading the wrong libc or you have something odd on that environment
that makes the 32-bit libc get loaded on a 64-bit JVM.

Can you provide a jruby --version and uname -a output please?

  • Charlie

Hi Charlie,

Thanks for the answer. Since then I reinstalled Centos. Now the 32 bit
version, and puma starts with this setup.

I still get the
“The signal USR1 is in use by the JVM and will not work correctly on
this platform “ notifications though. “

I will install the 64 bit version again and tell You the output for
jruby --version and uname -a

Best Wishes,
Matt
Be 10 Mar 2014 -on 14:29:26, Charles Oliver N. ([email protected])
Írt:

Looks like a 32/64-bit mismatch. Could be that our native layer is
loading the wrong libc or you have something odd on that environment
that makes the 32-bit libc get loaded on a 64-bit JVM.

Can you provide a jruby --version and uname -a output please?

  • Charlie

On Mon, Mar 10, 2014 at 1:13 AM, Mate K. [email protected] wrote:

I18n.enforce_available_locales = false to avoid this message.
from Library.java:123:in loadLibrary' from JavaMethod.java:971:in call’
from CachingCallSite.java:170:in call' from DefaultMethod.java:214:in call’
from WhenOneArgNode.java:46:in when' from CachingCallSite.java:316:in cacheAndCall’
from CallTwoArgNode.java:59:in interpret' from NewlineNode.java:105:in interpret’
from NewlineNode.java:105:in interpret' from ASTInterpreter.java:121:in INTERPRET_ROOT’
from CachingCallSite.java:170:in `call’
! Error starting new process as daemon, exitting

Any idea why this happens? I’ve also tried to use bundle instate —binstubs
and start puma using bin/puma instead of bundle exec, but the same problem
occurs.

Best Wishes,

Matt


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email