I tried to deploy my app with Capistrano but it gave me an error while processing. It is work, but not restarted.
Please help, what could be the reason for the error when restarting the passenger
cap production deploy "RAILS_ENV=production"
passenger:restart
01 passenger-config restart-app /home/myapp --ignore-app-not-running
01 *** An error occured while querying the Phusion Passenger(R) server:
01 Not found
(Backtrace restricted to imported tasks)
cap aborted!
deploy.rb
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
execute :touch, release_path.join('tmp/restart.txt')
end
end
/etc/nginx/nginx.conf
passenger_root /home/btsreport/.rvm/gems/ruby-2.3.0/gems/passenger-6.0.1;
passenger_ruby /home/btsreport/.rvm/gems/ruby-2.3.0/wrappers/ruby;
/etc/nginx/sites-available/myapp
server {
listen 80;
server_name myapp.com;
# Tell Nginx and Passenger where your app's 'public' directory is
root /home/myapp/current/public;
index index.html index.htm;
# Turn on Passenger
passenger_enabled on;
rails_env production;
}
passenger-config restart-app:
*** An error occured while querying the Phusion Passenger(R) server:
Not found
passenger-config --root
/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
passenger-status
Version : 6.0.15
Date : 2023-09-06 10:27:05 +0300
Instance: LaQ7yZDe (nginx/1.20.2 Phusion_Passenger/6.0.1)
----------- General information -----------
Max pool size : 6
App groups : 1
Processes : 1
Requests in top-level queue : 0
----------- Application groups -----------
/home/myapp/current (production):
App root: /home/myapp/current
Requests in queue: 0
* PID: 30221 Sessions: 0 Processed: 1544 Uptime: 6d 13h 44m 26s
CPU: 0% Memory : 153M Last used: 1h 4
sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful