独角兽+Sinatra+Nginx |添加侦听器的致命错误
Unicorn+Sinatra+Nginx | FATAL error adding listener
我有一个使用 Nginx 和 Unicorn 托管的 Sinatra 应用程序。当我升级服务器上的操作系统 (Ubuntu 14.04.5 LTS) 时,它出现故障,我能够将它们全部备份,除了这个,唯一的基于 Rack 的应用程序。当我尝试启动 Unicorn (unicorn -c unicorn.rb -D
) 时,出现以下错误:
I, [2017-08-06T15:39:54.426004 #6505] INFO -- : unlinking existing socket=/tmp/unicorn.wheels-within-wheels.sock
F, [2017-08-06T15:39:54.427777 #6505] FATAL -- : error adding listener addr=/tmp/unicorn.wheels-within-wheels.sock
/home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/socket_helper.rb:113:in `unlink': Operation not permitted @ unlink_internal - /tmp/unicorn.wheels-within-wheels.sock (Errno::EPERM)
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/socket_helper.rb:113:in `$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/socket_helper.rb:107:in `$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:231:in `li$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:808:in `bl$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:808:in `ea$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:808:in `bi$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:130:in `st$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/bin/unicorn:126:in `<top (required)>'
from /home/deployer/.rbenv/versions/2.2.3/bin/unicorn:23:in `load'
from /home/deployer/.rbenv/versions/2.2.3/bin/unicorn:23:in `<main>'
有人知道如何解决这个问题吗?谢谢
下面的link说的是MacOSX升级到El Capitan时出现的那种问题。如果你能走同样的路,也许你就能解决问题。
ERROR: While executing gem ... (Errno::EPERM) Operation not permitted
在我执行了以下两个步骤后,它已修复:
- 如服务器故障 answer 中所述,我将应用程序所有者 'deployer' 的组从 'deployer' 更改为 'staff'。
- 我将套接字文件的所有者更改为
deployer:staff
(sudo chown deployer:staff /tmp/unicorn.wheels-within-wheels.sock
)。
然后我运行bundle update
更新gems,最后Unicorn运行成功,应用又上线了。
我有一个使用 Nginx 和 Unicorn 托管的 Sinatra 应用程序。当我升级服务器上的操作系统 (Ubuntu 14.04.5 LTS) 时,它出现故障,我能够将它们全部备份,除了这个,唯一的基于 Rack 的应用程序。当我尝试启动 Unicorn (unicorn -c unicorn.rb -D
) 时,出现以下错误:
I, [2017-08-06T15:39:54.426004 #6505] INFO -- : unlinking existing socket=/tmp/unicorn.wheels-within-wheels.sock
F, [2017-08-06T15:39:54.427777 #6505] FATAL -- : error adding listener addr=/tmp/unicorn.wheels-within-wheels.sock
/home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/socket_helper.rb:113:in `unlink': Operation not permitted @ unlink_internal - /tmp/unicorn.wheels-within-wheels.sock (Errno::EPERM)
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/socket_helper.rb:113:in `$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/socket_helper.rb:107:in `$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:231:in `li$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:808:in `bl$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:808:in `ea$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:808:in `bi$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:130:in `st$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/bin/unicorn:126:in `<top (required)>'
from /home/deployer/.rbenv/versions/2.2.3/bin/unicorn:23:in `load'
from /home/deployer/.rbenv/versions/2.2.3/bin/unicorn:23:in `<main>'
有人知道如何解决这个问题吗?谢谢
下面的link说的是MacOSX升级到El Capitan时出现的那种问题。如果你能走同样的路,也许你就能解决问题。
ERROR: While executing gem ... (Errno::EPERM) Operation not permitted
在我执行了以下两个步骤后,它已修复:
- 如服务器故障 answer 中所述,我将应用程序所有者 'deployer' 的组从 'deployer' 更改为 'staff'。
- 我将套接字文件的所有者更改为
deployer:staff
(sudo chown deployer:staff /tmp/unicorn.wheels-within-wheels.sock
)。
然后我运行bundle update
更新gems,最后Unicorn运行成功,应用又上线了。