I am deploying a Rails 4 app to a Fedora 19 x64 server using Nginx and Unicorn. The problem is that I get an error when visiting the address: \"We\'re sorry, but something w
After many hours and a grand total of 3 beers, I've managed to figure out the problem. After hours of digging, I finally came across this Server Fault answer
In layman terms, it appears that programs that create files in /tmp
(or /var/tmp
as I have discovered) are the only programs that are able to see the files in that directory. Unicorn was creating the UNIX socket file, however Nginx could not see it.
The solution I have employed is to have Unicorn create sockets in /var/sockets
.
I suddenly had a similar situation after changing nginx to use a systemd startup service based on their template.
It ends up that the problem was with PrivateTmp=true
, which makes it so that nginx was unable to access the socket file created by gunicorn. Once I changed this to PrivateTmp=false
the error resolved.