bbbonthemoon
bbbonthemoon

Reputation: 1778

Unicorn start up issue

I cant figure out whats wrong with Unicorn, it doesnt want to start up. Any help is appreciated

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

Upvotes: 1

Views: 894

Answers (1)

AlexD
AlexD

Reputation: 910

You have symbolic link ~www/tf/current/tmp/pids present but its target directory ~www/tf/shared/pids/ doesn't exist so the link is broken. unicorn is attempting to create tmp/pids directory in the ~www/tf/current/ but the symbolic link which already exists causes failure.

To fix this you need to create ~www/tf/shared/pids/ directory with appropriate ownership and permissions.

Upvotes: 1

Related Questions