Problem to enable systemctl-service openhab2.service

Hallo zusammen,

leider habe ich direkt Probleme mit der Installation.
Die Installation wurde ganz gewöhnlich über die Paketverwaltung durchgeführt.:

sudo apt-get install openhab2

Es ist mir nicht möglich den Service openhab2.server über systemctl zu aktivieren.
Ich erhalte den folgenden Fehler:

pi:/etc/init.d $ sudo systemctl enable openhab2.service
Synchronizing state for openhab2.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d openhab2 defaults
insserv: warning: script 'postupgrade.sh' missing LSB tags and overrides
insserv: There is a loop between service openhab2 and postupgrade.sh if stopped
insserv:  loop involving service postupgrade.sh at depth 2
insserv:  loop involving service openhab2 at depth 1
insserv: Stopping postupgrade.sh depends on openhab2 and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
*** Error in `systemctl': double free or corruption (fasttop): 0x011f3f08 ***
pi:/etc/init.d $

Kennt jemand eine Lösung für das Problem?

Gruß
Sam

You might get more response if you use English for your posting, as this is an international community.

Would be great if you could give us some more information about yous system like hardware, OS, java version.

Thanks Hans-Jörg for your answer and hints.

I have problems to enable openhab2.service with systemctl.

I tried to install the package on my Raspberry Pi.

Here the Informationen about my system.

Operating System: Raspbian GNU/Linux 8 (jessie)
Kernel: Linux 4.9.61-v7+

java version "1.7.0_151"
OpenJDK Runtime Environment (IcedTea 2.6.11) (7u151-2.6.11-1~deb8u1+rpi1)
OpenJDK Zero VM (build 24.151-b01, interpreted mode)

Please change your java version to Oracle. It is stated in the docs and mentioned many times in this community that the are incompatibility issues with OpenJDK.
It might be worth to give openHABian a try, it´s a perfect start for running openHAB…

Yes, I already have tried with oracle java 1.8
Then It is possible to start openhab2 manually from /usr/share/openhab2
But the problem with enabling the service still exists.

There is some other stuff running on my raspberry pi.

I think i will test openhab2 first on a new fresh installtion with raspbian stretch on an other sd card.
If this will work i will think about a migration from all the other things to this new system.

Thanks for your help!

If you try a fresh install, I would recommend to use openhabian, as it makes life a lot easier…