Solvedzigbee2mqtt Not able to run zigbee2mqtt as a service

Hello,

i'm trying to run zigbee2mqtt as a deamon via systemctl - without success so far.

Here is what i get, when i check it's status:

 zigbee2mqtt.service - zigbee2mqtt
   Loaded: loaded (/etc/systemd/system/zigbee2mqtt.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2018-09-11 21:50:33 CEST; 8s ago
  Process: 25016 ExecStart=/usr/bin/npm start (code=exited, status=203/EXEC)
 Main PID: 25016 (code=exited, status=203/EXEC)

Sep 11 21:50:33 raspberrypi systemd[1]: zigbee2mqtt.service: Changed auto-restart -> dead
Sep 11 21:50:33 raspberrypi systemd[1]: zigbee2mqtt.service: Job zigbee2mqtt.service/restart finished, result=done
Sep 11 21:50:33 raspberrypi systemd[1]: Stopped zigbee2mqtt.
Sep 11 21:50:33 raspberrypi systemd[1]: zigbee2mqtt.service: Converting job zigbee2mqtt.service/restart -> zigbee2mqtt.service/start
Sep 11 21:50:33 raspberrypi systemd[1]: zigbee2mqtt.service: Start request repeated too quickly.
Sep 11 21:50:33 raspberrypi systemd[1]: zigbee2mqtt.service: Changed dead -> failed
Sep 11 21:50:33 raspberrypi systemd[1]: zigbee2mqtt.service: Job zigbee2mqtt.service/start finished, result=failed
Sep 11 21:50:33 raspberrypi systemd[1]: Failed to start zigbee2mqtt.
Sep 11 21:50:33 raspberrypi systemd[1]: zigbee2mqtt.service: Unit entered failed state.
Sep 11 21:50:33 raspberrypi systemd[1]: zigbee2mqtt.service: Failed with result 'exit-code'.

However, npm start ist working without any issues.
Here are the logs:
https://pastebin.com/A0pUaswM

Does anyone has any ideas?
Looks like the service is being restarted several times before error occurs. But what is the cause for those restarts?

I appreciate every hint or useful information, thanks!

16 Answers

✔️Accepted Answer

Just changed
/usr/bin/npm start
to
/usr/local/bin/npm start
and it worked