ruby on rails - Capistrano: cannot start unicorn -


i having difficulties (re)start unicorn deploying capistrano manually.

this deploy.rb:

# config valid current version of capistrano lock "3.8.1"  set :application, "project" set :repo_url, "git@bitbucket.org:username/project.git" set :branch, "master" set :tmp_dir, '/home/deployer/tmp'  set :deploy_to, "/home/deployer/apps/project" set :keep_releases, 5   set(:executable_config_files, %w(   unicorn_init.sh ))  # files need symlinked other parts of # filesystem. example nginx virtualhosts, log rotation # init scripts etc. set(:symlinks, [   {     source: "nginx.conf",     link: "/etc/nginx/sites-enabled/default"   },   {     source: "unicorn_init.sh",     link: "/etc/init.d/unicorn_#{fetch(:application)}"   },   {     source: "log_rotation",    link: "/etc/logrotate.d/#{fetch(:application)}"   },   {     source: "monit",     link: "/etc/monit/conf.d/#{fetch(:application)}.conf"   } ])   namespace :deploy       desc 'restart application'   task :restart     on roles(:app), in: :sequence, wait: 5       invoke 'unicorn:restart'      end   end   after :publishing, :restart    after :restart, :clear_cache     on roles(:web), in: :groups, limit: 3, wait: 10       # here can such as:       # within release_path       #   execute :rake, 'cache:clear'       # end     end   end      desc "make sure local git in sync remote."   task :check_revision     on roles(:web)       unless `git rev-parse head` == `git rev-parse origin/master`         puts "warning: head not same origin/master"         puts "run `git push` sync changes."         exit       end     end   end   before "deploy", "deploy:check_revision" end 

and during process of deploying, here's error capistrano gives me:

sshkit::runner::executeerror: exception while executing deployer@ip: exception while executing deployer@ip: bundle exit status: 1 bundle stdout: nothing written bundle stderr: master failed start, check stderr log details 

and here's unicorn log:

    i, [2017-07-26t09:27:41.274475 #21301]  info -- : refreshing gem list     e, [2017-07-26t09:27:44.101407 #21301] error -- : adding listener failed addr=/tmp/unicorn.project.sock (in use)     e, [2017-07-26t09:27:44.101620 #21301] error -- : retrying in 0.5 seconds (4 tries left)     e, [2017-07-26t09:27:44.602753 #21301] error -- : adding listener failed addr=/tmp/unicorn.project.sock (in use)     e, [2017-07-26t09:27:44.603927 #21301] error -- : retrying in 0.5 seconds (3 tries left)     e, [2017-07-26t09:27:45.106551 #21301] error -- : adding listener failed addr=/tmp/unicorn.project.sock (in use)     e, [2017-07-26t09:27:45.107051 #21301] error -- : retrying in 0.5 seconds (2 tries left)     e, [2017-07-26t09:27:45.608434 #21301] error -- : adding listener failed addr=/tmp/unicorn.project.sock (in use)     e, [2017-07-26t09:27:45.608617 #21301] error -- : retrying in 0.5 seconds (1 tries left)     e, [2017-07-26t09:27:46.109480 #21301] error -- : adding listener failed addr=/tmp/unicorn.project.sock (in use)     e, [2017-07-26t09:27:46.109664 #21301] error -- : retrying in 0.5 seconds (0 tries left)     e, [2017-07-26t09:27:46.611021 #21301] error -- : adding listener failed addr=/tmp/unicorn.project.sock (in use)     bundler: failed load command: unicorn (/home/deployer/apps/project/shared/bundle/ruby/2.4.0/bin/unicorn)     errno::eaddrinuse: address in use - connect(2) /tmp/unicorn.project.sock       /home/deployer/apps/project/shared/bundle/ruby/2.4.0/gems/unicorn-5.2.0/lib/unicorn/socket_helper.rb:122:in `initialize'  says **    errno::eaddrinuse: address in use - connect(2) /tmp/unicorn.project.sock** -- however, mean exactly? how fix it?  tried run unicorn manually server - `bundle exec unicorn -d -c config/unicorn/production.rb -e production`, got  > master failed start, check stderr log details  that's pointing out on error message log above. 

edit: instances of unicorn

user       pid %cpu %mem    vsz   rss tty      stat start   time command rails     2134  0.0  0.5  13620  5640 ?        ss   jul24   0:00 /bin/bash /home/rails/rails_project/.unicorn.sh rails     2347  0.0  1.6  91052 17136 ?        sl   jul24   0:04 unicorn master -c /etc/unicorn.conf -e production --debug rails     2349  0.0  7.3 270292 74716 ?        sl   jul24   0:10 unicorn worker[0] -c /etc/unicorn.conf -e production --debug rails     2352  0.0  7.5 270420 77188 ?        sl   jul24   0:09 unicorn worker[1] -c /etc/unicorn.conf -e production --debug rails     2354  0.0  7.4 270628 75236 ?        sl   jul24   0:09 unicorn worker[2] -c /etc/unicorn.conf -e production --debug rails     2358  0.0  7.6 270288 77312 ?        sl   jul24   0:10 unicorn worker[3] -c /etc/unicorn.conf -e production --debug deployer  9330  0.0  7.9 269032 80364 ?        sl   08:36   0:02 unicorn master -c /home/deployer/apps/project/current/config/unicorn/production.rb -e deployment -d deployer  9334  0.0  7.2 269560 73800 ?        sl   08:36   0:00 unicorn worker[0] -c /home/deployer/apps/project/current/config/unicorn/production.rb -e deployment -d deployer  9337  0.0  7.2 269560 73800 ?        sl   08:36   0:00 unicorn worker[1] -c /home/deployer/apps/project/current/config/unicorn/production.rb -e deployment -d deployer  9340  0.0  7.2 269560 73748 ?        sl   08:36   0:00 unicorn worker[2] -c /home/deployer/apps/project/current/config/unicorn/production.rb -e deployment -d deployer 24279  0.0  0.1  12948  1080 pts/0    s+   11:13   0:00 grep --color=auto %cpu\|unicorn 


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -