Page 1 of 1

Installing Node.js/Sails.js, port blocked or in use?

Posted: Tue Apr 29, 2014 8:28 pm
by Brim
Hello gentlemen!

Recently got myself a Raspberry Pi and I am having a blast working with it. Within my different experiments, I am trying to use Node.js and have already installed a framework I like to use regularly: Sails.js (http://sailsjs.org/#!getStarted).

If you look at the instruction, it is pretty simple. You npm install sails, create new project, and you lift. Works like a charm in almost any OS environment but it doesn't seem to on Raspbian "Weezy". The error I get is that the port it is trying to use, which be default is 1337, seems to be in use. I edited the config, and changed the port to 7331 and same thing as well as any other port.

This leads me to believe that some kind of setting is blocking this? Or perhaps I missed something on the Node setup?

I searched around and haven't seen anyone have a similar issue, so wanted to ask all of you smart people for some advice. What next steps do you suggest I take?

Thanks in advance!

Re: Installing Node.js/Sails.js, port blocked or in use?

Posted: Tue Apr 29, 2014 10:24 pm
by elatllat
Maybe the way you are starting it is trying to start 2 instances.

Re: Installing Node.js/Sails.js, port blocked or in use?

Posted: Wed Apr 30, 2014 2:24 pm
by Brim
I believe only one instance is running. It has a separate setting to turn on multiple instances (for environments with multiple cores) but this is currently turned off.

Re: Installing Node.js/Sails.js, port blocked or in use?

Posted: Thu May 01, 2014 11:56 am
by DougieLawson
sudo apt-get install lsof
sudo lsof -i TCP:1337
or
sudo lsof -n -i TCP:1337 # this doesn't convert addresses & port numbers to names in the output

It's a neat way to see exactly which task has the port open.

Re: Installing Node.js/Sails.js, port blocked or in use?

Posted: Sat May 03, 2014 4:05 pm
by Brim
Thanks Dougie, that is exactly the path I took. However, what I found that resolved the issue is that I changed the configuration on the RPI to boot directly into command line vs. the Desktop UI. From there, it started to work.

Thanks for the tip! I am using the same advice for other things I am working through.

Re: Installing Node.js/Sails.js, port blocked or in use?

Posted: Sun Dec 07, 2014 6:54 am
by parkeragee
Brim, I'm an avid Sails.js user as well. I'm thinking about buying a Rasberry Pi. I'd love to connect with you and talk about the process, etc. Got a twitter handle? I'm @parkeragee

Re: Installing Node.js/Sails.js, port blocked or in use?

Posted: Thu Jan 28, 2016 9:38 pm
by onEnterFrame
Did you resolve this issue?
Were you able to get Sails up and running on your Pi?