OH 2 not running, removing not possible

Hello OH-Community,

i just started my OH Project today and right at this point i am already thinking about stopping it again :frowning:

I am running a RP2 with Wheezy and Eibd, Java 8 installed.
Yesterday I installed OH2 according to the WIKI via apt-get. When starting OH with “sudo service openhab2 start” everything is fine. But if i type “sudo service openhab2 status” i get the following output:

pi@openhabpi ~ $ sudo service openhab2 start
[ ok ] Starting openHAB2 server: openhab2.
pi@openhabpi ~ $ sudo service openhab2 status
status: Ignoring predefined value for KARAF_HOME
/var/lib/openhab2/port shutdown port file doesn’t exist. The container is not running.

Also the OH2 Server doesn’t work.

Now i tried to remove everything what also doesnt work.

pi@openhabpi ~ $ sudo apt-get purge --auto-remove openhab2-online
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen… Fertig
Die folgenden Pakete werden ENTFERNT:
libmysqlclient16* libnet-daemon-perl* libplrpc-perl* openhab2-online*
0 aktualisiert, 0 neu installiert, 4 zu entfernen und 37 nicht aktualisiert.
Nach dieser Operation werden 58,7 MB Plattenplatz freigegeben.
Möchten Sie fortfahren [J/n]? j
(Lese Datenbank … 75216 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von libmysqlclient16 …
Löschen der Konfigurationsdateien von libmysqlclient16 …
Entfernen von libplrpc-perl …
Entfernen von libnet-daemon-perl …
Entfernen von openhab2-online …
[…] Stopping openHAB2 server: openhab2stop: Ignoring predefined value for KARAF_HOME
/var/lib/openhab2/port shutdown port file doesn’t exist. The container is not running.
invoke-rc.d: initscript openhab2, action “stop” failed.
dpkg: Fehler beim Bearbeiten von openhab2-online (–purge):
Unterprozess installiertes pre-removal-Skript gab den Fehlerwert 1 zurück
Trigger für man-db werden verarbeitet …
Fehler traten auf beim Bearbeiten von:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I would be glad if somebody could help me…


Maybe openHAB is running (though in an undefined state), so try as a first step to remove autostarts this way

sudo update-rc.d openhab2 remove

this should remove any start-links under /etc/rc{N}.d where {N} is 2-4.
After this step, reboot your Raspberry and try to apt-get remove (or purge) openhab2-online again.

Be aware that wheezy is outdated, it’s maybe better to upgrade to jessie (and learn a lot of stuff about systemd :wink: )

EDIT: corrected the sequence of keywords…

Having the same problem… tried your suggestion… but error!

sudo update-rc.d remove openhab2

this is the response

update-rc.d: /etc/init.d/remove: file does not exist

Sorry, wrong sequence, should be

sudo update-rc.d openhab2 remove