OH 3 Frontail / Log View

Hi Guys,

i can’t find any Frontail View (OH3) of my logs ? like on OH2

can someone guide me please, thanks

EDIT:
Console/Karaf: log:tail
or Terminal: openhab-cli showlogs

helped me out so far.

3 Likes

Frontail is included in openhabian and can be choosen as an additional component.
You maybe have to reinstall it, if you have upgraded and are using openhabian.

Otherwise you would have to install it manually.


But i have no tutorial for that in mind for now.
2 Likes

thanks but


Hm,

@mstormi are there any known issues for this?
I have found nothing on github so far.

No.

log is empty, how can i fix it ?
thanks

do you have a logfile under /var/log/openhab?
Or is frontail still pointing to /var/log/openhab2

this log stopped yesterday night ( while updating from OH 2 to OH 3 )

2020-12-22 00:14:30.072 [WARN ] [g.mqtt.handler.AbstractBrokerHandler] - Tried to unsubscribe org.openhab.binding.mqtt.homeassistant.internal.discovery.HomeAssistantDiscovery@edb12a from  discovery topic +/+/$homie on broker mqtt:broker:riot but topic not registered at all. Check discovery logic!
2020-12-22 00:14:30.075 [WARN ] [g.mqtt.handler.AbstractBrokerHandler] - Tried to unsubscribe org.openhab.binding.mqtt.homeassistant.internal.discovery.HomeAssistantDiscovery@edb12a from  discovery topic +/+/$homie on broker mqtt:systemBroker:embedded-mqtt-broker but topic not registered at all. Check discovery logic!
2020-12-22 00:14:30.328 [INFO ] [ab.ui.habpanel.internal.HABPanelTile] - Stopped HABPanel
2020-12-22 00:14:31.042 [INFO ] [basic.internal.servlet.WebAppServlet] - Stopped Basic UI
2020-12-22 00:14:33.286 [WARN ] [g.mqtt.handler.AbstractBrokerHandler] - Trying to dispose handler mqtt:systemBroker:embedded-mqtt-broker but connection is already null. Most likely this is a bug.
2020-12-22 00:14:39.319 [WARN ] [core.thing.internal.ThingManagerImpl] - Disposing handler for thing 'miio:vacuum:046C6805' takes more than 5000ms.
2020-12-22 00:14:40.916 [INFO ] [org.openhab.ui.internal.UIService   ] - Stopped UI

yes correct but your log is showing the OH2 logging.
Also in your screenshot frontail is linked to /var/log/openhab2

Is this still the case?

yes , dunno why.

The Screenshot is what i get with:
http://openhab.local:9001/

dunno why its showing the OH2 Log in this directory.

the only way i see the current log is with Console -> log:tail. but its a bit annoying.

try to remove frontail and install again via openhabian-config

I am currently struggling that i have only openhab2 logs and no /var/log/openhab :wink:
Frontail is pointing to the correct directory, but there are no files…

how to do so? and thanks for your help!

I have the same issue. Here my quick and dirty fix until we get a better solution.

Create a symbolic link for openhab.log and events.log like this:

/var/log/openhab2$ sudo ln -s ../openhab/events.log ./events.log

/var/log/openhab2$ sudo ln -s ../openhab/openhab.log ./openhab.log

Then stop the frontail service and restart the service

    sudo service frontail stop
    sudo service frontail start

Reload in browser

I’ve the same issue.
I found the file frontail.service in directory /etc/systemd/system

Here are two pointers to the old openhab2-directories:

[Service]
ExecStart=/usr/lib/node_modules/frontail/bin/frontail --ui-highlight --ui-highlight-preset /usr/lib/node_modules/frontail/preset/openhab.json -t openhab -l 2000 -n 200 /var/log/openhab2/openhab.log /var/log/openhab2/events.log

But this file is readonly nevertheless I’ve stopped the frontail service befor opening it with vim.
Does anyone know how to edit this file?

Did you open it with sudo ???

