Karaf Upgrade

All,

I have just merged a major change into the distro (available since build #1009): The used Karaf version has been updated from 4.0.8 to 4.1.2.
Apache Karaf is used for all the underlying OSGi container management. You can find details of the changes in the Karaf release notes:

Obviously, not all of this will have a direct impact on openHAB, the most immediately visible one is probably the more colorful shell prompt.

A breaking change is the switch from log4j to log4j2, because this changes the expected syntax in the file org.ops4j.pax.logging.cfg. For this reason, the file is overwritten by the update (if you are using APT, please choose “Y” when being prompted for that file). Your old version will be saved as org.ops4j.pax.logging.cfg.bak (resp. org.ops4j.pax.logging.cfg.dpkg-old for APT). So if you have done manual changes in your logging configuration, please note that they won’t be considered anymore.

Please share if you see any bigger regressions through this Karaf upgrade and help us identifying the cause of it.
Also feel free to post cool new features that you discovery (I haven’t myself had the time to go through all the details of the Karaf release notes…).

Regards,
Kai

4 Likes

Hi!

I’ve updated openHAB to build #1009 to test this and I no longer see PaperUI on the dashboard.
It loads properly, though:

2017-08-13 12:19:58.049 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui

It’s available from http://openhab:8080/paperui/index.html - it has ESH branding though.
Raised openhab-core#187

Looks like a local issue - are you sure that you have waited long enough to download the new artifacts after the launch? Post further infos on the issue.

FTR, we have just identified a first regression which is about authentication support in the image/video proxying - thanks @michaeljoos for reporting it!

Hello & first of all, thanks for the great work!

Unfortunatly i wasn’t aware of this and choose “keep existing version” when i updated which totally stopped my logging (Unbuntu 16.04 LTS). In case others ran into this as well, here is how i fixed it:
Stop openhab and do:

jarvis@JARVIS-MKII:~$ sudo mv /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg.OLD
jarvis@JARVIS-MKII:~$ sudo cp /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg.dpkg-dist /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg

After this, logging resumed after restarting openHAB.
HTH,
Best Regards,
-OLI

2 Likes

Hi,

I had these custom log settings before this update:

zwave logger

log4j.logger.org.openhab.binding.zwave = INFO, zwave, osgi:*
log4j.additivity.org.openhab.binding.zwave = false

File appender - zwave.log

log4j.appender.zwave=org.apache.log4j.RollingFileAppender
log4j.appender.zwave.layout=org.apache.log4j.PatternLayout
log4j.appender.zwave.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%-26.26c{1}] - %m%n
log4j.appender.zwave.file=${openhab.logdir}/zwave.log
log4j.appender.zwave.append=true
log4j.appender.zwave.maxFileSize=10MB
log4j.appender.zwave.maxBackupIndex=10

Autorule Logger

log4j.logger.org.eclipse.smarthome.model.script.Autorule = INFO, Autorule

Autorule Appender

log4j.appender.Autorule=org.apache.log4j.RollingFileAppender
log4j.appender.Autorule.layout=org.apache.log4j.PatternLayout
log4j.appender.Autorule.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n
log4j.appender.Autorule.file=${openhab.logdir}/autorule.log
log4j.appender.Autorule.append=true
log4j.appender.Autorule.maxFileSize=10MB
log4j.appender.Autorule.maxBackupIndex=10

What would the proper syntax with log4j2 be? :slight_smile:

How about reading the log4j2 documentation?

Good news, this issue is resolved and in the latest distro #1012 the proxy should work smoothly again!

Just as a warning: We have just identified another issue that is likely due to the Karaf upgrade - I therefore strongly advice to NOT use the addons.kar files for the moment, but rather rely on the remote repo for the installation of add-ons. If any Karaf expert is reading this, I’d be happy for any hints, suggestions and help on resolving this issue!

here is an example:

1 Like

Since the Karaf upgrade the console colors have changed. Valid commands are now in dark blue, which I cannot read on my screen. I have tried changing colors in org.apache.karaf.log.cfg as per http://tmielke.blogspot.ch/2013/04/how-to-chang-colors-in-karaf-shell.html to no avail:

#
# ANSI Colors
#
fatalColor = 31;1
errorColor = 31;1
warnColor = 35
infoColor = 36
debugColor = 39
traceColor = 39

Can anyone point me in right direction to get back to plain white color scheme (or at least change dark blue to something else)?

Edit: I found out how to disable colors by adding

setopt disable-highlighter

to shell.init.script. Still not clear though why my changes to colors didn’t work (see above).

1 Like