Empty log in fresh installation

openhabian on raspberry 3b+

after “dispatching event to subscriber takes more than 5000ms” striked again, i decided make a whole new setup.
Everything works fine but i dont get any text through frontail.

  • i checked the path (/var/log/openhab/openhab.log /var/log/openhab/events.log) it is correct but i have 8 files for openhab.log and 8 files for events.log. And none of them is empty.
  • i upgraded everything from openhabian-config
  • i checked the frontail.services and everything seems to be okay

So a tail -f /var/log/openhab/openhab.log shows incoming events?
Does a reboot or a sudo service frontail restart help?


This is supposed to be like that. Logrotate is responsible for this

Hey Felix, thanks for your answer.
yes, there were events coming into openhab.log. and i rebooted the whole system several times.
Now i decided to do a third trie and installed everything again. new sd-card and new raspberry. now i get on startup:

login as: openhabian
openhabian@xxx.xxx.xxx.xxx’s password:
Linux openHABianDevice 5.4.79-v7+ #1373 SMP Mon Nov 23 13:22:33 GMT 2020 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: Read-only file system
/usr/local/bin/FireMotD: line 205: : No such file or directory
/usr/local/bin/FireMotD: line 206: : No such file or directory
rm: missing operand
Try ‘rm --help’ for more information.
mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: Read-only file system
/usr/local/bin/FireMotD: line 341: : No such file or directory
/usr/local/bin/FireMotD: line 342: : No such file or directory
/usr/local/bin/FireMotD: line 343: : No such file or directory
/usr/local/bin/FireMotD: line 344: : No such file or directory
/usr/local/bin/FireMotD: line 347: : No such file or directory
rm: missing operand
Try ‘rm --help’ for more information.
mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: Read-only file system
/usr/local/bin/FireMotD: line 375: : No such file or directory
/usr/local/bin/FireMotD: line 376: : No such file or directory
/usr/local/bin/FireMotD: line 377: : No such file or directory
/usr/local/bin/FireMotD: line 378: : No such file or directory
/usr/local/bin/FireMotD: line 379: : No such file or directory
rm: missing operand
Try ‘rm --help’ for more information.
mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: Read-only file system
/usr/local/bin/FireMotD: line 387: : No such file or directory
/usr/local/bin/FireMotD: line 388: : No such file or directory
rm: missing operand
Try ‘rm --help’ for more information.
/usr/local/bin/FireMotD: line 395: cannot create temp file for here-document: Re ad-only file system
/usr/local/bin/FireMotD: line 407: cannot create temp file for here-document: Re ad-only file system
/usr/local/bin/FireMotD: line 408: cannot create temp file for here-document: Re ad-only file system
mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: Read-only file system
/usr/local/bin/FireMotD: line 413: : No such file or directory
/usr/local/bin/FireMotD: line 414: : No such file or directory
/usr/local/bin/FireMotD: line 415: : No such file or directory
/usr/local/bin/FireMotD: line 416: : No such file or directory
/usr/local/bin/FireMotD: line 417: : No such file or directory
/usr/local/bin/FireMotD: line 418: : No such file or directory
rm: missing operand
Try ‘rm --help’ for more information.
/usr/local/bin/FireMotD: line 425: cannot create temp file for here-document: Re ad-only file system
/usr/local/bin/FireMotD: line 427: cannot create temp file for here-document: Re ad-only file system
/usr/local/bin/FireMotD: line 429: cannot create temp file for here-document: Re ad-only file system
mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: Read-only file system
/usr/local/bin/FireMotD: line 434: : No such file or directory
/usr/local/bin/FireMotD: line 435: : No such file or directory
/usr/local/bin/FireMotD: line 436: : No such file or directory
/usr/local/bin/FireMotD: line 437: : No such file or directory
/usr/local/bin/FireMotD: line 438: : No such file or directory
/usr/local/bin/FireMotD: line 439: : No such file or directory
rm: missing operand
Try ‘rm --help’ for more information.
/usr/local/bin/FireMotD: line 446: cannot create temp file for here-document: Re ad-only file system
/usr/local/bin/FireMotD: line 448: cannot create temp file for here-document: Re ad-only file system
/usr/local/bin/FireMotD: line 450: cannot create temp file for here-document: Re ad-only file system
mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: Read-only file system
/usr/local/bin/FireMotD: line 454: : No such file or directory
/usr/local/bin/FireMotD: line 455: : No such file or directory
/usr/local/bin/FireMotD: line 456: : No such file or directory
/usr/local/bin/FireMotD: line 457: : No such file or directory
/usr/local/bin/FireMotD: line 458: : No such file or directory
/usr/local/bin/FireMotD: line 459: : No such file or directory
rm: missing operand
Try ‘rm --help’ for more information.
mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: Read-only file system
/usr/local/bin/FireMotD: line 498: : No such file or directory
/usr/local/bin/FireMotD: line 499: : No such file or directory
rm: missing operand
Try ‘rm --help’ for more information.
mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: Read-only file system
/usr/local/bin/FireMotD: line 518: : No such file or directory
/usr/local/bin/FireMotD: line 519: : No such file or directory
/usr/local/bin/FireMotD: line 520: : No such file or directory
rm: missing operand
Try ‘rm --help’ for more information.

