【问题标题】:Unicorn fcntl: Errno::EPERM: Operation not permittedUnicorn fcntl: Errno::EPERM: Operation not allowed
【发布时间】:2019-03-27 19:27:24
【问题描述】:

我一直在 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/

有人可以解释为什么需要这样做以及它的实际作用吗?

【问题讨论】:

  • 我们有同样的错误,但只在环境生产中。在开发中一切正常。

标签: ruby-on-rails io pipe unicorn fcntl


【解决方案1】:

我们已将 unicorn 降级为 v5.4.1,一切恢复正常。我知道这不是解决方案,但它有助于暂时解决问题。

【讨论】:

    猜你喜欢
    • 2021-12-04
    • 2015-09-02
    • 2019-04-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多