You are not logged in.
Pages: 1
I am a long time lurker. Have used arch linux on and off for 7-8 years and other dists for 15 years but I still consider myself a new user.
Now I have problem I can't seem to be able to figure out by myself(read: google) so I come here for guidance.
I have a PC
I use that PC as a server(mainly running home assistant)
That PC is running arch
I have successfully installed and configured Homebridge and I can run it fine. But no mather what changes I make to the service file I can't get it to auto-run. I can run "/usr/lib/node_modules/homebridge/bin/homebridge" without problems and errors"
My *.service file:
[Unit]
Description=Node.js HomeKit Server
After=syslog.target network-online.target[Service]
User=admin
Type=forking
ExecStart=/usr/bin/node /usr/lib/node_modules/homebridge/bin/homebridge
Restart=on-failure
RestartSec=30
KillMode=process[Install]
WantedBy=multi-user.target
Offline
up
Offline
Don't do that...
Offline
What do you mean by "can't get it to autorun"? Just editing a service file is not going to make it run.
https://wiki.archlinux.org/index.php/Sy … sing_units
How did you install Arch? What are the outputs of
systemctl status *.service #What's *.service? What's it called?
uname -aFurthermore, are you sure that this a forking process? Does starting it this way not simply start the nodeserver and opening up the homebridge "application" on that same nodeserver?
Also don't bump your post
Offline
Don't do that...
Oops.
What do you mean by "can't get it to autorun"? Just editing a service file is not going to make it run.
https://wiki.archlinux.org/index.php/Sy … sing_units
How did you install Arch? What are the outputs of
systemctl status *.service #What's *.service? What's it called? uname -aFurthermore, are you sure that this a forking process? Does starting it this way not simply start the nodeserver and opening up the homebridge "application" on that same nodeserver?
Also don't bump your post
I installed arch via a USB stick I think.
the output of systemctl status is
Loaded: loaded (/etc/systemd/system/homebridge@admin.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Sun 2017-12-03 19:54:38 CET; 7s ago
Process: 31773 ExecStart=/usr/bin/node /usr/lib/node_modules/homebridge/bin/homebridge (code=exited, status=1/FAILURE)And the name of the service is homebridge@admin.service
output of journalctl _PID=31773 is
-- Logs begin at Sat 2016-04-09 01:13:38 CEST, end at Sun 2017-12-03 20:01:37 CET. --
Dec 03 19:54:38 localhost node[31773]: /usr/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:35
Dec 03 19:54:38 localhost node[31773]: throw ex;
Dec 03 19:54:38 localhost node[31773]: ^
Dec 03 19:54:38 localhost node[31773]: Error: The module '/usr/lib/node_modules/homebridge/node_modules/mdns/build/Release/dns_sd_bindings.node'
Dec 03 19:54:38 localhost node[31773]: was compiled against a different Node.js version using
Dec 03 19:54:38 localhost node[31773]: NODE_MODULE_VERSION 51. This version of Node.js requires
Dec 03 19:54:38 localhost node[31773]: NODE_MODULE_VERSION 59. Please try re-compiling or re-installing
Dec 03 19:54:38 localhost node[31773]: the module (for instance, using `npm rebuild` or `npm install`).
Dec 03 19:54:38 localhost node[31773]: at Object.Module._extensions..node (module.js:670:18)
Dec 03 19:54:38 localhost node[31773]: at Module.load (module.js:560:32)
Dec 03 19:54:38 localhost node[31773]: at tryModuleLoad (module.js:503:12)
Dec 03 19:54:38 localhost node[31773]: at Function.Module._load (module.js:495:3)
Dec 03 19:54:38 localhost node[31773]: at Module.require (module.js:585:17)
Dec 03 19:54:38 localhost node[31773]: at require (internal/module.js:11:18)
Dec 03 19:54:38 localhost node[31773]: at Object.<anonymous> (/usr/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:24:20)
Dec 03 19:54:38 localhost node[31773]: at Module._compile (module.js:641:30)
Dec 03 19:54:38 localhost node[31773]: at Object.Module._extensions..js (module.js:652:10)
Dec 03 19:54:38 localhost node[31773]: at Module.load (module.js:560:32)I think this error message shows that avahi-daemon isn't running. But it is.
And I'm not sure that this is a forking process, just brute forcing my way right now. Have tried simple as well.
I have tried to remove "/usr/bin/node" part of the execstart also.
Offline
The error message tells you that the node version (your system wide install) you are trying to start homebridge in is incompatible with the node version the dependencies are compiled against. If you don't rely on the latest node you could either install one of the LTS versions, recompile the modules against the latest version (as instructed in the error message), or starting the old node server that came with the initial install (your node binary path should point to somewhere in /usr/lib/node_modules/).
I really don't know why youi'd think that avahi is relevant here (well it does talk about mdns, but in this context it's a node module providing this functionality, avahi will come into play way later, if at all)
And I looked at that startup file, this will definitely just run in the node you start it with, so this isn't a forking process, switch the type to simple. And while we are at it fix your hostname
And by asking how you installed Arch I want to know which instructions you followed, I don't really care which medium you used. However a lot of the things you are asking here do nudge me into a direction that you didn't follow the wiki, which is always a recipe for desaster.
Last edited by V1del (2017-12-06 08:49:32)
Offline
Is there a wiki entry for Homebridge? I'll need to check that now.
Homebridge depends on the "mdns" package, which depends on "nan", which uses APIs that were deprecated in 2015, and made obsolete by NodeJS v10. It would appear the correct option, for now, is to use the LTS release.
Tracking this issue: https://github.com/nodejs/nan/issues/504
E: No point, it was already fixed post version 2.7.0 of nan, but mdns is intentionally using version 2.3.0.
Last edited by kode54 (2018-04-30 03:34:08)
Offline
Pages: 1