我正在尝试在我的VPS上部署一个简单的rails应用程序,但是当capistrano尝试启动puma时,我总是收到此错误消息:
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:in `getNativeLibraries'
from NativeLibrary.java:49:in `getSymbolAddress'
from NativeLibrary.java:59:in `findSymbolAddress'
from AsmLibraryLoader.java:117:in `generateInterfaceImpl'
from AsmLibraryLoader.java:59:in `loadLibrary'
from NativeLibraryLoader.java:43:in `loadLibrary'
from LibraryLoader.java:228:in `load'
from Library.java:123:in `loadLibrary'
from Library.java:80:in `loadLibrary'
from Native.java:40:in `<clinit>'
from Native.java:60:in `libsocket'
from Native.java:68:in `socket'
from UnixServerSocketChannel.java:38:in `<init>'
from UnixServerSocket.java:29:in `<init>'
from UnixServerSocketChannel.java:48:in `open'
from RubyUNIXSocket.java:243:in `init_unixsock'
from RubyUNIXServer.java:69:in `initialize'
from RubyUNIXServer$INVOKER$i$1$0$initialize.gen:-1:in `call'
from JavaMethod.java:971:in `call'
from JavaMethod.java:677:in `call'
from CachingCallSite.java:286:in `cacheAndCall'
from CachingCallSite.java:81:in `callBlock'
from CachingCallSite.java:85:in `call'
from RubyClass.java:825:in `newInstance'
from RubyIO.java:852:in `newInstance'
from RubyIO$INVOKER$s$0$0$newInstance.gen:-1:in `call'
from DynamicMethod.java:210:in `call'
from DynamicMethod.java:206:in `call'
from CachingCallSite.java:326:in `cacheAndCall'
from CachingCallSite.java:170:in `call'
from CallOneArgNode.java:57:in `interpret'
from LocalAsgnNode.java:123:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from EnsureNode.java:96:in `interpret'
from BeginNode.java:83:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:225:in `call'
from DefaultMethod.java:214:in `call'
from CachingCallSite.java:346:in `cacheAndCall'
from CachingCallSite.java:204:in `call'
from FCallTwoArgNode.java:38:in `interpret'
from DAsgnNode.java:110:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from IfNode.java:118:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from WhenOneArgNode.java:36:in `whenSlowTest'
from WhenOneArgNode.java:46:in `when'
from CaseNode.java:133:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:112:in `INTERPRET_BLOCK'
from Interpreted19Block.java:206:in `evalBlockBody'
from Interpreted19Block.java:157:in `yield'
from Block.java:142:in `yield'
from RubyArray.java:1606:in `eachCommon'
from RubyArray.java:1613:in `each'
from RubyArray$INVOKER$i$0$0$each.gen:-1:in `call'
from CachingCallSite.java:316:in `cacheAndCall'
from CachingCallSite.java:145:in `callBlock'
from CachingCallSite.java:154:in `callIter'
from CallNoArgBlockNode.java:64:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:225:in `call'
from DefaultMethod.java:214:in `call'
from CachingCallSite.java:346:in `cacheAndCall'
from CachingCallSite.java:204:in `call'
from CallTwoArgNode.java:59:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from DefaultMethod.java:182:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from VCallNode.java:88:in `interpret'
from NewlineNode.java:105:in `interpret'
from IfNode.java:116:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from IfNode.java:116:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from DefaultMethod.java:182:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from CallNoArgNode.java:60:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from DefaultMethod.java:182:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from CallNoArgNode.java:60:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from RootNode.java:129:in `interpret'
from ASTInterpreter.java:121:in `INTERPRET_ROOT'
from Ruby.java:838:in `runInterpreter'
from Ruby.java:2766:in `loadFile'
from ExternalScript.java:66:in `load'
from LoadService.java:359:in `load'
from RubyKernel.java:1109:in `loadCommon'
from RubyKernel.java:1101:in `load19'
from RubyKernel$INVOKER$s$0$1$load19.gen:-1:in `call'
from DynamicMethod.java:210:in `call'
from DynamicMethod.java:206:in `call'
from CachingCallSite.java:326:in `cacheAndCall'
from CachingCallSite.java:170:in `call'
from bin/puma:16:in `__file__'
from bin/puma:-1:in `load'
from Ruby.java:811:in `runScript'
from Ruby.java:804:in `runScript'
from Ruby.java:673:in `runNormally'
from Ruby.java:522:in `runFromMain'
from Main.java:395:in `doRunFromMain'
from Main.java:290:in `internalRun'
from Main.java:217:in `run'
from Main.java:197:in `main'
! Error starting new process as daemon, exitting
我的VPS运行Centos 6和jRuby 1.7.11。 我还尝试运行bundle install --binstubs然后
RAILS_ENV=production bin/puma -p 9292 -e production -C config/puma.rb
但仍然会发生同样的错误。
知道为什么会这样吗?
答案 0 :(得分:2)
“USR1”文本不是错误,在JRuby下运行时只是一个警告。
真正的错误是这个:
NativeLibrary.java:87:in `loadNativeLibraries':
java.lang.UnsatisfiedLinkError: /lib/libc.so.6: wrong ELF class: ELFCLASS32
这是因为您正在运行64位JRE,但尝试加载32位libc。