我有一个使用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>'
任何人都知道如何解决这个问题?感谢。
答案 0 :(得分:1)
执行以下两个步骤后,它已修复:
deployer:staff
(sudo chown deployer:staff /tmp/unicorn.wheels-within-wheels.sock
)。然后我运行bundle update
来更新宝石,最后Unicorn成功运行并且应用程序再次运行。
答案 1 :(得分:0)
以下链接表示将MacOSX升级到El Capitan时出现了一些问题。如果您可以遵循相同的路径,也许您可以解决问题。
ERROR: While executing gem ... (Errno::EPERM) Operation not permitted