Issue installing OpenHABian on Debian 9 (VM)

Hi folks,

building from the ground up a new installation, trying for the first time openhabian in a debian vm.

after selecting all options from Manual/Fresh Setup (all - for 63 I selected Oracle as Zulu seems broken; for 64 I selected OpenHAB unstable), the script stop here:

$ apt -y install apt-transport-https bc sysstat avahi-daemon python python-pip
Reading package lists… Done
Building dependency tree
Reading state information… Done
apt-transport-https is already the newest version (1.4.8).
avahi-daemon is already the newest version (0.6.32-2).
bc is already the newest version (1.06.95-9+b3).
python is already the newest version (2.7.13-2).
python-pip is already the newest version (9.0.1-2).
sysstat is already the newest version (11.4.3-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
OK
/opt/openhabian/functions/menu.sh: line 172: openhab2_unstable_setup: command not found
2018-03-16_19:05:11_CET [openHABian] Preparing openHAB folder mounts under /srv/…
$ cat /etc/fstab

/etc/fstab: static file system information.

Use ‘blkid’ to print the universally unique identifier for a

device; this may be used with UUID= as a more robust way to name devices

that works even if disks are added and removed. See fstab(5).

/ was on /dev/sda1 during installation

UUID=7db4ebaa-a6ec-4463-8346-5463deb23465 / ext4 errors=remount-ro 0 1

swap was on /dev/sda5 during installation

UUID=fb53dac9-e734-4c12-a25b-2f188e3ffd53 none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0

/usr/share/openhab2 /srv/openhab2-sys none bind 0 0
/etc/openhab2 /srv/openhab2-conf none bind 0 0
/var/lib/openhab2 /srv/openhab2-userdata none bind 0 0
/var/log/openhab2 /srv/openhab2-logs none bind 0 0
/usr/share/openhab2/addons /srv/openhab2-addons none bind 0 0

$ mkdir -p /srv/openhab2-sys /srv/openhab2-conf /srv/openhab2-userdata /srv/openhab2-logs /srv/openhab2-addons

$ cp /opt/openhabian/includes/srv_readme.txt /srv/README.txt

$ chmod ugo+w /srv /srv/README.txt

$ mount --all --verbose
/ : ignored
none : ignored
/media/cdrom0 : ignored
mount: special device /usr/share/openhab2 does not exist
mount: special device /etc/openhab2 does not exist
mount: special device /var/lib/openhab2 does not exist
mount: special device /var/log/openhab2 does not exist
mount: special device /usr/share/openhab2/addons does not exist
FAILED
2018-03-16_19:05:11_CET [openHABian] Applying file permissions recommendations… FAILED (please execute after openHAB was installed)

it seems some dir are missing. Do we need to create those manually?

thanks
Andrea

FYI

selecting the stable release instead of unstable, it works like a charm and those dirs are created as expected.

Now trying with unstable … but I expect now it will work correctly. Mabye a mkdir missing in the script?

[edit] switch from stable to unstable works like a charm

@TomDidi just an heads-up regarding the script (the issue above): if we start from scratch trying to install the latest unstable snapshot, it seems there is a missing mkdir

thanks
Andrea

@Benjy

I’m not sure what’s going on here if I’m honest. Just tried to install the latest snapshot on my own virtual machine and it works fine. Where does /srv/ mount to? I’d like to recreate the same scenario.

Hi Benjy,

thanks for your support here.

Just to summarise what I did:

  1. start from scratch a new debian VM (hosted on my Mac OsX server)
  2. sudo openhabian-config
  3. Manual / Fresh Setup (60)
    4a. if you select 61-62-63b (63a Zulu is not supported any more), 64b (unstable) and 65-66-67-68-69 , we have the issue
    4b if you select 61-62-63b, 64a (stable) and 65-66-67-68-69, everything’s working fine

issue in case of 4a: as you can see above, the script stop after not finding the openhab2_unstable_setup script (?). The important piece seems:

mount: special device /usr/share/openhab2 does not exist
mount: special device /etc/openhab2 does not exist
mount: special device /var/lib/openhab2 does not exist
mount: special device /var/log/openhab2 does not exist
mount: special device /usr/share/openhab2/addons does not exist

the dirs above are not present in the system, so I expect there is a missing mkdir piece.

With 4b those dirs are in the system, and the script doesn’t fail.

Hope this is clear enough :slightly_smiling_face:
Andrea

Absolutely clear :slight_smile:, I seemed to have accidently installed the stable version (not snapshot) when I said I had it working earlier… Silly me!

I’ve found the issue in the openhabian scripts and will send a PR to fix, if you want to get it working straight away then edit line 170 in /opt/openhabian/functions/menu.sh from:

    if [[ $choosenComponents == *"openHAB unstable"* ]]; then openhab2_unstable_setup; fi

to

    if [[ $choosenComponents == *"openHAB unstable"* ]]; then openhab2_setup unstable; fi

Hope that helps!

FYI:

Thank you Benjy, much appreciated.

I’ve forgotten to say … my Debian is 32 bit, not 64 bit … I’ve just found Grafana for example is only 64 bit :frowning: … Silly me! :slight_smile:

I was worried about zwave issues on 64 bit … :slight_smile:

thanks again here
Andrea

I installed debian 9 (VM) on a ESXi machine (windows). Ran through the install but I can’t seem to get openhabian started. This is the error I get:

sudo systemctl status openhab2.service
● openhab2.service - openHAB 2 - empowering the smart home
   Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Sun 2019-05-26 23:12:12 PDT; 2s ago
     Docs: https://www.openhab.org/docs/
           https://community.openhab.org
  Process: 10135 ExecStop=/usr/share/openhab2/runtime/bin/karaf stop (code=exited, status=1/FAILURE)
  Process: 10120 ExecStart=/usr/share/openhab2/runtime/bin/karaf $OPENHAB_STARTMODE (code=exited, status=1/FAILURE)
 Main PID: 10120 (code=exited, status=1/FAILURE)

May 26 23:12:12 OH-Debian systemd[1]: openhab2.service: Control process exited, code=exited status=1
May 26 23:12:12 OH-Debian systemd[1]: openhab2.service: Unit entered failed state.
May 26 23:12:12 OH-Debian systemd[1]: openhab2.service: Failed with result 'exit-code'.

Any suggestions on how to troubleshoot my installation?

Update:Started over with a fresh install but this time, I went through the Manual / Fresh Setup. It worked.

1 Like