我一直在Unicorn 5.5.5上运行Rails应用程序,并且在某些环境下它会引发读取以下内容的异常
bundler: failed to load command: unicorn (/usr/local/bundle/bin/unicorn)
Errno::EPERM: Operation not permitted
/usr/local/bundle/gems/unicorn-5.5.0/lib/unicorn.rb:123:in `fcntl'
/usr/local/bundle/gems/unicorn-5.5.0/lib/unicorn.rb:123:in `block in pipe'
/usr/local/bundle/gems/unicorn-5.5.0/lib/unicorn.rb:116:in `each'
/usr/local/bundle/gems/unicorn-5.5.0/lib/unicorn.rb:116:in `pipe'
/usr/local/bundle/gems/unicorn-5.5.0/lib/unicorn/http_server.rb:126:in `start'
/usr/local/bundle/gems/unicorn-5.5.0/bin/unicorn:128:in `<top (required)>'
/usr/local/bundle/bin/unicorn:23:in `load'
/usr/local/bundle/bin/unicorn:23:in `<top (required)>
我想了解fcntl
的作用以及为什么添加此补丁。我不太了解IO管道的内部结构以及此处https://github.com/defunkt/unicorn/blob/master/lib/unicorn.rb#L115和此处https://bogomips.org/unicorn-public/20180820203038.25464-1-e@80x24.org/T/
有人可以解释为什么需要它以及它实际上是做什么的吗?
答案 0 :(得分:0)
我们已将独角兽降级为 v5.4.1 ,并且一切都恢复了正常。我知道这不是解决方案,但暂时可以帮助解决问题。