New folder structure

Should be kept as well now!

:+1:

Warning (apt)

I want to emphasize, that apt upgrade is currently in fact breaking your openHAB system.
This is a short time error which will probably be solved soon.
Please stay clear from upgrading for a couple of days.

In all cases this is only a temporary problem and you will be able to apt upgrade to the soon to be released working release.

Updates to follow.

And what to do if you have already updated and openHAB2 no longer run?

If you can wait: just wait for the next upgrade.
If you need your system now: A fix is underway, check: https://github.com/openhab/openhab-distro/pull/318#issuecomment-259861176

Anyone having problems Can you try running the following lines and let me know if this works. I would still recommend that you do not upgrade until the install packages have been fixed.

mv /usr/share/openhab2/runtime/karaf/etc/* /var/lib/openhab2/etc/
sudo sed -i -e 's|/usr/share/openhab2/runtime/karaf/bin/|/usr/share/openhab2/runtime/bin/|g' /etc/init.d/openhab2 /usr/lib/systemd/system/openhab2.service
sudo sed -i -e 's|OPENHAB_USERDATA="${OPENHAB_HOME}/userdata"|OPENHAB_USERDATA="/var/lib/openhab2"|g' /usr/share/openhab2/runtime/bin/oh2_dir_layout
sudo sed -i -e 's|OPENHAB_CONF="${OPENHAB_HOME}/conf"|OPENHAB_CONF="/etc/openhab2"|g' /usr/share/openhab2/runtime/bin/oh2_dir_layout
sudo sed -i -e 's|OPENHAB_LOGDIR="${OPENHAB_USERDATA}/logs"|OPENHAB_LOGDIR="/var/log/openhab2"|g' /usr/share/openhab2/runtime/bin/oh2_dir_layout

sudo systemctl daemon-reload
sudo service openhab2 start
5 Likes

I can confirm, appears to have resolved the issue. I’m back online.

My Things are still there, but bindings etc have been lost - which is pretty normal.

I’ll reload them and report back.

Big bunch of errors still thrown in the log though. Do you need a log file?

Thanks Duncan

Just to make sure, yes please. The changes I make above are completely reversed with another apt upgrade, so you can freely apply this without worrying about any special undos.

openhab.xml (763.8 KB)

Here’s the log file.

Can’t SSH into the console now:

And the manual console has moved from: /usr/share/openhab2/runtime/karaf/bin/client

pi@raspberrypi:/ $ ssh -p 8101 openhab@localhost
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
19:1c:f9:07:be:6f:ae:e4:9f:ca:bd:e7:5b:8d:9d:8d.
Please contact your system administrator.
Add correct host key in /home/pi/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/pi/.ssh/known_hosts:1
  remove with: ssh-keygen -f "/home/pi/.ssh/known_hosts" -R [localhost]:8101
RSA host key for [localhost]:8101 has changed and you have requested strict checking.
Host key verification failed.

EDIT:
Found the solution

Ran the following:
ssh-keygen -f “/home/pi/.ssh/known_hosts” -R [localhost]:8101
ssh-keygen -R openhab@localhost

1 Like

Is there any hotfix available to get the system up and running including bindings?
The fix mentioned above helps to start openhab2, but binding (though they are configured) are still not available.

Hi @robin.muellerbady, have you set your parameters in /etc/openhab2/addons/services.cfg?

@Duncan_Pullen, if you clear the logs and perform a sudo service openhab2 restart do these errors persist?

I don’t have any folder like that. Is it mandatory or part of the new folder structure?

Sorry @robin.muellerbady, I mixed up the path, it is /etc/openhab2/services/addons.cfg and should have always been in your installation. You can set a comma separated list of bindings to install on a successful update here.

Ok, thank you. This config file exists and contains all necessary bindings and actions (in my case: sonos, knx, astro + telegram). However, neither the knx nor the sitemaps are working correctly. Is this due to this issue and will be resolved with the upgrade?

Quite honestly, I don’t know. When you say they aren’t working correctly, what’s happening in your logs?

Try also:

cp /usr/share/openhab2/runtime/karaf/etc/* /var/lib/openhab2/etc/

I’ve edited my post as above

Yes, it worked. got me up and running again anyway.

Now all my logs are messed up, and I can’t find org.ops4j.pax.logging.cfg anymore - where did you guy’s put it?

It should now be in /var/lib/openhab2/etc. this means it shouldn’t get overwritten each time you update anymore!

OK, found it /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg

Thank you! At least, the sitemap is back to work :slight_smile: Unfortunately, there are still errors and my KNX binding seem not to be able to write back to the KNX bus. Some logs are:

22:23:53.608 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Light_Studio_Front_Dimmer' received command ON
22:23:53.609 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/Light_Studio_Front_Dimmer] | {org.osgi.service.event.EventHandler, tuwien.auto.calimero.process.ProcessListener}={event.topics=openhab/*, component.name=org.openhab.binding.knx, component.id=237, service.id=427, service.bundleid=195, service.scope=bundle} | Bundle(org.openhab.binding.knx_1.9.0.201611110211 [195])]
java.lang.ClassCastException
22:23:54.758 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Light_Studio_Front_Dimmer' received command OFF
22:23:54.758 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/Light_Studio_Front_Dimmer] | {org.osgi.service.event.EventHandler, tuwien.auto.calimero.process.ProcessListener}={event.topics=openhab/*, component.name=org.openhab.binding.knx, component.id=237, service.id=427, service.bundleid=195, service.scope=bundle} | Bundle(org.openhab.binding.knx_1.9.0.201611110211 [195])]
java.lang.ClassCastException
22:23:56.304 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Light_Studio_Middle_Dimmer' received command ON
22:23:56.305 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/Light_Studio_Middle_Dimmer] | {org.osgi.service.event.EventHandler, tuwien.auto.calimero.process.ProcessListener}={event.topics=openhab/*, component.name=org.openhab.binding.knx, component.id=237, service.id=427, service.bundleid=195, service.scope=bundle} | Bundle(org.openhab.binding.knx_1.9.0.201611110211 [195])]
java.lang.ClassCastException
22:23:56.703 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Light_Studio_Middle_Dimmer' received command OFF
22:23:56.704 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/Light_Studio_Middle_Dimmer] | {org.osgi.service.event.EventHandler, tuwien.auto.calimero.process.ProcessListener}={event.topics=openhab/*, component.name=org.openhab.binding.knx, component.id=237, service.id=427, service.bundleid=195, service.scope=bundle} | Bundle(org.openhab.binding.knx_1.9.0.201611110211 [195])]
java.lang.ClassCastException
22:23:57.150 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Light_Studio_Back_Dimmer' received command ON
22:23:57.150 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/Light_Studio_Back_Dimmer] | {org.osgi.service.event.EventHandler, tuwien.auto.calimero.process.ProcessListener}={event.topics=openhab/*, component.name=org.openhab.binding.knx, component.id=237, service.id=427, service.bundleid=195, service.scope=bundle} | Bundle(org.openhab.binding.knx_1.9.0.201611110211 [195])]
java.lang.ClassCastException
22:23:57.534 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Light_Studio_Back_Dimmer' received command OFF
22:23:57.534 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/Light_Studio_Back_Dimmer] | {org.osgi.service.event.EventHandler, tuwien.auto.calimero.process.ProcessListener}={event.topics=openhab/*, component.name=org.openhab.binding.knx, component.id=237, service.id=427, service.bundleid=195, service.scope=bundle} | Bundle(org.openhab.binding.knx_1.9.0.201611110211 [195])]
java.lang.ClassCastException

Any idea?

EDIT: Restarting all components of openHAB offers the solution. Probably its a good idea to adapt your snippet accordingly:

- sudo service openhab2 start
+ sudo service openhab2 restart

or, using systemctl

sudo systemctl restart openhab2.service

Thank you!