CharlesHolbrow / monode

Monome/Arc toolkit in node.js
MIT License
20 stars 2 forks source link

Windows: Failed to find available port #5

Closed jonobr1 closed 8 years ago

jonobr1 commented 8 years ago

Hey there,

I've been using monode to great success on Mac. Thanks so much for writing and maintaining it! It's super easy to use. The other day I wanted to use it on my Windows 10 VR-Enabled PC. I have max patches running and communicating with my 128 grid, however when I try to run the sample node ./out/lib/start.js from a fresh npm install monode I get this error:

Error: Failed to open main server: Error: Failed to find available port

I checked the source and see that the port is hardcoded into monome.js so I just tried changing that number from 4545 to 4646 and 5555, but still have the same error. Any ideas on what this could be?

Thanks for your time and awesome library!

jonobr1 commented 8 years ago

Hmmm, so it seems I was able to fix the issue by replacing 0.0.0.0 as the host in osc.js as localhost. I'll submit a PR for this once I figure out a good way to figure out when to use one versus the other.

Thanks!

CharlesHolbrow commented 8 years ago

I believe 0.0.0.0 binds all network interfaces. Can you try using 127.0.0.1, and see if that solves the problem? This is probably what it 'should' be. I'd be happy to accept a pull request.

CharlesHolbrow commented 8 years ago

@jonobr1 I just published monode 3.0.0 to npm. Can you check if this solves your issues?

jonobr1 commented 8 years ago

Thanks for publishing a new version! 3.0.0 fixed it!