i realy dont know what i am doing wrong…

This doesn’t look like a frontail problem. This doesn’t look right at all.

Did you use the openhabian installation tool?

I Downloaded the openhabian-pi-raspios32-v1.6.2b.img.xz from github and burned the image on the sd-card with balena etcher as recommended. then i inserted the sd card to the raspberry, opened the ip adress in my browser and waited.
Now i did this whole process aghain and i saw something went wrong in one line during the installation with samba and log. but before i was able to copy the line, the browser went to the “klick here after reboot” page.
Now the system starts but i dont get logs like before.

could it be a problem with my sd cards?

The same issue is mentioned here

This is being caused by NPM package socket.io in version 2.4.0.
It can be solved by downgrading socket.io to version 2.3.0:

  • login to openhab
  • become root: sudo bash
  • change direcotry to: cd /usr/lib/node_modules/frontail
  • downgrade the socket.io package: npm install socket.io@2.3.0
  • restart frontail: systemctl restart frontail

As long as this problem exist in socket.io 2.4.0 and frontail depends on 2.4.0 this will pop up again in case frontail is being reinstalled

3 Likes

@Wolfgang_S I still have the same issue. :frowning:

As suggested, I have downported socket.io to 2.3.0, restarted the frontail service and rebooted the whole PI later.

I figured out, frontail in general seems to work. I added manually an entry in /var/log/openhab/openhab.log and the entry appeared immediately on the frontail-webpage host:9001.

It seems openHAB does not write any log anymore. I deleted all old log-files during testing. No new entries have reached so far. Similar what was mentioned already earlier here.
My openHAB status is similar to the one here

[16:50:31] thefechner@wendy:/usr/lib/node_modules/frontail$ sudo systemctl status openhab.service
● openhab.service - openHAB - empowering the smart home
   Loaded: loaded (/lib/systemd/system/openhab.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2021-01-08 16:01:16 CET; 59min ago
 Docs: https://www.openhab.org/docs/
       https://community.openhab.org
 Main PID: 762 (java)
Tasks: 176 (limit: 4915)
   CGroup: /system.slice/openhab.service
       └─762 /usr/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/openhab/runtime -Dopenhab.userdata=/var/lib/openha

Jan 08 16:01:44 wendy karaf[762]:         at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1118)
Jan 08 16:01:44 wendy karaf[762]:         at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1074)
Jan 08 16:01:44 wendy karaf[762]:         at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138)
Jan 08 16:01:44 wendy karaf[762]:         at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105)
Jan 08 16:01:44 wendy karaf[762]:         at java.base/java.lang.Thread.run(Thread.java:834)
Jan 08 16:01:44 wendy karaf[762]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Null object returned for RollingFile in Appenders. Ignored FQCN: org.apache.logging.log4j.spi.Abstra
Jan 08 16:01:44 wendy karaf[762]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Null object returned for RollingRandomAccessFile in Appenders. Ignored FQCN: org.apache.logging.log4
Jan 08 16:01:44 wendy karaf[762]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to locate appender "LOGFILE" for logger config "root" Ignored FQCN: org.apache.logging.log4j.
Jan 08 16:01:44 wendy karaf[762]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to locate appender "AUDIT" for logger config "org.apache.karaf.jaas.modules.audit" Ignored FQ
Jan 08 16:01:44 wendy karaf[762]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to locate appender "EVENT" for logger config "openhab.event" Ignored FQCN: org.apache.logging
l

Has anyone an idea? :frowning:

Or any idea what I can check?

Cheers
Steffen

EDIT:
In the meantime, I tried to logon to the karaf console and executed log:display. Then an huge bunch of message appeared. Most of them errors due to authorization on persistence files (*.rdd). Just after this, frontail web showed all messages, too. Now, for whatever reason it seems to work. At least the logging.

Now, I have to figure out how and why I have screwed authorization for persistence files. Maybe via git. Don’t know yet.

So, I think in my case, there have been multiple issues overlapping. But the issue here in the thread seems to be solved. Thank you!

When do run the command

ps -ef|grep java |grep /var/log

you should see a very long line of arguments.
Does it contain these two:

-Dopenhab.logdir=/var/log/openhab

and

-Dkaraf.log=/var/log/openhab
1 Like

@Wolfgang_S Thank you very much for your quick help. Much appreciated.:+1:

Yes, both entries are there.

In the meantime, I tried to logon to the karaf console and executed log:display. Then an huge bunch of message appeared. Most of them errors due to authorization on persistence files (*.rdd). Just after this, frontail web showed all messages, too. Now, for whatever reason it seems to work. At least the logging.

Now, I have to figure out how and why I have screwed authorization for persistence files. Maybe via git. Don’t know yet.

So, I think in my case, there have been multiple issues overlapping. But the issue here in the thread seems to be solved. Thank you!

1 Like