Phusion, Passenger and Old Node.js issue - node.js

I'm trying to deploy a Node.js server using Nginx and Passenger but having the following issue:
Watching the log I can see that Passenger starts the nodeserver but on the client side I've got no answer.
By the way I've followed the instructions on here: Passenger/Node.js tutorial
which is simple enough to understand.
The program versions that I'm using are these:
nginx v1.4.5
nodejs v0.8.15
passenger v4.0.37
OS ubuntu 12.04
After some tests I've tried to deploy the example server found on nodejs.org even with that I got the same situation that had with the first server. So I tried to do the same test but this time using Node.js v0.10.26 and it worked just fine, equals as the v0.8.15 passenger runs the server but this time on the client side I got response from server.
Is that issue normal?
Is there a way to deploy my server with the last version of passenger even with an old nodejs version?(because the server cannot run on last Node.js version, for that reason I'm using v0.8.15).
Thanks in advance

Phusion Passenger relies heavily on streams2, so it doesn't work on Node.js 0.8.

Related

Can I run Node.js on cPanel without CloudLinux?

I'm trying to deploy a node.js app on my server.
I've followed the instructions laid out by cPanel in their documentation here: Guide to Node.js Installations and here: How to Install a Node.js Application. I want to do this without CloudLinux and given Apache's Node.js module it seemed to be possible.
However, even though deploying the app in the backend seems fine, I'm getting this error when trying to access the app in my browser:
The Phusion Passenger application server tried to start the web application through a Passenger-internal helper tool called the SpawnEnvSetupper. But that helper tool encountered an internal error.
Error Details: Failed to initialize LVE library: : init_lve error [2]
The stdout/stderr output of the subprocess so far is: Error: Failed to initialize LVE library: : init_lve error [2]
I don't know much about LVE but I do know that it's a part of CloudLinux. So, do I still need to have CloudLinux installed after all? Thanks.
Update:
Tried deploying the same node.js app on a subdomain and had the same error. Then I tried to deploy it on another server that I manage (following the same steps) and was able to do so successfully. My hosting company seems to think there was an issue when I uninstalled CloudLinux from my server. (I had previously set it up to run Node and then had it removed once I discovered that I wouldn't need it.)
To answer my own question ...
Yes, Node.js can run on cPanel without CloudLinux.
By following the instructions in the cPanel documentation here (Guide to Node.js Installations) and here (How to Install a Node.js Application), a Node.js app can be deployed successfully.
In my particular situation above, I had installed CloudLinux on my server originally to deploy Node.js apps before cPanel came out with their own module for Apache. Given that I was paying extra for the CloudLinux software, I wanted to remove it from my hosting account and leverage the Apache module. During the uninstall, it turns out that LVE and other libraries related to CloudLinux were not removed correctly causing the error (not sure why yet). By simply removing those and restarting my server the Node app started functioning properly again.

Why is `url` `undefined` in the Meteor server production environment, but not locally?

I have no clue as to why this is happening, as I can use the url.parse() method safely anywhere on the server while developing locally with Meteor.
But the moment I deploy my app (not Galaxy, but via mupx - also tried with mup before) I get an exception that url is not defined.
I know there is a separately bundled url package on Npm, but I though it was already part of Node v0.10.41 running in the Docker container?
What am I missing here?
Do I have to require it separatly?
Why is the module available locally but not on the server?
How do I require it?
Thanks in advance!

NodeJS just crashes without any information

I am trying to deploy a meteor (nodeJS) app on a Virtual Server.
My Problem:
I cannot start forever - I thought. Then I tried to start the app as described in the manual: node main.js just error code -1.
Then I tried to check wich Node version is installed node -v and I also get a return value of -1 and no more error message.
Does anyone have an idea?
A reinstallation of the nodejs packet (jap, the "node" packet is something different in ubuntu) helped

meteor on openShift node version

meteor (v0.6.6.3) on openShift, customized openShift nodeJS to 0.10.21, mongoDB 2.2
I try to get a meteor app running on openShift. I have upgrade the nodeJS from the openShift default 0.10.5 to nodeJS 0.10.21 because meteor needs this nodeJS version as minimum.
If i open a ssh shell to openShift and let give me the node version than it shows me correct my upgraded version of 0.10.21 ( node --version ).
But if i will start the meteor application they see a nodeJS version of 0.10.5 (console log out with 'process.version' ) and starts again, again, again...
Can someone point me to the direction where i can look what's happened or what i'm doing wrong.
thanks
I 've prepared this "quickstart" solution,
it uses METEOR + NODE v0.10.24 (but it can be changed)
with Meteor example LeaderBoard and it can be easy transformed to your real application.
I have tested on Meteor 0.7.0.1
see: https://github.com/vladka/openshift-meteor-leaderboard-customNode
Edit (06.aug.2014)
As of now openshift is running nodejs version v0.10.25 which should be fine for running a meteor app. I am currently running one that is based on the 0.8.2/3 version.
Outdated answer (20. jan. 2014)
I have found the following repo, that according to the description lets you use any custom nodejs version.
Note: I am trying it out as we speak and will report back.
Edit
After 6 hours of trying out:
2 different app bootstraps (ryanj, openshift)
3-4 different nodejs cartridges from this repo
I gave up these approaches.
But made it work via the following steps:
I downgraded meteor to 0.6.5
meteor update --release 0.6.5
Used demeteorizer to "bundle app"
Copied contents of folder into the openshift dir created by following this tutorial
Replaced process.env.ROOT_URL in meteorshim with
process.env.ROOT_URL = "http://" + (process.env.OPENSHIFT_APP_DNS || "localhost");
Updated MIN_NODE_VERSION in programs/server/boot.js with:
var MIN_NODE_VERSION = 'v0.10.5';
git push and app was up & running
Changing the version of the software installed by a cartridge is not supported, but you can make a DIY app that has the version you want or roll you own nodejs cartridge with the version you want.
I created the openshift app using nodejs-0.10 instead of nodejs-0.6.
Then i followed this repo as mentioned by Matyas.
As the final step, i added new openshift env variable, something like:
rhc env add OPENSHIFT_youruniquestring_PATH_ELEMENT=/var/lib/openshift/xxxxxxxx/app-root/data/node-v0.10.29-linux-x64/bin -a yourAppName
Please adjust the values above to match yours.
After that try to make some dummy changes to your source code, then commit and push.
Once finished, you should run on node 0.10.29.
It worked for me, my app now running on meteor 0.8.3 with node 0.10.29

ruining EasyRTC server using iisnode

EasyRTC is one of the best available opensource WebRTC solutions that runs in node.js! I have manged to run it on node.js on my system but my application is in Asp.net so I've been trying to run it using under IIS using iisnode! but for some reason I haven't been able to make it work! running this application in node.js i use node server.js to start the server but in IIS when i set the default page to server.js to start the application it wond work!
this is result by using
nodejs:
nodejs result: (working properly)
IISNODE Result:
looks like it's not even running it !
This error is due to lack required module for easyRTC. type in node command prompt "npm install" It will install all dependency module. And after that try to run server. I hope It will work for you.

Resources