@hmerk You are true, and I’m a beginner in this sudo-stuff! :wink:

The frontail-viewer with http://192.168.178.56:9001/ is running now with correct openHAB3-logs.
Here is what I’ve done:

  • open putty, navigate to directory /etc/systemd/system
  • stop frontail service with “sudo service frontail stop”
  • open editor with “sudo vim frontail.service”
  • change two times “openhab2” to “openhab” in line “ExecStart=”
  • save with [esc] “:w”
  • quit vim with “:q”
  • make something what’s nessecary, but don’t know why: “sudo systemctl daemon-reload”
  • restart frontail service with “sudo service frontail start”

There are two more lines in frontail.service with “openhab2”. Does anyone know, if these also have to be changed?

9 Likes

great finding michael, thanks for your step by step guide.

This is my frontail.service

[Unit]
Description=Frontail openHAB instance, reachable at http://%H:9001
Documentation=https://github.com/mthenw/frontail
Documentation=https://github.com/openhab/openhabian/issues/28
After=openhab.service

[Service]
Type=simple
ExecStart=/usr/bin/frontail --ui-highlight --ui-highlight-preset /usr/lib/node_modules/frontail/preset/openhab.json -t openhab -l 2000 -n 200 /var/log/openhab/openhab.log /var/log/openhabt/events.log
Restart=always
User=openhab
Group=openhab
Environment=PATH=/usr/bin/
Environment=NODE_ENV=production
WorkingDirectory=/usr/bin/

[Install]
WantedBy=multi-user.target

sadly it didn’t work for me. i also changed the “After=openhab.service”
in total there is 3 x “openhab2” in it, on my side.

how does yours look like ? thanks!

PS: for the follow ups, to Write and Exit the vim type “:” then you are on the end of the editor and see the “:” and now just type “:wq” ( write and quit )

  • :q to quit (short for :quit)
  • :q! to quit without saving (short for :quit!)
  • :wq to write and quit
1 Like

@RiotMode You have a typo in your path to event.log, there is a superfluent „t“.
Regarding changing openhab2.service to openhab.service, check which one exists. If it is still openhab2.service, frontail will wait forever, cause no openhab.service is started at all.

Thanks for your help Hans-Jörg, i found the “status” command and get this:

[18:58:09] openhabian@openhab:/var/log/openhab$ sudo systemctl status openhab2.service
Unit openhab2.service could not be found.
[18:58:21] openhabian@openhab:/var/log/openhab$ sudo systemctl status openhab.service
● openhab.service - openHAB - empowering the smart home
   Loaded: loaded (/usr/lib/systemd/system/openhab.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2020-12-22 20:03:36 CET; 2 days ago
     Docs: https://www.openhab.org/docs/
           https://community.openhab.org
 Main PID: 2903 (java)
    Tasks: 221 (limit: 2182)
   CGroup: /system.slice/openhab.service
           └─2903 /usr/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/openhab/runtime -Dopenhab.userdata=/var/lib/openhab -Dopenhab.lo
Dec 25 03:14:31 openhab karaf[2903]:         at org.ops4j.pax.logging.log4j2.internal.PaxLoggingServiceImpl$1ManagedPaxLoggingService.updated(PaxLoggingServiceImpl.java:569)
Dec 25 03:14:31 openhab karaf[2903]:         at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)
Dec 25 03:14:31 openhab karaf[2903]:         at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)
Dec 25 03:14:31 openhab karaf[2903]:         at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)
Dec 25 03:14:31 openhab karaf[2903]:         at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1405)
Dec 25 03:14:31 openhab karaf[2903]:         at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138)
Dec 25 03:14:31 openhab karaf[2903]:         at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105)
Dec 25 03:14:31 openhab karaf[2903]:         at java.base/java.lang.Thread.run(Thread.java:834)
Dec 25 03:14:31 openhab karaf[2903]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Null object returned for RollingFile in Appenders. Ignored FQCN: org.apache.logging.log4j.spi.AbstractLogger    
Dec 25 03:14:31 openhab karaf[2903]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to locate appender "LOGFILE" for logger config "root" Ignored FQCN: org.apache.logging.log4j.spi.Abstract

