strongloop-archive / strong-gateway-demo

DEPRECATED | Our new gateway product is available at https://github.com/strongloop/microgateway.
Other
35 stars 34 forks source link

ECONNREFUSED error #7

Closed f-w closed 9 years ago

f-w commented 9 years ago

Either running ./start-demo or manually following the steps yields following error when accessing http://localhost:2001/:

ECONNREFUSED

Error: connect ECONNREFUSED

http://localhost:2001/explorer/ works but only showing User model, not the Note model I am expecting.

f-w commented 9 years ago

The casue is that my resource-server is listening on port 3003 b/c for some reason the service has an id of 3. Worth to document that.

superkhau commented 9 years ago

What step are you on? The process manager assigns ports based on the starting order of the apps. If you started the resource server first, it would take the first ID 3001. Can you try cloning a fresh project and running a particular step to automatically set up the step?

f-w commented 9 years ago

End of Part 1 after launching client. The reason is that I have already used slc pm to run some services before, hence resource-server is not the 1st service (id = 1). The tutorial incorrectly assumes resource-server has service id of 1.

superkhau commented 9 years ago

The tutorial incorrectly assumes resource-server has service id of 1.

The tutorial assumes you are running from a clean slate. We do not assume all users already have used slc pm to run some services before.

superkhau commented 9 years ago

In your case, I recommend cleaning up whatever you have running on PM before doing the tutorial. You can shut down PM, remove the ~/.strong-pm dir to get PM to a clean slate and then continue the tutorial.

f-w commented 9 years ago

It's easy to remove such assumptions by either mentioning to use slc ctl to check the port assigned and make changes accordingly, or explicitly set the port in the slc start command

superkhau commented 9 years ago

That is a good idea. ;) Would you like to submit a PR to the update the instructions?