OH 3.3.0 Frontail not Starting after fresh installation

that I missed because in my case the service file was still there from previous install.
As described in the other post a few steps from the installation script need to be done to create the service file and enable the service.

I have the same problem with yesterday’s installation and I am not able to get the frontail.service to run.

a) What is the error message that you may have received during installation of frontail ?
b) What is the output of following command

ls -l /etc/systemd/system/frontail.service /etc/systemd/system/multi-user.target.wants/frontail.service /opt/openhabian/includes/frontail.service

Does the output look similar to:

-rw-r--r-- 1 root root 629 Aug 10  2021 /etc/systemd/system/frontail.service
lrwxrwxrwx 1 root root  36 Aug 10  2021 /etc/systemd/system/multi-user.target.wants/frontail.service -> /etc/systemd/system/frontail.service
-rw-r--r-- 1 root root 610 Dec  2  2021 /opt/openhabian/includes/frontail.service
ls: Zugriff auf '/etc/systemd/system/frontail.service' nicht möglich: Datei oder Verzeichnis nicht gefunden
ls: Zugriff auf '/etc/systemd/system/multi-user.target.wants/frontail.service' nicht möglich: Datei oder Verzeichnis nicht gefunden
-rw-rw-r-- 1 root root 610 15. Aug 21:56 /opt/openhabian/includes/frontail.service

i have now imported an old image of OH 3.1 and then updated it. everything works again.
so I don’t need any more help, thank you.

nevertheless, it would be great if the current version could be repaired.

thank you

1 Like

The file /etc/systemd/system/frontail.service is missing.
Its content needs to be

[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

Afterwards following commands enable the service:

sudo chmod 644 /etc/systemd/system/frontail.service
sudo systemctl -q daemon-reload
sudo systemctl enable --now frontail.service
sudo systemctl restart frontail.service
2 Likes

@Wolfgang_S : Thanks a lot! Frontail is now working, after creating the systemd service as described above.

1 Like

Hi there,
I seem to be in a similar position.
Fresh Installation on Raspi 4. Used “openhabian-pi-raspios32-202208151955-gitbe9d23e-crc075defd9.img.xz”. Installation works smooth, OH 3.3.0 comes up and runs. Frontail missing. As I heavily rely on logs when configuring this is a showstopper for me (Have a working OH 2.5.12).
Firstboot has the following content

...
2022-11-28_22:21:48_CET [openHABian] Installing Frontail prerequsites (NodeJS)... OK
2022-11-28_22:22:29_CET [openHABian] Installing openHAB Log Viewer (frontail)... FAILED (install)
Failed to open terminal.
┌──────────────────────────┤ Frontail not installed ├──────────────────────────┐
│                                                                              │
│ Frontail is not installed!                                                   │
│                                                                              │
│ Canceling operation!                                                         │
│                                                                              │
│                                    <Ok>                                      │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘
...

Followed the discussion here. Found that the file frontail.service was missing in /etc/systemd/system/ and /etc/systemd/system/multi-user.target.wants/.
Copied it to those directories. Tried manual installation (openhabian-config option 21). Still did get the error message. (There was an error or interruption during the execution of: “20 | Optional Components”
Then did the following:

openhabian@openhabian:/etc/systemd/system $ sudo chmod 644 /etc/systemd/system/frontail.service
openhabian@openhabian:/etc/systemd/system $ sudo systemctl -q daemon-reload
openhabian@openhabian:/etc/systemd/system $ sudo systemctl enable --now frontail.service
Failed to enable unit: File /etc/systemd/system/multi-user.target.wants/frontail.service already exists.
openhabian@openhabian:/etc/systemd/system $ sudo systemctl restart frontail.service

Frontail is now working (also after reboot) - even if an installation with option 21 still produces the same error message. It looks completely different - compared to OH2 - but I think I can get used to it.

Thanks for all the hints (although I was a bit puzzled that the basic stuff in a standard setup isn’t working).
Cheers Frank

I followed the fix in OH 3.3.0 Frontail not Starting after fresh installation - #61 by Wolfgang_S and was able to get this working as well - http://[ip]:9001 works now. However, upon opening up the main link http://[ip]:8080, then clicking “Other Apps” in the upper-right corner, the Log Viewer link is not there - is there a way to add this manually? (I did try rebooting the device.)

I couldn’t agree more - doing a fresh install and a basic component not working is discouraging. I read all the back and forth, but it seems that this stopped working (or randomly stopped working since Markus cant duplicate it?) after the move from “NodeJS update to v16”, as indicated in Releases · openhab/openhabian · GitHub, starting with openHABian v1.7.4, though I have NOT tested this theory.

Have a look to /etc/openhab/services/runtime.cfg
There are three entries for an entry to be added e.g.:

org.openhab.core.ui.tiles:frontail-link-name=openHAB Log Viewer
org.openhab.core.ui.tiles:frontail-link-url=http://192.168.0.40:9001
org.openhab.core.ui.tiles:frontail-link-imageurl=data:image/png;base64,iVBORw0KGgoA........

Last row is incomplete and needs to contain a base64 encoded png image.
The image data can be found in /opt/openhabian/includes/dashboard-imagedata

1 Like

FYI: openhabian-pi-raspios32-202203300347-git1305ac7-crcc3eb5287.img Frontail fails install as well.

This is frustrating. About 6-9 months ago I installed openhabian-pi-raspios32-202111152140-git101ce3a-crcb86f6338.img.xz successfully. I tried installing it now and Frontail works! …But openhab doesnt installed properly! I see a “OpenJDK Zulu11-32… FAILED” error so I’m assuming that’s why. The transition from Zulu to OpenJDK is in the release notes, but one can see that the last year of “STABLE” releases can’t do a successful fresh install.

Thank you @Wolfgang_S !

OH 3.3.0 Frontail not Starting after fresh installation - #61 by Wolfgang_S got Fronttail working.
OH 3.3.0 Frontail not Starting after fresh installation - #65 by Wolfgang_S added the link to the dashboard.

1 Like

hello,

for your information. with the latest version the frontail.service works immediately.

But i can’t install the deconz -service via openhabian-config now… I always get an error message.

it’s a real shame that when you take the time to reinstall, there’s always a problem somewhere. soon i’ll give up…

the real shame is having to read comments like this as someone who has put many times the time into building openHABian that you did. Needless to say for your benefit, for free.

the detailed version of that message should help to identify the root cause of the problem.

yes, you are right.
i wrote that in the immediate emotions i had after hours of troubleshooting.

i didn’t mean anyone personally. that came out wrong.
and yes, i appreciate your support very much, sorry.

1 Like

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
  • Installed Java 17
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?

Have you tried to install frontail service from openhabian-config?

I’m not sure if that’s possible. I haven’t installed openhabian. I just installed openhab on debian (Raspberry Pi OS).
Maybe this is the problem with the frontail.service file? But how can I fix this?

Now I found the Problem.

When I execute this in the shell:

/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

I get the error that openhab_AEM.json is mising. I changed it to default.json and then it works.