Brim
Posts: 5
Joined: Tue Apr 29, 2014 8:13 pm

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

Tue Apr 29, 2014 8:28 pm

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!

elatllat
Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

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

Tue Apr 29, 2014 10:24 pm

Maybe the way you are starting it is trying to start 2 instances.
SBC with 32GB RAM: https://hardkernel.com

FAQ : https://raspberrypi.stackexchange.com

Unanswered: https://www.raspberrypi.org/forums/search.php?search_id=unanswered

Brim
Posts: 5
Joined: Tue Apr 29, 2014 8:13 pm

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

Wed Apr 30, 2014 2:24 pm

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.

User avatar
DougieLawson
Posts: 39303
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

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

Thu May 01, 2014 11:56 am

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.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Brim
Posts: 5
Joined: Tue Apr 29, 2014 8:13 pm

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

Sat May 03, 2014 4:05 pm

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.

parkeragee
Posts: 1
Joined: Sun Dec 07, 2014 6:50 am

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

Sun Dec 07, 2014 6:54 am

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

onEnterFrame
Posts: 1
Joined: Thu Jan 28, 2016 9:36 pm

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

Thu Jan 28, 2016 9:38 pm

Did you resolve this issue?
Were you able to get Sails up and running on your Pi?

Return to “Troubleshooting”