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

crashing shortly after start #10

Open
snizzleorg opened this issue Mar 26, 2017 · 8 comments
Open

crashing shortly after start #10

snizzleorg opened this issue Mar 26, 2017 · 8 comments

Comments

@snizzleorg
Copy link

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?

@noelhibbard
Copy link
Owner

noelhibbard commented Mar 27, 2017

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?

@snizzleorg
Copy link
Author

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

@noelhibbard
Copy link
Owner

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

@snizzleorg
Copy link
Author

nope. no port conflict.

The error occurs right at launch....

@Goeste
Copy link

Goeste commented Jun 24, 2017

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

@Goeste
Copy link

Goeste commented Sep 18, 2017

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...

@noelhibbard
Copy link
Owner

@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.

@Goeste
Copy link

Goeste commented Oct 18, 2017

@noelhibbard , would an enhancement with the node cluster module help, to balance the node-airplayhub load (to eliminate audio-drops? link

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

3 participants