Openhab 2.2 stable upgrade errors

It is but I have no demands for an opensource software :slight_smile:

Yes it looks correct I had already checked it while googling the error

pi@raspberrypi:/etc/openhab2 $ cat /usr/lib/systemd/system/openhab2.service
[Unit]
Description=openHAB 2 - empowering the smart home
Documentation=http://docs.openhab.org
Documentation=https://community.openhab.org
Wants=network-online.target
After=network-online.target

[Service]
Environment=OPENHAB_HOME=/usr/share/openhab2
Environment=OPENHAB_CONF=/etc/openhab2
Environment=OPENHAB_RUNTIME=/usr/share/openhab2/runtime
Environment=OPENHAB_USERDATA=/var/lib/openhab2
Environment=OPENHAB_LOGDIR=/var/log/openhab2
Environment=OPENHAB_STARTMODE=daemon
EnvironmentFile=-/etc/default/openhab2

User=openhab
Group=openhab

WorkingDirectory=/usr/share/openhab2
ExecStart=/usr/share/openhab2/runtime/bin/karaf $OPENHAB_STARTMODE
ExecStop=/usr/share/openhab2/runtime/bin/karaf stop

SuccessExitStatus=0 143
RestartSec=5
Restart=on-failure
TimeoutStopSec=120

LimitNOFILE=102642

[Install]
WantedBy=multi-user.target

Yep that’s the one,

Let’s try more debugging…

sudo systemd-analyze verify /usr/lib/systemd/system/openhab2.service
sudo systemctl daemon-reload

Does not seem to recognise ‘verify’

pi@raspberrypi:/etc/openhab2 $ sudo systemd-analyze verify
Unknown operation 'verify'.
pi@raspberrypi:/etc/openhab2 $ sudo systemd-analyze
blame           critical-chain  dot             dump            plot            set-log-level   time

Hi,

I had the same issue - based on your post I looked at the openhab2.service file in the

/lib/systemd/system

I noticed that the openhab2.service file was the old version.

I removed it - together with a systemctl daemon-reload / enable - and now it works …

Thanks for your input !!

1 Like

Hi @Brambot, I think you’re on the answer there!

@cgeo can you delete the /lib/systemd/systemd/openhab2.service file (not the one in /usr/) and do another reload?

Guys,

With the suggestion of @Brambot I got past the error. But it was not over. Logs indicated several permission issues

Dec 19 00:16:59 raspberrypi karaf[27231]: Unable to update instance pid: /var/lib/openhab2/tmp/instances/instance.properties (Permission denied)
Dec 19 00:19:12 raspberrypi karaf[27642]: 2017-12-19 00:19:12,547 CM Configuration Updater (ManagedService Update: pid=[org.ops4j.pax.logging]) ERROR Cannot access RandomAccessFile java.io.FileNotFoundException: /var/log/openhab2/audit.log (Permission denied) java.io.FileNotFoundException: /var/log/openhab2/audit.log (Permission denied)
Dec 19 00:15:23 raspberrypi karaf[26526]: java.io.FileNotFoundException: /var/lib/openhab2/cache/org.eclipse.osgi/.manager/.fileTableLock (Permission denied)

I really do not know how this has happened honestly. I restored the permissions to openhab for

/var/log/openhab2/audit.log
/var/lib/openhab2/tmp
/var/lib/openhab2/cache

and now everything starts up fine!

Many thanks @Benjy and @Brambot

The support was better than what I get for paid enterprise software :slight_smile:

2 Likes

Glad you got it sorted! And that we have an answer to give to other people that may encounter this error!

I getting continual repeated messages in the logs that I never got before the upgrade

2017-12-19 12:50:13.040 [me.event.ThingUpdatedEvent] - Thing ‘zway:zwayDevice:192_168_1_210:5’ has been updated.
2017-12-19 12:50:20.391 [me.event.ThingUpdatedEvent] - Thing ‘zway:zwayDevice:192_168_1_210:5’ has been updated.
2017-12-19 12:50:41.410 [me.event.ThingUpdatedEvent] - Thing ‘zway:zwayDevice:192_168_1_210:4’ has been updated.
2017-12-19 12:52:33.468 [me.event.ThingUpdatedEvent] - Thing ‘zway:zwayDevice:192_168_1_210:5’ has been updated.
2017-12-19 13:00:12.216 [me.event.ThingUpdatedEvent] - Thing ‘zway:zwayDevice:192_168_1_210:5’ has been updated.
2017-12-19 13:01:25.941 [me.event.ThingUpdatedEvent] - Thing ‘zway:zwayDevice:192_168_1_210:4’ has been updated.
2017-12-19 13:02:33.788 [me.event.ThingUpdatedEvent] - Thing ‘zway:zwayDevice:192_168_1_210:5’ has been updated.
2017-12-19 13:05:32.673 [me.event.ThingUpdatedEvent] - Thing ‘zway:zwayDevice:192_168_1_210:4’ has been updated.
2017-12-19 13:07:33.868 [me.event.ThingUpdatedEvent] - Thing ‘zway:zwayDevice:192_168_1_210:5’ has been updated.
2017-12-19 13:10:38.100 [me.event.ThingUpdatedEvent] - Thing ‘zway:zwayDevice:192_168_1_210:5’ has been updated.

Any ideas, they fill the logs

Hi Lars,
same issue same settings here.
Did you find a solution?

