Installation at Debian 9

Hello,

I tried to install Openhab in a Debian 9 virtual machine.
Installed it according to: https://www.taste-of-it.de/openhab-2-installation-unter-debian-9-stretch/

Installation went without problems and I rebooted, but I can not reach OH at IP:8080 :frowning:
Any ideas???

root@openhab-debian:~# apt-get install apt-transport-https
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Die folgenden NEUEN Pakete werden installiert:
  apt-transport-https
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen 171 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 243 kB Plattenplatz zusätzlich benutzt.
Holen:1 http://ftp.de.debian.org/debian stretch/main amd64 apt-transport-https amd64 1.4.9 [171 kB]
Es wurden 171 kB in 0 s geholt (555 kB/s).  
Vormals nicht ausgewähltes Paket apt-transport-https wird gewählt.
(Lese Datenbank ... 52602 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../apt-transport-https_1.4.9_amd64.deb ...
Entpacken von apt-transport-https (1.4.9) ...
apt-transport-https (1.4.9) wird eingerichtet ...
root@openhab-debian:~# echo 'deb https://dl.bintray.com/openhab/apt-repo2 stable main' | sudo tee /etc/apt/sources.list.d/openhab2.list
deb https://dl.bintray.com/openhab/apt-repo2 stable main
root@openhab-debian:~# apt-get update
Ign:1 http://ftp.de.debian.org/debian stretch InRelease
OK:2 http://ftp.de.debian.org/debian stretch-updates InRelease
OK:3 http://ftp.de.debian.org/debian stretch Release                           
OK:4 http://security.debian.org/debian-security stretch/updates InRelease      
Ign:5 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Holen:6 https://dl.bintray.com/openhab/apt-repo2 stable Release [6.051 B]
Holen:8 https://dl.bintray.com/openhab/apt-repo2 stable Release.gpg [821 B]
Holen:9 https://dl.bintray.com/openhab/apt-repo2 stable/main amd64 Packages [1.812 B]
Es wurden 8.684 B in 0 s geholt (14,6 kB/s).
Paketlisten werden gelesen... Fertig
root@openhab-debian:~# sudo apt-get install openhab2
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Vorgeschlagene Pakete:
  zulu-8 | zulu-embedded-8 | oracle-java8-installer | openjdk-8-jdk-headless
Die folgenden NEUEN Pakete werden installiert:
  openhab2
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen 73,7 MB an Archiven heruntergeladen werden.
Nach dieser Operation werden 83,5 MB Plattenplatz zusätzlich benutzt.
Holen:1 https://dl.bintray.com/openhab/apt-repo2 stable/main amd64 openhab2 all 2.4.0-1 [73,7 MB]
Es wurden 73,7 MB in 4 s geholt (15,2 MB/s).
Vormals nicht ausgewähltes Paket openhab2 wird gewählt.
(Lese Datenbank ... 52608 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../openhab2_2.4.0-1_all.deb ...
Entpacken von openhab2 (2.4.0-1) ...
openhab2 (2.4.0-1) wird eingerichtet ...
### NOT starting on installation, please execute the following statements to configure openHAB to start automatically using systemd
 sudo /bin/systemctl daemon-reload
 sudo /bin/systemctl enable openhab2.service
### You can start openhab2 by executing
 sudo /bin/systemctl start openhab2.service
Trigger für systemd (232-25+deb9u11) werden verarbeitet ...
root@openhab-debian:~# sudo /bin/systemctl daemon-reload
root@openhab-debian:~# sudo /bin/systemctl enable openhab2.service
Synchronizing state of openhab2.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable openhab2
Created symlink /etc/systemd/system/multi-user.target.wants/openhab2.service → /usr/lib/systemd/system/openhab2.service.
root@openhab-debian:~# sudo /bin/systemctl start openhab2.service
root@openhab-debian:~# sudo reboot
Connection to 192.168.70.147 closed by remote host.
Connection to 192.168.70.147 closed.

Got it working, had to reinstall java.

I had to paste my openhab2 directory from my old Openhab instance.
So I think the permissions are not right anymore and OpenHab is not able to read it anymore.

What do I have to set?
Now:

drwxr-xr-x 14 root root    4096 Jun 29 13:53 openhab2

Permissions are probably fine, but the owner and group are not correct for OH.

chown -R openhab:openhab /etc/openhab2

That command should set it for the directory and everything within it.

Also when I have not created a separate user for OpenHAB?

May I suggest simply running the openhabian for Linux script?

It works fine with ODroid C2 machines, with any kind of Linux that I’ve tried so far

2 Likes

If you installed OH via apt, the user and group both exist due to the installation package.

1 Like