node-airplayhub
node-airplayhub copied to clipboard
crashing shortly after start
pi@automator:~$ node-airplayhub -c ~/airplayhub.conf
*** WARNING *** The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs>
*** WARNING *** The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister>
nodetunes:server starting nodetunes server ([AirPlay Hub]) +0ms
nodetunes:server broadcasting mdns advertisement (for port 5000) +314ms
events.js:160
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at exports._errnoException (util.js:1022:11)
at TCP.onread (net.js:569:26)
1 pi@automator:~$
not sure what the reason is. I have homebridge running on the same machine which also uses avahi - can that be somehow the reason?
When do you receive this? Right at launch or after starting a stream? It advertises on port 5000 which is the default AirPlay port. You don't happen to have other AirPlay services running on this machine on port 5000 do you?
yes, right at launch. I do have forked-daapd running but it uses port 3689. Also librespot which uses 5353 for mdns. Any way I can find out if anything is bound to 5000
I kind of doubt it's a port conflict to be honest because it is saying connection reset. If it was a port conflict I would have expected it to say something like port in use.
To list all the ports that are in use and what process are associated, use this command:
netstat -lp
nope. no port conflict.
The error occurs right at launch....
I can second this behaviour...
only I start it via systemd and after a few seconds it is exiting:
$ sudo systemctl status node-airplayhub
* node-airplayhub.service - node-airplayhub, AirPlay Hub for multiroom audio.
Loaded: loaded (/etc/systemd/system/node-airplayhub.service; enabled)
Active: failed (Result: start-limit) since Sat 2017-06-24 13:45:38 CEST; 18s ago
Process: 30397 ExecStart=/usr/bin/node /usr/lib/node_modules/node-airplayhub/index.js --config=/etc/airplayhub.json (code=exited, status=1/FAILURE)
Main PID: 30397 (code=exited, status=1/FAILURE)
Jun 24 13:45:37 osmc_WZ systemd[1]: Unit node-airplayhub.service entered failed state.
Jun 24 13:45:38 osmc_WZ systemd[1]: node-airplayhub.service holdoff time over, scheduling restart.
Jun 24 13:45:38 osmc_WZ systemd[1]: Stopping node-airplayhub, AirPlay Hub for multiroom audio....
Jun 24 13:45:38 osmc_WZ systemd[1]: Starting node-airplayhub, AirPlay Hub for multiroom audio....
Jun 24 13:45:38 osmc_WZ systemd[1]: node-airplayhub.service start request repeated too quickly, refusing to start.
Jun 24 13:45:38 osmc_WZ systemd[1]: Failed to start node-airplayhub, AirPlay Hub for multiroom audio..
Jun 24 13:45:38 osmc_WZ systemd[1]: Unit node-airplayhub.service entered failed state.
osmc@osmc_WZ:~/node-airplayhub$ node-airplayhub
module.js:440
return process.dlopen(module, path._makeLong(filename));
^
Error: Module version mismatch. Expected 47, got 14.
at Error (native)
at Object.Module._extensions..node (module.js:440:18)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/node-airplayhub/node_modules/airtunes/lib/device_coreaudio.js:5:16)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
Is there anything that could help for finding the problem, link log or so?
best, goeste
Got everything Sorted. Reinstalled raspbian (Stretch), installed node v4 via nodesource and everything works like a charm, except Audio gets pauses Every 20-30 seconds...
@Goeste , the RPi just doesn't have the CPU power to handle node-airplayhub. I originally ran mine on an Intel Atom N230 and it had drops if I ran anything more than 2 zones at a time. I moved it over to an Intel i5 and now it works perfect with all 5 of my zones running at a time.
@noelhibbard , would an enhancement with the node cluster module help, to balance the node-airplayhub load (to eliminate audio-drops? link