I'm trying to deploy a Loopback application behind an NGINX / Passenger setup, however it doesn't appear to be starting up. Passenger is giving the following error:An error occurred while starting the web application: it did not write a startup response in time. Please read this article for more information about this problem.Reading the article they link to, it seems to indicate that passenger lost communication with the application which they indicate points to STDOUT redirection. From the article:Stdout redirection
Phusion Passenger uses the application's stdout for communication with the application. This means that if, during any of those steps, stdout is closed, overwritten or redirected to a file, then Phusion Passenger loses its means to communicate with the application. After a while, Phusion Passenger concludes that the application fails to start up, and reports an error.
It is however safe to write data to stdout as long as the data does not begin with
!>
. Phusion Passenger uses!>
to mark internal communication messages.Also, from their Node,js tutorial: https://github.com/phusion/passenger/wiki/Phusion-Passenger%3A-Node.js-tutorial#caveatsPhusion Passenger uses stdout and stderr to communicate with the application. It is safe for you to log messages to stdout and stderr, but don't do things like redirecting them to a file. Doing so will make Phusion Passenger think your app froze during startup, because it never receives a message back.So my question is pretty much does Loopback do this?I've tried the following to see if I can get it up and running:
- Commented out all Console.log statements in the app.js file.
- Replaced the loopback.bodyParser() lines with recommended loopback.json() and loopback.urlencoded() so the multipart error isn't logged.
- Also 'node app.js' starts the app fine.
Does anyone have any experience with this?
May 8, 2014 at 9:25 AM
Is the Loopback server an HTTP application that uses Node's
net.httpServer library?
Phusion Passenger only supports it if that's the case.
May 6, 2014 at 4:24 PM
Hi,I recently posted this over in the Loopback group. If anyone here has experience with Strongloop's Loopback API server I'd appreciate any input. Thanks!
--
You received this message because you are subscribed to a topic in the Google Groups "Phusion Passenger Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/phusion-passenger/zocCqXZ0ldI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to phusion-passen...@googlegroups.com.
To post to this group, send email to phusion-...@googlegroups.com.
Visit this group at http://groups.google.com/group/phusion-passenger.
To view this discussion on the web visit https://groups.google.com/d/msgid/phusion-passenger/26f2aeb4-d96c-4f58-852a-a19337eac0eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
// Bootstrap the application, configure models, datasources and middleware.// Sub-apps like REST API are mounted via boot scripts.boot(app, __dirname, function (err) {
if (err) { throw err; }
// start the server if `$ node server.js` // if (require.main === module) { app.start(); //}});