OH 3 Frontail / Log View

I am facing as it seems the same problem as described in post 1. The only difference is that I’m using a a fresh OpenHAB 3 install via openhabian on ubuntu.

Interestingly the path listed in the log viewer uses openhab2 despite a fresh install.

Reinstalling the log viewer results in an error. As described in post 3

So I did this:

But sudo systemctl deamon-reload gives me “Unknown operation deamon-reload”

In the end the path in the log viewer is changed, but still no logs are shown.

Any ideas?

1 Like

Typo! Correct spelling is daemon

Do I understand you correct, that you did an OH3 install from scratch but openhab2 path is seen in e.g. the frontail setup ?
Please check if you are on the latest version of openhabian-config - there are regular updates that can be applied during startup of openhabian-config.
Besides that please make sure that you have an entry to select the OH3 branch in your openhabian-config configuration file in /etc folder. Not doing that even in case you installed OH3 you might get OH2 related paths in setups for additional software.

/etc/openhabian.conf needs to contain the row

clonebranch=openHAB3

in case you want to be on openHAB3 branch for openhabian-config and related tools.

Thanks for the fast feedback!

Thanks! I literally checked at least 10 times for a typo and didn’t find it :man_facepalming:
Sadly it doesn’t fix the problem.

Correct.

No updates offered. As far as I can tell it is the most recent version → v1.6.2-1047(8ee3a8b)

That might be it. I have “stable” selected. I am surprised though that this results in OH2 related paths, as OH3 was the latest stable version, when I installed.
Can I simply change that now so that the paths are corrected or do I have to reinstall?

Edit the file and reinstall frontail.

Thanks a lot! Together with downgrading socket.io as described above this solved my problem.

Hey Guys,

thanks for sharing this. I faced exaclty the same issue and fixed it with this thread. I have openhabianpi and upgraded to OH3
But I had still the text:

openHAB 2 Log Viewer (frontail)

You can change it in:
sudo nano /usr/lib/node_modules/frontail/web/assets/styles/openhab.css

simply remove the 2 in the .navbar section:

.navbar .navbar-brand::before {
  content: "openHAB Log Viewer (frontail)";
  font-size: 150%;
  padding-right: 30px;
}
1 Like

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?