How do I figure out what is wrong?

Posted August 23, 2013 11.9k views
I followed the tutorial on concerning deployment to a VPS and got after a couple adjustments ran cap deploy:setup and cap deploy:cold without getting back any errors. I ssh'd into my droplet and restarted both Unicorn and Nginx but now i get a "can't establish connection error." In the past I would use cpanel to take a look at the logs to see what error was being there a way to check why my site is down?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
13 answers
Nginx is probably down. Is it listening on port 80?

sudo netstat -plutn | grep :80

Check the error logs in /var/log -- do you see anything?
Thnaks for the reply
I typed in sudo netstat -plutn | grep :80
and got
tcp 0 0* LISTEN
Nginx isn't listening on port 80 -- try starting it manually:

sudo service nginx start

Does that work? If not, what's the output of this command?

tail /var/log/nginx/error.log
@estimaterer:~# sudo service nginx start
Starting nginx: nginx.
@estimaterer:~# tail /var/log/nginx/error.log

when I typed that in nothing popped up. when i tried starting unicorn....
@estimaterer:~# service unicorn start
* Starting Unicorn web server unicorn master failed to start, check stderr log for details

Kamal...thank you so much for the help on this. My knowledge of VPS and deployment is obviously very much lacking and I really appreciate the help.
@cj.miyake: What's the output of sudo netstat -plutn | grep :80 after you started nginx?

Unicorn is failing to start -- are you running the start command as root?

I'm really glad to help! :]
root@estimaterer:~# service nginx start
Starting nginx: nginx.
root@estimaterer:~# sudo netstat -plutn | grep :80
tcp 0 0* LISTEN 7299/unicorn.conf

and yes I am running all commands as root.
Hmm weird. Is there anything in nginx's error logs?

tail /var/log/nginx/error.log

Also check unicorn's error logs, it should be in the "stderr_path" directive in unicorn.rb.
there is nothing in the error log. man this is frustrating!
Well it looks like my rails app is installed to root@estimaterer:/home/root/apps/contests/current per capistrano and git instructions....
While there is still the rails app installed to root@estimaterer:/home/rails.
I'm guessing the site is trying to run the app in the home/rails setup. Do i have to delete the original rails installation?
Previous 1 2 Next