Thank you all for your help.
Until you sign up for vps and deploy the Rails app on capistrano3 [that 1 server configuration]
With the above in mind, we have completed the deployment of the Rails app to Conoha.
The last time I tried to access it, I received the following error:
We're sorry, but something wrong.
If you are the application owner check the logs for more information.
When I accessed the VPS and checked the nginx.error.log, I found the following error:
2019/10/xx xx:xx:xx [crit]17197#0:*18 connect() to unix:/tmp/sockets/unicorn.sock failed (2: No such file or directory) while connecting to upstream, client:x.x.x.x, server:x.x.x.x, requestmix:"Http://upstream:x.x/upstream:x:x.x, 1
/tmp/sockets/unicorn.sock
did not exist.
I understand that this file is necessary for Unicorn and Nginx to communicate.
If this file doesn't exist, I thought the Unicorn configuration was strange, so I reviewed it many times, but it doesn't seem strange.
In config/unicorn/production.rb
, listen
as follows:
$listen='/tmp/sockets/unicorn.sock'
...
listen $listen
Is this when unicorn.sock should be made?
Does anyone know why unicorn.sock is not made?
When unicorn.sock should be created
should launch unicorn to create unicorn.sock when bundle exec cap production deploy
.
Perhaps there is some error in the log/unicorn.log of the directory you deployed and unicorn is not starting.I think the first step is to check unicorn.log and whether unicorn is starting with ps command.
Also, if there is nothing in unicorn.log, something may have failed inside capistrano before unicorn startup.
© 2024 OneMinuteCode. All rights reserved.