Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: bind EADDRINUSE #67

Closed
bitboxer opened this issue Feb 11, 2015 · 10 comments
Closed

Error: bind EADDRINUSE #67

bitboxer opened this issue Feb 11, 2015 · 10 comments

Comments

@bitboxer
Copy link

Today I got this error when trying to stream:

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: bind EADDRINUSE
    at exports._errnoException (util.js:746:11)
    at dgram.js:224:28
    at dns.js:85:18
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3

Sadly I don't know what is going on here. What addres is already in use and by what process. How can I find that out?

@xat
Copy link
Owner

xat commented Feb 11, 2015

Did you have two instances of castnow running on the same machine?

@bitboxer
Copy link
Author

Nope. Can't see any. Can you say what port is used? That way incan identify the process that is using it on my machine

Am 11.02.2015 um 22:12 schrieb Simon Kusterer notifications@github.com:

Did you have two instances of castnow running on the same machine?


Reply to this email directly or view it on GitHub.

@xat
Copy link
Owner

xat commented Feb 11, 2015

Depending on the plugin used it's between 4100 and 4105

@bitboxer
Copy link
Author

I restarted the machine and sadly can't find anything with lsof that is using this port. I also tried to reinstall it, but without any luck 😢

@bitboxer
Copy link
Author

The debug output:

  castnow launching... +0ms
  castnow:localfile started webserver on address 192.168.0.104 using port 4100 +5ms
  castnow player status: loading plugins +2ms
  castnow player status: scanning +1ms
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: bind EADDRINUSE
    at exports._errnoException (util.js:746:11)
    at dgram.js:224:28
    at dns.js:85:18
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3

@xat
Copy link
Owner

xat commented Feb 14, 2015

Looks like it's getting stuck in the scanning process. Can you try either the --ssdp option or using --address <chromecast ip> ?

@bitboxer
Copy link
Author

I tried --address <ip> with the same result. If I am using --ssdp it does not find my device.

@xat
Copy link
Owner

xat commented Feb 15, 2015

Ok, well that's strange.
You could clone the repo, run npm install in the directory and change the port of the localfile-plugin here to something different => https://github.com/xat/castnow/blob/master/plugins/localfile.js#L8
Afterwards run ./index.js <path to your media file> and see if it would work then. If that works for you I can add an option-parameter to change the port.

@bitboxer
Copy link
Author

Strangely it started working again when I tried to debug it today. Sorry for all the problems. Will close this now and hope it will not appear again.

@xat xat reopened this Feb 19, 2015
@xat
Copy link
Owner

xat commented Feb 19, 2015

I'm getting this error too within node v0.12.x

Seems to be related with this here: mdns-js/node-mdns-js#31

@xat xat closed this as completed in 236145b Feb 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants