Unicorn unable to write pid file

前端 未结 3 1200
醉酒成梦
醉酒成梦 2021-02-02 13:58

I am using deploying a Ruby on Rails app to a Linode VPS using Capistrano. I am using Unicorn as the application server and Nginx as the proxy. My problem is that I am not able

相关标签:
3条回答
  • 2021-02-02 14:30

    Actually, the error message has already told you why:

    directory for pid=/home/deploy/apps/shared/pids/unicorn.pid not writable

    So, does the directory /home/deploy/apps/shared/pids exist? If not, you should call mkdir to create it.

    0 讨论(0)
  • 2021-02-02 14:37

    Unicorn process is running in background(-d), type

    ps aux | grep unicorn
    

    and kill running unicorn process then start once again.

    0 讨论(0)
  • 2021-02-02 14:40

    in capistrano 3; if we change roles to :all, then while deployment capistrano saying; WARN [SKIPPING] No Matching Host for ..... and after deployment all symlinks not working anymore. And if tmp/pids folder in symlink array, then unicorn can't find the tmp/pids folder and saying unicorn.pid is not writable.

    So we must use; roles: %w{web app db} instead of roles :all.

    Sample server line at production.rb;

    server 'YOUR_SERVER_IP', user: 'YOUR_DEPLOY_USER', roles: %w{web app db}, ssh_options: { forward_agent: true }

    0 讨论(0)
提交回复
热议问题