Openhab 2.2 via apt is a disaster!

Hi All
I spend all night to try openhab2 ver 2.2 run after upgrade from 2.1 via apt but no success.
After upgrade openhab won’t to start. Directories in /usr/share/userdata were not found. I created it manually and change owner and permission.
Openhab wants to start it try but it can’t
@cubietruck:/lib/systemd/system# systemctl status openhab2.service
● openhab2.service - Starts and stops the openHAB Home Automation Bus
Loaded: loaded (/lib/systemd/system/openhab2.service; enabled)
Active: activating (auto-restart) (Result: exit-code) since pon 2017-12-18 22:55:24 CET; 82ms ago
Docs: http://www.openhab.org
Process: 6422 ExecStart=/usr/share/openhab2/start.sh (code=exited, status=254)
Main PID: 6422 (code=exited, status=254)

gru 18 22:55:24 cubietruck systemd[1]: Unit openhab2.service entered failed state.
root@cubietruck:/lib/systemd/system# systemctl status openhab2.service
● openhab2.service - Starts and stops the openHAB Home Automation Bus
Loaded: loaded (/lib/systemd/system/openhab2.service; enabled)
Active: active (running) since pon 2017-12-18 22:55:24 CET; 688ms ago
Docs: http://www.openhab.org
Main PID: 6560 (karaf)
CGroup: /system.slice/openhab2.service
├─6560 /bin/sh /usr/share/openhab2/runtime/bin/karaf
├─6625 /bin/sh /usr/share/openhab2/runtime/bin/karaf
├─6626 /usr/bin/java -version
├─6627 grep -E "([0-9].[0-9]…[0-9])."
├─6628 awk {print substr($3,2,length($3)-2)}
├─6629 awk {print substr($1, 3, 3)}
└─6630 sed -e s;.;;g

gru 18 22:55:24 cubietruck systemd[1]: Started Starts and stops the openHAB Home Automation Bus.
gru 18 22:55:24 cubietruck start.sh[6560]: Launching the openHAB runtime…

I decide do delete openhab2 via apt-get remove openhab2 . Openhab2 still not working …
I remove ALL !!! and still nothing - openhab not works.
I start with systemctl start openhab2 and nothings
systemctl status openhab2
● openhab2.service - openHAB 2 - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab2.service; disabled)
Active: active (running) since wto 2017-12-19 14:00:23 CET; 4min 3s ago
Docs: http://docs.openhab.org
https://community.openhab.org
Main PID: 2882 (java)
CGroup: /system.slice/openhab2.service
└─2882 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 …

I can access openhab2

I try to run openhab-cli start and I get
openhab-cli start
A systemd service configuration exists…
Use ‘sudo /bin/systemctl start openhab2.service’ to start an openHAB service
Launching an instance in this terminal…
Launching the openHAB runtime…

                      __  _____    ____      

____ ____ ___ ____ / / / / | / __ )
/ __ / __ / _ / __ / // / /| | / __ |
/ /
/ / // / __/ / / / __ / ___ |/ // /
_/ ./_// /// /// |/_____/
/_/ 2.2.0
Release Build

Hit ‘’ for a list of available commands
and ‘[cmd] --help’ for help on a specific command.
Hit ‘’ or type ‘system:shutdown’ or ‘logout’ to shutdown openHAB.

Error in initialization script: /var/lib/openhab2/etc/shell.init.script: /var/lib/openhab2/etc/shell.init.script
First time after upgrade openhab2 needs /usr/share/openhab2/userdata directory.
If I remove all an install fresh there is no userdata directory !!! but no error.
I dont understand it !!!

Summary this is totally disaster I brake my all home automation ( light, vailllant boiler, alarm etc) !!!
Has anyone help me to fix it ???

@Benjy, does this look like a similar problem with the .service file you helped with on that other thread I saw?

1 Like

We eventually solved it and a host of other problems in:

It’s regrettable that I didn’t see this thread first though. As it appears removing the service file in /lib/systemd/system would have solved the problem.

2 Likes