WebFaction
Community site: login faq

Hi guys,

I'm very interested in getting to work a node.js application. The installing instructions are here.

So what I'm doing: (markdown numbered list seems not to work here, sorry) 1. Adding a new application with Node.js 2. Attaching a website to it, eg log.mydomain.com 3. Connecting via SSH to the application folder 4. Installing express, and express-antenna-cocoalumberjack 5. From applications directory run bin/node node_modules/express-antenna-cocoalumberjack/app.js 6. It says "Listening to port 3205", which seems like there are no errors 7. Try to test it by typing log.mydomain.com:3205/ping - I get "Failed to open the page" error in browser. I also tried it with IP: 81.95.157.171:3205/ping and get the same error.

What am I missing here? Some could help me to install this application on Webfaction?

asked 22 Dec '15, 15:55

nrgbodya
1315
accept rate: 0%

edited 22 Dec '15, 15:56


The problem is that you have not started your app on its assigned port.

To fix this, make a note of the port assigned to your Node application in the control panel, then run the following command before you start the app:

export NODE_EXPRESS_ANTENNA_PORT=NNNNN

(replace NNNNN with your assigned port).

When you start the app, you'll see "Listening on port NNNNN", and you'll be able to test it at log.mydomain.com/ping (note that the port number is not included in the URL).

Hope that helps! Please let us know if you need anything else.

permanent link

answered 22 Dec '15, 20:08

seanf
12.2k41836
accept rate: 37%

Hi Sean, thank you for answering, you're being really helpful. I did it in fact, and I got nodejs Error: listen EADDRINUSE when trying to start the app. I've googled it and found that killing a process on that port would help, but I'm not sure if I am permitted to kill processes in order not to cause any bigger damage. Any ideas how to resolve this?

(22 Dec '15, 20:15) nrgbodya

Run ~/webapps/name_of_app/bin/stop to stop the default app that is listening on your assigned port, then try again.

(22 Dec '15, 20:21) seanf

it worked. Thank you!

(23 Dec '15, 07:40) nrgbodya
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×67
×12

question asked: 22 Dec '15, 15:55

question was seen: 2,604 times

last updated: 23 Dec '15, 07:40

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM