Openhab log (frontail) not filling up

it was a fresh install

ideas ?

your headline states that frontail is not showing any log entry.
/var/log/poenhab/openhab.log is empty as well ?
Even no entry when openhab service is restarted ?
What is the content of the file /var/lib/openhab/etc/org.ops4j.pax.logging.cfg and what is the content of the file /var/lib/openhab/etc/log4j2.xml ?

  • openhab.log is not empty

  • I have restartet several times

org.ops4j.pax.logging.log4j2.config.file=${karaf.etc}/log4j2.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Appenders>
	<!-- Console appender not used by default (see Root logger AppenderRefs) -->
	<Console name="STDOUT">
		<PatternLayout pattern="%d{HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
	</Console>

	<!-- Rolling file appender -->
	<RollingFile fileName="${sys:openhab.logdir}/openhab.log" filePattern="${sys:openhab.logdir}/openhab.log.%i" name="LOGFILE">
		<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
		<Policies>
			<OnStartupTriggeringPolicy/>
			<SizeBasedTriggeringPolicy size="16 MB"/>
		</Policies>
	</RollingFile>

	<!-- Event log appender -->
	<RollingRandomAccessFile fileName="${sys:openhab.logdir}/events.log" filePattern="${sys:openhab.logdir}/events.log.%i" name="EVENT">
		<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
		<Policies>
			<OnStartupTriggeringPolicy/>
			<SizeBasedTriggeringPolicy size="16 MB"/>
		</Policies>
	</RollingRandomAccessFile>

	<!-- Audit file appender -->
	<RollingRandomAccessFile fileName="${sys:openhab.logdir}/audit.log" filePattern="${sys:openhab.logdir}/audit.log.%i" name="AUDIT">
		<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
		<Policies>
			<OnStartupTriggeringPolicy/>
			<SizeBasedTriggeringPolicy size="8 MB"/>
		</Policies>
	</RollingRandomAccessFile>

	<!-- OSGi appender -->
	<PaxOsgi filter="*" name="OSGI"/>
</Appenders>

<Loggers>
	<!-- Root logger configuration -->
	<Root level="WARN">
		<AppenderRef ref="LOGFILE"/>
		<AppenderRef ref="OSGI"/>
	</Root>

	<!-- Karaf Shell logger -->
	<Logger level="OFF" name="org.apache.karaf.shell.support">
		<AppenderRef ref="STDOUT"/>
	</Logger>

	<!-- Security audit logger -->
	<Logger additivity="false" level="INFO" name="org.apache.karaf.jaas.modules.audit">
		<AppenderRef ref="AUDIT"/>
	</Logger>

	<!-- openHAB specific logger configuration -->

	<Logger level="INFO" name="org.openhab"/>

	<Logger level="ERROR" name="openhab.event.ItemStateEvent"/>
	<Logger level="ERROR" name="openhab.event.ItemAddedEvent"/>
	<Logger level="ERROR" name="openhab.event.ItemRemovedEvent"/>
	<Logger level="ERROR" name="openhab.event.ItemChannelLinkAddedEvent"/>
	<Logger level="ERROR" name="openhab.event.ItemChannelLinkRemovedEvent"/>
	<Logger level="ERROR" name="openhab.event.ThingStatusInfoEvent"/>
	<Logger level="ERROR" name="openhab.event.ThingAddedEvent"/>
	<Logger level="ERROR" name="openhab.event.ThingUpdatedEvent"/>
	<Logger level="ERROR" name="openhab.event.ThingRemovedEvent"/>
	<Logger level="ERROR" name="openhab.event.InboxUpdatedEvent"/>
	<Logger level="ERROR" name="openhab.event.RuleStatusInfoEvent"/>
	<Logger level="ERROR" name="openhab.event.RuleAddedEvent"/>
	<Logger level="ERROR" name="openhab.event.RuleRemovedEvent"/>
	<Logger level="ERROR" name="openhab.event.StartlevelEvent"/>
	<Logger level="ERROR" name="openhab.event.AddonEvent"/>

	<Logger additivity="false" level="INFO" name="openhab.event">
		<AppenderRef ref="EVENT"/>
		<AppenderRef ref="OSGI"/>
	</Logger>

	<Logger level="ERROR" name="javax.jmdns"/>
	<Logger level="ERROR" name="org.jupnp"/>

	<!-- This suppresses all Maven download issues from the log when doing feature installations -->
	<!-- as we are logging errors ourselves in a nicer way anyhow. -->
	<Logger level="ERROR" name="org.ops4j.pax.url.mvn.internal.AetherBasedResolver"/>

	<!-- Filters known issues of pax-web (issue link to be added here). -->
	<!-- Can be removed once the issues are resolved in an upcoming version. -->
	<Logger level="OFF" name="org.ops4j.pax.web.pax-web-runtime"/>

	<!-- Filters known issues of lsp4j, see -->
	<!-- https://github.com/eclipse/smarthome/issues/4639 -->
	<!-- https://github.com/eclipse/smarthome/issues/4629 -->
	<!-- https://github.com/eclipse/smarthome/issues/4643 -->
	<!-- Can be removed once the issues are resolved in an upcoming version. -->
	<Logger level="OFF" name="org.eclipse.lsp4j"/>

	<!-- Filters warnings for events that could not be delivered to a disconnected client. -->
	<Logger level="ERROR" name="org.apache.cxf.jaxrs.sse.SseEventSinkImpl"/>

	<!-- Filters known issues of KarServiceImpl, see -->
	<!-- https://github.com/openhab/openhab-distro/issues/519#issuecomment-351944506 -->
	<!-- Can be removed once the issues are resolved in an upcoming version. -->
	<Logger level="ERROR" name="org.apache.karaf.kar.internal.KarServiceImpl"/>

	<!-- Filters warnings about unavailable ciphers when JCE is not installed, see -->
	<!-- https://github.com/openhab/openhab-distro/issues/999 -->
	<Logger level="ERROR" name="org.apache.karaf.shell.ssh.SshUtils"/>

	<!-- Filters known issues of javax.mail, see -->
	<!-- https://github.com/openhab/openhab-addons/issues/5530 -->
	<Logger level="ERROR" name="javax.mail"/>

	<!-- Filters disconnection warnings of the ChromeCast Java API, see -->
	<!-- https://github.com/openhab/openhab-addons/issues/3770 -->
	<Logger level="ERROR" name="su.litvak.chromecast.api.v2.Channel"/>

	<!-- Added by Karaf to prevent debug logging loops, see -->
	<!-- https://issues.apache.org/jira/browse/KARAF-5559 -->
	<Logger level="WARN" name="org.apache.sshd"/>
