Hello,
I have also problems to start frontail:
I have installed openhab (Version 4.0.2) on raspberry pi Version 4 with 4GB:
sudo apt-get install openhab
sudo apt install openjdk-17-jdk -y
I started Openhab and made the setup and its running fine.
Then I reconized that frontail doesnβt run, so I tryed to install frontail (GitHub - mthenw/frontail: π streaming logs to the browser. Sponsored by https://cloudash.dev)
sudo npm i frontail -g
Result: no npm installed!
I need node.js for installation (Version Node Major 20) (GitHub - nodesource/distributions: NodeSource Node.js Binary Distributions)
sudo apt-get install nodejs -y
Now I can start frontail with:
sudo frontail /var/log/openhab/openhab.log /var/log/openhab/events.log
And I can see in the Browser with ip:9001 that its running.
I want to start frontail as a sevice and no frontail.service ist installed. So I added the file with:
sudo nano /etc/systemd/system/frontail.service
I put this into the file:
[Unit]
Description=Frontail openHAB instance, reachable at http://%H:9001
Documentation=https://github.com/mthenw/frontail
After=openhab.service
PartOf=openhab.service
[Service]
Type=simple
ExecStart=/usr/lib/node_modules/frontail/bin/frontail --disable-usage-stats --ui-highlight --ui-highlight-preset /usr/lib/node_modules/frontail/preset/openhab_AEM.json --theme openhab_AEM --lines 2000 --number 200 /var/log/openhab/openhab.log /var/log/openhab/events.log
Restart=always
User=frontail
Group=openhab
Environment=PATH=/usr/bin/
Environment=NODE_ENV=production
WorkingDirectory=/usr/bin/
[Install]
WantedBy=multi-user.target
And made this commands:
sudo chmod 644 /etc/systemd/system/frontail.service
sudo systemctl -q daemon-reload
sudo systemctl enable --now frontail.service
sudo systemctl restart frontail.service
When I check the status its not runnung and I get this:
frontail.service - Frontail openHAB instance, reachable at http://openhab4:9001
Loaded: loaded (/etc/systemd/system/frontail.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2023-09-05 12:42:21 CEST; 27s ago
Docs: https://github.com/mthenw/frontail
Process: 10486 ExecStart=/usr/lib/node_modules/frontail/bin/frontail --disable-usage-stats --ui-highlight --ui-highlight-preset /usr/lib/node_modules/frontail/preset/openhab_AEM.json --theme openhab_AEM --lines 2000 --number 200 /va>
Main PID: 10486 (code=exited, status=217/USER)
CPU: 0
Sep 05 12:42:21 openhab4 systemd[1]: frontail.service: Scheduled restart job, restart counter is at 5.
Sep 05 12:42:21 openhab4 systemd[1]: Stopped Frontail openHAB instance, reachable at http://openhab4:9001.
Sep 05 12:42:21 openhab4 systemd[1]: frontail.service: Start request repeated too quickly.
Sep 05 12:42:21 openhab4 systemd[1]: frontail.service: Failed with result 'exit-code'.
Sep 05 12:42:21 openhab4 systemd[1]: Failed to start Frontail openHAB instance, reachable at http://openhab4:9001.
Now I have no more idea how to solve it. Has anyone solved this? Or am I just not understanding the solution here?