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

As you'll notice, I'm a bit of a noob on Rails. Here's the thing

I have a EC2 Bitnami RubyStack AMI running. I'm trying to deploy the sample project to be sure I'm doing the right thing, but I'm not getting anywhere at all. I just get a 503 error

I'm following bitnami's docs on thin + apache

Here are my files:

the httpd.conf I include in the main httpd.conf

Alias /sample "/home/bitnami/stack/projects/sample/public"
<Directory "/home/bitnami/stack/projects/sample/public">
  AllowOverride None
  Order allow,deny
  Allow from all
</Directory>

ProxyPass /sample balancer://appcluster
ProxyPassReverse /sample balancer://appcluster
<Proxy balancer://appcluster>
   BalancerMember http://127.0.0.1:3000/sample
   BalancerMember http://127.0.0.1:3001/sample
</Proxy>

the thin.yml file

chdir: /opt/bitnami/projects/sample
environment: production
address: 127.0.0.1
port: 3000
timeout: 30
log: log/thin.log
pid: tmp/pids/thin.pid
max_conns: 1024
max_persistent_conns: 512
require: []
wait: 30
servers: 2
prefix: /sample
daemonize: true

I'm able to start and stop apache, but thin does not stop correctly though. When I try to stop thin, I get this output

/opt/bitnami/projects/sample$ sudo thin -C config/thin.yml stop
Stopping server on 127.0.0.1:3000 ... 
Can't stop process, no PID found in tmp/pids/thin.3000.pid
Stopping server on 127.0.0.1:3001 ... 

I've tried to use nginx as well, without any luck unfortunately.

EDIT: This answers the comment below. Apache is started and thin is too, but the latter does not stop.

/opt/bitnami/projects/sample$ sudo /opt/bitnami/ctlscript.sh restart apache
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd stopped
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd started at port 80
/opt/bitnami/projects/sample$ sudo thin -C config/thin.yml startStarting server on 127.0.0.1:3000 ... 
Starting server on 127.0.0.1:3001 ... 
/opt/bitnami/projects/sample$ sudo thin -C config/thin.yml stop
Stopping server on 127.0.0.1:3000 ... 
Can't stop process, no PID found in tmp/pids/thin.3000.pid
Stopping server on 127.0.0.1:3001 ... 
Can't stop process, no PID found in tmp/pids/thin.3001.pid
share|improve this question
    
That means thin is not running. Try starting it first, before you stop it. –  Michael Hampton Nov 22 '12 at 5:33
    
Well, could it mean that thin it's not starting even thought the console output shows it supposedly did? –  Pacu Nov 22 '12 at 13:33

1 Answer 1

up vote 0 down vote accepted

Well, I'll answer my own question (partly).

I didn't know that it was necessary to add the thin gemfile to the Gemfile and If I'm not too burned it's not mention on the tutorials. I added it and the 503 went away. now i have a "Not Found: /" message but that's a different question

share|improve this answer

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.