I also get continously repeated messages in the logs.

2017-12-21 22:36:15.085 [me.event.ThingUpdatedEvent] - Thing ‘milight:bridgeV6:iBoxLED’ has been updated.
2017-12-21 22:36:20.089 [me.event.ThingUpdatedEvent] - Thing ‘milight:bridgeV6:iBoxLED’ has been updated.
2017-12-21 22:36:25.092 [me.event.ThingUpdatedEvent] - Thing ‘milight:bridgeV6:iBoxLED’ has been updated.
2017-12-21 22:36:30.094 [me.event.ThingUpdatedEvent] - Thing ‘milight:bridgeV6:iBoxLED’ has been updated.
2017-12-21 22:36:35.095 [me.event.ThingUpdatedEvent] - Thing ‘milight:bridgeV6:iBoxLED’ has been updated.
2017-12-21 22:36:40.099 [me.event.ThingUpdatedEvent] - Thing ‘milight:bridgeV6:iBoxLED’ has been updated.
2017-12-21 22:36:45.101 [me.event.ThingUpdatedEvent] - Thing ‘milight:bridgeV6:iBoxLED’ has been updated.
2017-12-21 22:36:50.104 [me.event.ThingUpdatedEvent] - Thing ‘milight:bridgeV6:iBoxLED’ has been updated.
2017-12-21 22:36:55.107 [me.event.ThingUpdatedEvent] - Thing ‘milight:bridgeV6:iBoxLED’ has been updated.
2017-12-21 22:37:00.109 [me.event.ThingUpdatedEvent] - Thing ‘milight:bridgeV6:iBoxLED’ has been updated.

Does anybody know how to fix that?

Nope…not yet. Its still a open issue for me. But “good” to hear, that i am not alone. This means, there is a reproducable issue connected to German language-settings…so there is at least hope for a solution.

I see the same thing in my log, and I don’t have German language, so probably not connected to that.

Hi,

Have you been able to also solve the neato binding? I get the same error with trying to start the binding.

openhab> bundle:start 207
Error executing command: Error executing command on bundles:
Error starting bundle 207: Could not resolve module: org.openhab.binding.neato [207]
Unresolved requirement: Import-Package: org.apache.commons.codec.binary; version="1.6.0"

Thanks!

Same here! Is there a way to fix this?

I posted this in another topic earlier. Hope it helps.

I ran this in karaf. This was right after I updated to 2.2. I’m no computer wiz so I’m not sure what negative effects this would have but it stopped the flood of milight updates in the log.

log:set ERROR smarthome.event.ThingUpdatedEvent

A bigger issue with this that I recently noticed is that every ThingUpdatedEvent corresponds to a write to /var/lib/openhab2/jsondb/org.eclipse.smarthome.core.thing.Thing.json and every time that file is written to, OpenHAB creates a backup of the file. This means that the backups are useless, since the oldest one is from just a few minutes ago…

Have anyone figured out what causes this?

I dont know if this recoment to this issue but what my external ssd is doing 24/7 is read/write all the time. The ssd is busy all the time.

Hi,

By the looks of the subject of this thread I have the same problem, so followed all suggestions but still can not get it to work. One thing which looks different from what was described above is the output from “openhab-cli start --debug”, after some time I get the following message (of which I do not know if it is related)

openhab> 21:30:22.433 [Start Level: Equinox Container: e8809b83-5429-4dc5-9644-7e56583d83df] ERROR org.openhab.ui.dashboard - [org.openhab.dashboard(20)] The activate method has thrown an exception                                                                           
java.lang.IllegalArgumentException: Network prefix length is not within bounds
at org.eclipse.smarthome.core.net.NetUtil.networkPrefixLengthToNetmask(NetUtil.java:251) [109:org.eclipse.smarthome.core:0.10.0.b1]
at org.eclipse.smarthome.core.net.NetUtil.getIpv4NetAddress(NetUtil.java:289) [109:org.eclipse.smarthome.core:0.10.0.b1]
at org.eclipse.smarthome.core.net.NetUtil.getIPv4inSubnet(NetUtil.java:326) [109:org.eclipse.smarthome.core:0.10.0.b1]
at org.eclipse.smarthome.core.net.NetUtil.getPrimaryIpv4HostAddress(NetUtil.java:79) [109:org.eclipse.smarthome.core:0.10.0.b1]
at org.openhab.ui.dashboard.internal.DashboardService.activate(DashboardService.java:83) [189:org.openhab.ui.dashboard:2.2.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
.....
[Start Level: Equinox Container: 5f334267-7d3b-4ceb-b5b4-f01e09fde248] ERROR org.openhab.ui.dashboard.internal.DashboardService - Error during dashboard startup: alias: '/start/index' is already in use in this or another context

When accessing OpenHab2 via the browser I get a internal server error

java.lang.NullPointerException
at org.openhab.ui.dashboard.internal.DashboardService.getLocalizedText(DashboardService.java:240)

But I am able to access the PaperUI.

Last thing I did was try to install OwnTracks and because the binding did not show up in the list with binding after I hit the install button, I restarted openHab2 and ended up in this situation (log files are empty by the way… :frowning: )
Any clue as to what may be causing this?

did you ever solve this

Well no really, in the end I backed up my configuration and reinstalled OpenHAB. The I put back my configuration but this caused OpenHAB to not work (looked it didn’t recognise some of the config files) and I redid my configuration … and now it is working again