openHAB 2.2 logging broken

Hi all,

I recently upgraded my openHABian to OH 2.2. Everything went smooth, but somehow I do not get any new log entries since the upgrade (from 2.1).

When upgrading, I got prompted with the setting files to overwrite/or not. I chose “N” as this was indicated as default -> maybe this is the issue?

Karaf does start, but no logs in log:tail. Also the openhab.log and event.log show no new entries since the date of the upgrade

Could someone indicate how to get the log back? Thanks!

Yes, the N was the issue.

When updating an installation through apt (which is the openhabian way), the underlying mechanism will ensure not to overwrite configuration files without asking for permission. The default behavior is not to overwrite, and this is not changeable by repo, but only through apt configuration.

But you could always choose yes and the original configuration will be saved. When choosing No, the new file will be saved, so, you only have to find the new files…
Try to find files named to <some name>.dpkg-dist, change <some name> to <some name>.dpkg-old and change <some name>.dpkg-dist to <some name>

Please stop openHAB before changing the files…

1 Like

More specifically:

sudo mv /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg.old
sudo mv /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg.dpkg-dist /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg

Thanks - problem found and solved!

Hello -

I just upgraded on Windows and have run into the same issue…

When following the upgrade instrustions it specifically states

“Copy and paste the contents of the zip file over your existing install, when prompted do not overwrite existing files”

http://docs.openhab.org/installation/windows.html

Does this need to get revised…what do I need to do to get logging restored on Windows?

Thanks,

Squid

You have to extract rg.ops4j.pax.logging.cfg from the zip file and overwrite the existing one…

Many thanks @Udo_Hartmann for the information.

I don’t know why the forum did not indicate you had replied.

Sorry for the tardy acknowledgement.

Squid

@Udo_Hartmann

Well I spoke too soon.

I replaced the file

org.ops4j.pax.logging.cfg

which was located in USR\ETC with one from the 2.2 snapshot distribution file. I am still not seeing any results in the logging directory.

Suggested next steps??

Hmm… as I did not use openHAB under Windows for a very long time (since 2012…) I’m running out of ideas.

Maybe you should backup your configuration and reinstall openHAB, then move your backup to the fresh installation.
Keep in mind that you must not simply replace all files from userdata\etc but only those which are needed (this will be the tricky part…)

Take a look at http://docs.openhab.org/installation/windows.html#updating-the-openhab-runtime

Hello,

I too have the same problem with the logging and read your post. I don’t have the /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg.dpkg-dist file at all.
Do you have a suggestion what I need to do

How did you install openHAB2?

I installed openhab through the Package Repository Installation described
on docs.openhab.org

Could you post the response of the two following commands:

openhab-cli info
tail /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg

Here are the two responses:

Resonse

There’s a couple of differences to your config that I can see from normal. But as a couple of suggestions:

  1. Do you get different behaviour as non-root?
  2. Does the output of log:tail inside the openhab console provide any details?
  3. Does the logging behave if you restore the file to it’s default?