{"action":"opened","issue":{"url":"https://api.github.com/repos/seuros/capistrano-puma/issues/120","labels_url":"https://api.github.com/repos/seuros/capistrano-puma/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/seuros/capistrano-puma/issues/120/comments","events_url":"https://api.github.com/repos/seuros/capistrano-puma/issues/120/events","html_url":"https://github.com/seuros/capistrano-puma/issues/120","id":100470420,"number":120,"title":"No such file or directory - connect(2) for \"/tmp/puma-status-1439356636968-18241\"","user":{"login":"lalitlogical","id":3786451,"avatar_url":"https://avatars.githubusercontent.com/u/3786451?v=3","gravatar_id":"","url":"https://api.github.com/users/lalitlogical","html_url":"https://github.com/lalitlogical","followers_url":"https://api.github.com/users/lalitlogical/followers","following_url":"https://api.github.com/users/lalitlogical/following{/other_user}","gists_url":"https://api.github.com/users/lalitlogical/gists{/gist_id}","starred_url":"https://api.github.com/users/lalitlogical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lalitlogical/subscriptions","organizations_url":"https://api.github.com/users/lalitlogical/orgs","repos_url":"https://api.github.com/users/lalitlogical/repos","events_url":"https://api.github.com/users/lalitlogical/events{/privacy}","received_events_url":"https://api.github.com/users/lalitlogical/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-12T05:29:39Z","updated_at":"2015-08-12T05:29:39Z","closed_at":null,"body":"I have successfully deployed my app on EC2 instance. I have Nginx on production server.\r\n\r\nI have properly followed the instructions as I got from various sources or blogs on this topic.\r\n\r\nI have Gemfile for Capistrano and other gems as below\r\n\r\n...\r\ngem 'puma'\r\n....\r\n\r\ngroup :development do\r\n  gem 'capistrano', '~> 3.4.0'\r\n  gem 'capistrano-rvm',     require: false\r\n  gem 'capistrano-rails',   require: false\r\n  gem 'capistrano-bundler', require: false\r\n  gem 'capistrano3-puma',   require: false\r\n  gem 'capistrano-ext',     require: false\r\n  gem 'capistrano-faster-assets', '~> 1.0.2'\r\nend\r\n\r\nI have put below code for puma in deploy.rb\r\n\r\n# Puma Server Configuration\r\nset :puma_threads,    [4, 16]\r\nset :puma_workers,    1\r\n\r\n# Don't change these unless you know what you're doing\r\nset :pty,             true\r\nset :use_sudo,        false\r\nset :puma_bind,       \"unix://#{shared_path}/tmp/sockets/puma.sock\"\r\nset :puma_conf,       \"#{shared_path}/puma.rb\"\r\nset :puma_state,      \"#{shared_path}/tmp/pids/puma.state\"\r\nset :puma_pid,        \"#{shared_path}/tmp/pids/puma.pid\"\r\nset :puma_access_log, \"#{release_path}/log/puma.error.log\"\r\nset :puma_error_log,  \"#{release_path}/log/puma.access.log\"\r\nset :puma_preload_app, true\r\nset :puma_worker_timeout, nil\r\nset :puma_init_active_record, true  # Change to false when not using ActiveRecord\r\n\r\nnamespace :puma do\r\n  desc 'Create Directories for Puma Pids and Socket'\r\n  task :make_dirs do\r\n    on roles(:app) do\r\n      execute \"mkdir #{shared_path}/tmp/sockets -p\"\r\n      execute \"mkdir #{shared_path}/tmp/pids -p\"\r\n    end\r\n  end\r\n\r\n  before :start, :make_dirs\r\nend\r\n\r\nnamespace :deploy do\r\n  desc \"Make sure local git is in sync with remote.\"\r\n  task :check_revision do\r\n    on roles(:app) do\r\n      unless `git rev-parse HEAD` == `git rev-parse origin/capistrano`\r\n        puts \"WARNING: HEAD is not the same as origin/capistrano\"\r\n        puts \"Run `git push` to sync changes.\"\r\n        exit\r\n      end\r\n    end\r\n  end\r\n\r\n  desc 'Initial Deploy'\r\n  task :initial do\r\n    on roles(:app) do\r\n      before 'deploy:restart', 'puma:start'\r\n      invoke 'deploy'\r\n    end\r\n  end\r\n\r\n  desc 'Restart application'\r\n  task :restart do\r\n    on roles(:app), in: :sequence, wait: 5 do\r\n      invoke 'puma:restart'\r\n    end\r\n  end\r\n\r\n  before :starting,     :check_revision\r\n  after  :finishing,    :compile_assets\r\n  after  :finishing,    :cleanup\r\n  after  :finishing,    :restart\r\nend\r\n\r\n\r\nI have created template for nginx and puma with  'rails g capistrano:nginx_puma:config' command.\r\n\r\nI have Capfile for puma as below\r\n\r\n......\r\nrequire 'capistrano/rails'\r\nrequire 'capistrano/bundler'\r\nrequire 'capistrano/rails/assets'\r\nrequire 'capistrano/rails/migrations'\r\nrequire 'capistrano/faster_assets'\r\n\r\nrequire 'capistrano/rvm'\r\nrequire 'capistrano/puma'\r\nrequire 'capistrano/puma/workers'\r\nrequire 'capistrano/puma/nginx'\r\n......\r\n\r\n\r\nI have run commands in sequence as written below\r\ncap production deploy:check\r\ncap production puma:config\r\ncap production puma:nginx_config\r\ncap production deploy:initial\r\n\r\nAfter this when I want to run 'cap production deploy' command, I am getting this error.\r\nNo such file or directory - connect(2) for \"/tmp/puma-status-1439355234544-15824\"\r\n\r\nPlease help!\r\n\r\nThanks\r\n"}}