</Loggers>

</Configuration

Content of both files look ok.
frontail is running ( of course it must otherwise you can’t connect with your browser ) ?

sudo systemctl status openhab

What is the output of

grep openhab /etc/systemd/system/frontail.service

openhab.service - openHAB - empowering the smart home
Loaded: loaded (/lib/systemd/system/openhab.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-01-30 20:08:29 CET; 14h ago
Docs: Introduction | openHAB
https://community.openhab.org
Main PID: 691 (java)
Tasks: 667 (limit: 4915)
CGroup: /system.slice/openhab.service
└─691 /usr/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr

After=openhab.service
PartOf=openhab.service
ExecStart=/usr/lib/node_modules/frontail/bin/frontail --ui-highlight --ui-highlight-preset /usr/lib/node_modules/frontail/preset/openhab_dark.json -t openhab_dark -l 2000 -n 200 /var/log/openhab/openhab.log /var/log/openhab/events.log
Group=openhab

I had a similar problem.

this post helped me get it sorted,

Also looks ok so far.
One more check

sudo systemctl status frontail

Frontail was installed via openhabian-config ? When ? Could you try a reinstall of frontail via openhabian-config ( in case you use openhabian-config ).

frontail.service - Frontail openHAB instance, reachable at http://openHABianDevice:9001
Loaded: loaded (/etc/systemd/system/frontail.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2021-01-31 11:24:14 CET; 2h 35min ago
Docs: GitHub - mthenw/frontail: 📝 streaming logs to the browser. Sponsored by https://cloudash.dev
Main PID: 26007 (node)
Tasks: 12 (limit: 4915)
CGroup: /system.slice/frontail.service
├─26007 node /usr/lib/node_modules/frontail/bin/frontail --ui-highlight --ui-highlight-preset /usr/lib/node_modules/front
└─26015 tail -n 200 -F /var/log/openhab/openhab.log /var/log/openhab/events.log

how can I reinstall frontail ?
Yes I use openhabian…

menu entry 21 in openhabian-config

sudo openhabian-config
1 Like

I have tried, same problem…

Which browser do you use ?
In case it is firefox or chrome is there any error message in the web console ?

iPad = safari
PC = Mozilla

any error or warning message in it’s webconsole ?

Could you also check this:

cd /lib/node_modules/frontail
npm list | grep socket.io

grep socket.io
├─┬ socket.io@2.4.0
│ ├── socket.io-adapter@1.1.2
│ ├─┬ socket.io-client@2.4.0
│ │ ├─┬ socket.io-parser@3.3.1
│ └─┬ socket.io-parser@3.4.1

socket.io@2.4.0 should be the problem.
Please try following steps:

  • login to openhab host
  • become root: sudo bash
  • change direcotry to: cd /usr/lib/node_modules/frontail
  • upgrade the socket.io package: npm install socket.io @2.4.1
  • restart frontail: systemctl restart frontail
2 Likes

Yes it works !

Thank you very much for your support.
I hope that this solution will help many other users!

1 Like

Hi, I’ve got same issue and discovered that since January 2 threre is no update of the long. Neither in the frontail nor in the log file.
I tried to follow all above and update socket.io from 2.3.0 to 2.4.1 but it stayed 2.3.0.
├─┬ socket.io@2.3.0
│ ├── socket.io-adapter@1.1.2
│ ├─┬ socket.io-client@2.3.0
│ │ ├─┬ socket.io-parser@3.3.2
│ └─┬ socket.io-parser@3.4.1

Any idea, why the update fails? And if this might be the rootcause for not running frontail?

UPDATE: not running log at frontail was obviously not an issue of socket.io version. After downgrade to 2.3.0 (as indicated in other threads) and re-install latest stable version of openhab (not only upgrade to the latest version), it logs again.