node_airtunes icon indicating copy to clipboard operation
node_airtunes copied to clipboard

Socket is already bound error

Open ajkessel opened this issue 6 years ago • 2 comments

I'm unable to build the latest release here on Debian ( per #45 ), but I was able to build Rotvig's patched version which appears to address the build issues at https://github.com/Rotvig/node_airtunes . Whenever I try one of the example scripts, however, I get this error:

adding device: 192.168.98.161:5000
dgram.js:165
    throw new ERR_SOCKET_ALREADY_BOUND();
    ^

Error [ERR_SOCKET_ALREADY_BOUND]: Socket is already bound
    at Socket.bind (dgram.js:165:11)
    at /mnt/md0/home/adam/node_modules/airtunes/lib/udp_servers.js:130:23
    at next (/mnt/md0/home/adam/node_modules/async/dist/async.js:5223:28)
    at Socket.<anonymous> (/mnt/md0/home/adam/node_modules/airtunes/lib/udp_servers.js:116:11)
    at Object.onceWrapper (events.js:273:13)
    at Socket.emit (events.js:182:13)
    at state.handle.lookup (dgram.js:243:14)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at startup (internal/bootstrap/node.js:283:19)

Any suggestions for troubleshooting?

ajkessel avatar Jan 13 '19 17:01 ajkessel

In my opinion, this happens to me if the same process is already running - meaning if arecord is already recording and I'd like to start a second process. Check the use of your processes I'd propose.

FrancisHGR avatar Feb 13 '19 01:02 FrancisHGR

It happened to me when running pulseaudio parallel. I stopped pulseaudio with systemctl --user stop pulseaudio.socket and then node_aitunes worked.

jens62 avatar Apr 22 '21 17:04 jens62