小编jam*_*ton的帖子

由于Errno :: EPERM,Unicorn无法在Vagrant盒子上启动

当我运行以下命令为我的Vagrant盒子上的Sinatra应用程序启动Unicorn时(ubuntu-12.04.2-server-i386)

sudo unicorn -c unicorn.rb -E development -D -l 0.0.0.0:8080
Run Code Online (Sandbox Code Playgroud)

我在Unicorn日志中收到以下错误.

I, [2013-05-05T19:15:15.538805 #2357]  INFO -- : listening on addr=0.0.0.0:8080 fd=5
F, [2013-05-05T19:15:15.541673 #2357] FATAL -- : error adding listener addr=/home/vagrant/tmp/myapp/sockets/unicorn.sock
/home/vagrant/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/unicorn-4.3.1/lib/unicorn/socket_helper.rb:140:in `initialize': Operation not permitted - "/home/vagrant/tmp/myapp/sockets/unicorn.sock" (Errno::EPERM)
Run Code Online (Sandbox Code Playgroud)

我以流浪者用户身份登录并根据http://recipes.sinatrarb.com/p/deployment/nginx_proxied_to_unicorn配置了unicorn.rb

@dir = '/home/vagrant/myapp/'

worker_processes 4
working_directory @dir

timeout 30

listen "#{@dir}tmp/sockets/unicorn.sock", :backlog => 64
pid "#{@dir}tmp/pids/unicorn.pid"

stderr_path "#{@dir}log/unicorn.stderr.log"
stdout_path "#{@dir}log/unicorn.stdout.log"
Run Code Online (Sandbox Code Playgroud)

我查看了代码,但无法初始化以下内容

Kgio::UNIXServer.new('0.0.0.0:8080')
Run Code Online (Sandbox Code Playgroud)

unicorn vagrant

7
推荐指数
1
解决办法
4140
查看次数

标签 统计

unicorn ×1

vagrant ×1