我无法弄清楚Unicorn的错误,它不想启动。任何帮助表示赞赏
ubuntu@ip-172-31-15-195:~/www/tf/current$ RAILS_ENV=production bundle exec unicorn_rails -c config/unicorn.rb -D
bundler: failed to load command: unicorn_rails (/home/ubuntu/www/tf/shared/bundle/ruby/2.3.0/bin/unicorn_rails)
Errno::EEXIST: File exists @ dir_s_mkdir - tmp/pids
/usr/local/lib/ruby/2.3.0/fileutils.rb:254:in `mkdir'
/usr/local/lib/ruby/2.3.0/fileutils.rb:254:in `fu_mkdir'
/usr/local/lib/ruby/2.3.0/fileutils.rb:228:in `block (2 levels) in mkdir_p'
/usr/local/lib/ruby/2.3.0/fileutils.rb:226:in `reverse_each'
/usr/local/lib/ruby/2.3.0/fileutils.rb:226:in `block in mkdir_p'
/usr/local/lib/ruby/2.3.0/fileutils.rb:211:in `each'
/usr/local/lib/ruby/2.3.0/fileutils.rb:211:in `mkdir_p'
/home/ubuntu/www/tf/shared/bundle/ruby/2.3.0/gems/unicorn-5.0.1/bin/unicorn_rails:202:in `block in <top (required)>'
/home/ubuntu/www/tf/shared/bundle/ruby/2.3.0/gems/unicorn-5.0.1/lib/unicorn/configurator.rb:80:in `reload'
/home/ubuntu/www/tf/shared/bundle/ruby/2.3.0/gems/unicorn-5.0.1/lib/unicorn/configurator.rb:65:in `initialize'
/home/ubuntu/www/tf/shared/bundle/ruby/2.3.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:76:in `new'
/home/ubuntu/www/tf/shared/bundle/ruby/2.3.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:76:in `initialize'
/home/ubuntu/www/tf/shared/bundle/ruby/2.3.0/gems/unicorn-5.0.1/bin/unicorn_rails:209:in `new'
/home/ubuntu/www/tf/shared/bundle/ruby/2.3.0/gems/unicorn-5.0.1/bin/unicorn_rails:209:in `<top (required)>'
/home/ubuntu/www/tf/shared/bundle/ruby/2.3.0/bin/unicorn_rails:22:in `load'
/home/ubuntu/www/tf/shared/bundle/ruby/2.3.0/bin/unicorn_rails:22:in `<top (required)>'
master failed to start, check stderr log for details
答案 0 :(得分:1)
您有符号链接~www/tf/current/tmp/pids
,但其目标目录~www/tf/shared/pids/
不存在,因此链接已断开。 unicorn
正在尝试在tmp/pids
中创建~www/tf/current/
目录,但已存在的符号链接会导致失败。
要解决此问题,您需要创建具有适当所有权和权限的~www/tf/shared/pids/
目录。