OH 3 Frontail / Log View

sure that you are on the right branch ? I am on OH3 branch and do not see that two in the file.
After upgrading to OH3 and after switching to the right branch you may have to reinstall frontail - in that way you also can get rid off the two.

@Wolfgang_S

I am on the right branch. But like others here in the thread the installation of frontnail in openhabian-config failed. So we needed to to adaptat the OH2 frontnail installation by and by hand. Just tried it again:

2021-01-24_08:10:31_CET [openHABian] Switching to branch openHAB3... OK
2021-01-24_08:10:46_CET [openHABian] Updating Linux package information... OK
2021-01-24_08:10:46_CET [openHABian] Installing Frontail prerequsites (NodeJS)... OK
2021-01-24_08:11:20_CET [openHABian] Updating openHAB Log Viewer (frontail)... FAILED
2021-01-24_08:12:11_CET [openHABian] Checking for default openHABian username:password combination... OK
2021-01-24_08:12:11_CET [openHABian] We hope you got what you came for! See you again soon ;)

The related code in openhabian-config that seemed to fail in your case is:

  if [[ -x $(command -v frontail) ]]; then
    echo -n "$(timestamp) [openHABian] Updating openHAB Log Viewer (frontail)... "
    if cond_redirect npm update --force -g frontail; then echo "OK"; else echo "FAILED"; return 1; fi
  else
    echo -n "$(timestamp) [openHABian] Installing openHAB Log Viewer (frontail)... "

It looks like an installed frontail version was found but it was not possible to update it ( the failed command is “npm update --force -g frontail”.

Would you mind to run the command

sudo npm --verbose update --force g frontail

manually. It may help to identify the root cause of the problem.

Did it:

npm info it worked if it ends with ok
npm verb cli [
npm verb cli   '/usr/bin/node',
npm verb cli   '/usr/bin/npm',
npm verb cli   '--verbose',
npm verb cli   'update',
npm verb cli   '--force',
npm verb cli   'g',
npm verb cli   'frontail'
npm verb cli ]
npm info using npm@6.14.10
npm info using node@v12.20.1
npm WARN using --force I sure hope you know what you are doing.
npm verb npm-session 10c4301a7f186e0d
npm verb update computing outdated modules to update
npm verb exit [ 0, true ]
npm timing npm Completed in 797ms
npm info ok

I hope this helps… :wink:
Buy the way: For sure a previous version is there from OH2.

thanks for trying. No, at the moment I don’t have a clue why it fails when you run the update via openhabian-config.

Dear Colleagues,

I’ve build a new OH3 and restore my backup, but it’s now not showing tail logs. I’ve checked and tail is working on web 9001 port, but not showing any results. I’ve also checked and there is no folder /var/log/openhab do you know how to solve it? On karaf console I can see logs

May I ask how you installed OH3 ? Is it an openhabian image installation, apt package download or … ?
The packages ( I checked the debian package ) contain the /var/log/openhab folder and a Readme.txt file that is stored in that folder.
Do you use zram ?

I’ve been using the 1.6.5 openhabian image and it’s usinz zram by default. This issues happening after I’ve installed via openhabian-config moquitto + grafana/influxdb, not sure why?! Afterwards also mosquitto stopped to work. I did some reserachs and correct permissions solve this logview issue

But all the actions you described should ( in means of can’t ) have influence on the existence of the /var/log/openhab folder.

And

fixing permissions does not bring it back.

Continuing the discussion from OH 3 Frontail / Log View:

I have same problem too. After install new openhab with 1.6.5 openhabian image and installed via openhabian-config moquitto + grafana/influxdb.

How you solve correct permissions?

I solved the problem of logviewer with this commands:

sudo mkdir -p /var/log/openhab/
sudo touch /var/log/openhab/openhab.log && sudo chown openhab:openhab /var/log/openhab/openhab.log
sudo touch /var/log/openhab/events.log && sudo chown openhab:openhab /var/log/openhab/events.log

I don’t know what happens but i think openhabian changde a lot of permissions from log. I needed also solve redis logger

For every other beginner:
I had the same issue after upgrading from OH3.0 to latest, fixed it by re-installing from the openhabian-config console

1 Like

Hi all,
In OH 3 /etc/systemd/system/frontail.service the ExecStart= line says:

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

In OH2 I could increase the no. of lines from 200 to 2000, but as can be seen, in OH3 the no. of lines are already at 2000 (I guess), but only 200 lines can be displayed.
Any suggestions on how to increase the displayable lines to 2000?