Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Update I have been searching around to see what services would possibly need to be restarted in my project after reboot. One of them was thinking sphinx, which I finally got to the point where it logs:

[Fri Nov 16 19:34:29.820 2012] [29623] accepting connections

But I still cant run searchd or searchd --stop because there was no generated sphinx.conf file in the etc/sphinxsearch for more info refer to this open thread on thinking_sphinx after reboot

I then turned to looking into restarting unicorn or thin based on some insight I got. The issue is when I check my gems I see one for thin AND unicorn. But when I try to start either one of them they have no file residing in etc/init.d/ where the nginx and sphinxsearch files reside...

Would rebooting totally erase the files for an app server like thin or unicorn? We are hosted on Rackspace running

ruby 1.9.2p290
rails (3.2.8, 3.2.7, 3.2.0)
nginx/1.1.19

  • notice that there are gems for unicorn and thin but there is no unicorn.rb or thin.rb in my config folder for my app... I am still super lost if any one can give me some insight on some steps to take to figure this out I would really appreciate it. Anything would help, thanks for reading.

thin 1.4.1
unicorn 4.3.1

When I run unicorn I get the same issue as referenced here :

> /usr/local/bin/unicorn start

/usr/local/lib/ruby/gems/1.9.1/gems/unicorn-4.3.1/lib/unicorn/configurator.rb:610:in `parse_rackup_file': rackup file (start) not readable (ArgumentError)
from /usr/local/lib/ruby/gems/1.9.1/gems/unicorn-4.3.1/lib/unicorn/configurator.rb:76:in `reload'
from /usr/local/lib/ruby/gems/1.9.1/gems/unicorn-4.3.1/lib/unicorn/configurator.rb:67:in `initialize'
from /usr/local/lib/ruby/gems/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:104:in `new'
from /usr/local/lib/ruby/gems/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:104:in `initialize'
from /usr/local/lib/ruby/gems/1.9.1/gems/unicorn-4.3.1/bin/unicorn:121:in `new'
from /usr/local/lib/ruby/gems/1.9.1/gems/unicorn-4.3.1/bin/unicorn:121:in `<top (required)>'
from /usr/local/bin/unicorn:19:in `load'
from /usr/local/bin/unicorn:19:in `<main>'

When I run thin it just opens a command line prompt...

 /usr/local/bin/thin start

 >> Using rack adapter

Other gems:

* LOCAL GEMS *

actionmailer (3.2.8, 3.2.7, 3.2.0)
actionpack (3.2.8, 3.2.7, 3.2.0)
activemodel (3.2.8, 3.2.7, 3.2.0)
activerecord (3.2.8, 3.2.7, 3.2.0)
activeresource (3.2.8, 3.2.7, 3.2.0)
activesupport (3.2.8, 3.2.7, 3.2.0)
arel (3.0.2)
builder (3.0.0)
bundler (1.1.5)
carmen (1.0.0.beta2)
carmen-rails (1.0.0.beta3)
cocaine (0.2.1)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.3.3)
daemons (1.1.9)
erubis (2.7.0)
eventmachine (0.12.10)
execjs (1.4.0)
faraday (0.8.4)
faraday_middleware (0.8.8)
foursquare2 (1.8.2)
geokit (1.6.5)
hashie (1.2.0)
hike (1.2.1)
httparty (0.8.3)
httpauth (0.1)
i18n (0.6.0)
journey (1.0.4)
jquery-rails (2.0.2)
json (1.7.4, 1.7.3)
jwt (0.1.5)
kgio (2.7.4)
lastfm (1.8.0)
libv8 (3.3.10.4 x86_64-linux)
mail (2.4.4)
mime-types (1.19, 1.18)
minitest (1.6.0)
multi_json (1.3.6)
multi_xml (0.5.1)
multipart-post (1.1.5)
mysql2 (0.3.11)
oauth2 (0.8.0)
paperclip (3.1.1)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.8, 3.2.7, 3.2.0)
railties (3.2.8, 3.2.7, 3.2.0)
raindrops (0.10.0, 0.9.0)
rake (0.9.2.2, 0.8.7)
rdoc (3.12, 2.5.8)
riddle (1.5.3)
sass (3.2.0, 3.1.19)
sass-rails (3.2.5)
sprockets (2.1.3)
sqlite3 (1.3.6)
sqlite3-ruby (1.3.3)
therubyracer (0.10.2, 0.10.1)
thin (1.4.1)
thinking-sphinx (2.0.10)
thor (0.16.0, 0.15.4, 0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
uglifier (1.2.7, 1.2.4)
unicorn (4.3.1)
xml-simple (1.1.1)

I am working on a project that was built by another group. I made some modifications to a constants file in the config folder (changing some values for arrays that populated some drop down fields), but the app had to be rebooted before those changes would be recognized. The hosting is through Rackspace, we rebooted through the option on their site. I contacted them and checked the status of our server, the port is open and operational. The problem is the app is not running when you go to the address for the site. Then when I put in the ip address of the server it just says "Welcome to Nginx". But in a log files I see:

[Thu Nov 15 02:34:37.945 2012] [15916] caught SIGTERM, shutting down
[Thu Nov 15 02:34:37.996 2012] [15916] shutdown complete

I am not very versed in server side set up. I have also never worked on a Rails project that had to have specific services started before the application will start. Any insight as to how to figure out what services need to be restarted and how to go about restarting them would be greatly appreciated. I feel kind of dead in the water at this point...

Thanks,

Alan

share|improve this question
2  
That log shows that you stopped the server last night. How is this relevant? You also haven't provided any of the necessary information to determine what might be going on, such as web server, Rails server, how you deployed the app, etc. –  Michael Hampton Nov 15 '12 at 20:57
    
Yes my boss restarted the server last night, and I came in this morning and the site was down. So now I get to figure out all this. I stated it is hosted through Rackspace, I believe that it is running on Nginx. But I also read that SIGTERM has to do with shutting down Apache, so I am a little confused. I am not an IT person, server side set up is not part of my expertise. The app is on an Ubuntu server that I SSH into. That is about all the information I have at this point... –  Alan DeLonga Nov 15 '12 at 21:04
    
The first thing you need to do, then, is to go get that information. –  Michael Hampton Nov 15 '12 at 21:07
    
I'm surprised that they aren't using Phusion passenger, a module that starts Rails with the server and will display errors when it can't start. Working with rails my guess would be you just need to go to the rails application directory. After that you need to start rails by typing rails s -e production or ruby script/server -e production depending on your version of rails. See if it has anything come up in the consoel. You can get it to run in the background after if everything goes right by something like nohup rails s -e production &>/dev/null &2>/dev/null –  Travis Pessetto Nov 15 '12 at 21:21

2 Answers 2

Take a look at tools like monit or upstart. They can be used to re-spawn app server (such as unicorn) if it dies unexpectedly and ensure that your Rails application is running.

share|improve this answer
    
@lain thanks for fix –  NARKOZ Nov 23 '12 at 21:04

Ok so after hours of searching and trying countless things I found online I ran this from the command line:

unicorn_rails -p 3000

And like magic the site is back up and running, now my issue is when I close the console (that I have that command running in) the site goes down again.

I am going to follow this to hopefully fix this issue

share|improve this answer
1  
add an & at the end of that command –  Journeyman Geek Nov 17 '12 at 2:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.