if i check “openhab-cli showlogs” i see this:

[18:59:41] openhabian@openhab:/var/log/openhab$ openhab-cli showlogs

==> /var/log/openhab/audit.log <==

==> /var/log/openhab/events.log <==
2020-12-25 18:59:35.512 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Network_PacketsRecevied' changed from 13642304 to 13645317
2020-12-25 18:59:38.576 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Router2_Time' changed from 15.0 ms to 18.0 ms
2020-12-25 18:59:41.626 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Memory_Used_Percent' changed from 58.0 to 58.3
2020-12-25 18:59:41.630 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Memory_Used' changed from 565 to 568
2020-12-25 18:59:41.635 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Sensor_CPUTemp' changed from 58.0 to 57.5
2020-12-25 18:59:41.649 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Memory_Available' changed from 409 to 406
2020-12-25 18:59:41.653 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Memory_Available_Percent' changed from 42.0 to 41.7
2020-12-25 18:59:43.657 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Router2_LastSeen' changed from 2020-12-25T18:58:33.465+0100 to 2020-12-25T18:59:38.571+0100
2020-12-25 18:59:44.671 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Sensor_CPUTemp' changed from 57.5 to 56.9
2020-12-25 18:59:47.659 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'CurrDateTime' changed from 2020-12-25T18:58:47.656+0100 to 2020-12-25T18:59:47.658+0100

==> /var/log/openhab/openhab.log <==
2020-12-22 19:42:30.565 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Removed accessory java.util.concurrent.CompletableFuture@1331be5[Completed normally]
2020-12-22 19:42:30.568 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
2020-12-22 19:42:30.570 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Removed accessory java.util.concurrent.CompletableFuture@1491eb1[Completed normally]
2020-12-22 19:42:30.573 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
2020-12-22 19:42:30.574 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Removed accessory java.util.concurrent.CompletableFuture@1f01870[Completed normally]
2020-12-22 19:42:30.577 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
2020-12-22 19:42:32.597 [TRACE] [impl.connections.SubscriptionManager] - Removing 0 reverse connections from subscription manager
2020-12-22 19:42:32.599 [TRACE] [impl.connections.SubscriptionManager] - Subscription sizes are 0 and 0
2020-12-22 19:42:32.752 [WARN ] [g.mqtt.handler.AbstractBrokerHandler] - Trying to dispose handler mqtt:systemBroker:embedded-mqtt-broker but connection is already null. Most likely this is a bug.        
2020-12-22 19:42:35.707 [INFO ] [org.openhab.ui.internal.UIService   ] - Stopped UI

==> /var/log/openhab/events.log <==
2020-12-25 18:59:47.705 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Memory_Used_Percent' changed from 58.3 to 58.6
2020-12-25 18:59:47.709 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Memory_Used' changed from 568 to 571
2020-12-25 18:59:47.711 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Sensor_CPUTemp' changed from 56.9 to 58.0
2020-12-25 18:59:47.719 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Memory_Available' changed from 406 to 404
2020-12-25 18:59:47.721 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Memory_Available_Percent' changed from 41.7 to 41.4
2020-12-25 18:59:50.730 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Memory_Used_Percent' changed from 58.6 to 58.4
2020-12-25 18:59:50.734 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Memory_Used' changed from 571 to 569
2020-12-25 18:59:50.745 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Memory_Available' changed from 404 to 405
2020-12-25 18:59:50.748 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Memory_Available_Percent' changed from 41.4 to 41.6
2020-12-25 18:59:51.227 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:broker:riot' changed from OFFLINE (COMMUNICATION_ERROR): io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /192.168.1.100:1883 to OFFLINE

you have a typo here as wrote by Hans:

/var/log/openhabt/events.log

should be without the “t”:

/var/log/openhab/events.log