Incomplete response received from application

5,110 views
Skip to first unread message

Tomasz Nowak-Bańdura

unread,
Mar 8, 2015, 10:21:13 AM3/8/15
to phusion-...@googlegroups.com
My vhost configuration: /etc/apache2/sites-available/000-defailt.conf


I generate new RAILS Application and try to enter via browser, then i got this message:

Incomplete response received from application

Logs:

IP_ADDR - - [08/Mar/2015:12:45:27 +0100] "GET /articles HTTP/1.1" 502 306 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36 OPR/27.0.1689.76"
IP_ADDR - - [08/Mar/2015:12:45:31 +0100] "GET /articles HTTP/1.1" 502 306 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36 OPR/27.0.1689.76"
IP_ADDR - - [08/Mar/2015:12:52:27 +0100] "GET /articles HTTP/1.1" 502 306 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36 OPR/27.0.1689.76"
IP_ADDR - - [08/Mar/2015:13:09:16 +0100] "GET /articles HTTP/1.1" 502 306 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36 OPR/27.0.1689.76"

I have 502, something is not right.
I chacek Passenger via rvmsudo passenger-status

Version : 5.0.2
Date : 2015-03-08 13:22:23 +0100
Instance: ztmQSeJC (Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.6 Phusion_Passenger/5.0.2)
----------- General information -----------
Max pool size : 6
Processes : 1
Requests in top-level queue : 0
----------- Application groups -----------
/home/mysite/x#default:
App root: /home/mysite/x
Requests in queue: 0
* PID: 1378 Sessions: 0 Processed: 3 Uptime: 13m 1s
CPU: 0% Memory : 67M Last used: 12m 53s ago

Seems to be working.
I check in local environment, so I get to the root folder of my Rails App, and hit:  
$ passenger start

passenger start
=============== Phusion Passenger Standalone web server started ===============
PID file: /home/mysite/x/tmp/pids/passenger.3000.pid
Log file: /home/mysite/x/log/passenger.3000.log
Environment: development
Accessible via: http://0.0.0.0:3000/
You can stop Phusion Passenger Standalone by pressing Ctrl-C.
Problems? Checkhttps://www.phusionpassenger.com/documentation/Users%20guide%20Standalone.html#troubleshooting
===============================================================================
App 2432 stdout: 
App 2451 stdout:
Started HEAD "/" for 127.0.0.1 at 2015-03-08 13:24:44 +0100
ActiveRecord::SchemaMigration Load (2.2ms) SELECT schema_migrations.* FROMschema_migrations
Processing by Rails::WelcomeController#index as HTML
Rendered /home/mysiste/.rvm/gems/ruby-2.2.1/gems/railties-4.2.0/lib/rails/templates/rails/welcome/index.html.erb (2.2ms)
Completed 200 OK in 27ms (Views: 15.2ms | ActiveRecord: 0.0ms)


No problem here, i check with cURL:


 cURL Response


Everything Ok

Still, via browser i get this:  Incomplete response received from application

Anyone can help me with this annoying problem ? 

Dmitry Polushkin

unread,
Mar 10, 2015, 10:48:31 AM3/10/15
to phusion-...@googlegroups.com
For me it looks like some issue in the rack.

Max Gorin

unread,
Mar 15, 2015, 11:07:29 PM3/15/15
to phusion-...@googlegroups.com
I'm having the same problem. I can add, that I currently have 3 unix users, each having a Rails app in their respective home directory. Only one of the 3 apps (which was set up as first) is being served properly by Passenger, the other 2 giving "Incomplete response received from application" (both in the browser and with curl), both of them set up with a vanilla, freshly generated Rails app.

Max Gorin

unread,
Mar 16, 2015, 12:05:18 AM3/16/15
to phusion-...@googlegroups.com
SOLVED.

Apparently, the problem indeed was the misconfigured Rails app. Here's what I found in nginx's error.log:

Exception RuntimeError in Rack application object (Missing `secret_token` and `secret_key_base` for 'production' environment, set these values in `config/secrets.yml`)

Previously Passenger would give more information on why it couldn't start the Rails app. Apparently, the new message replaced that page.

Stewart McEwen

unread,
Mar 25, 2015, 8:46:49 AM3/25/15
to phusion-...@googlegroups.com
Thank you so much, this was driving me insane! 
Reply all
Reply to author
Forward
0 new messages