New folder structure

Are you sure you are using the from the zip?
I just checked and its content is


echo Launching the openHAB runtime...

DIRNAME=`dirname "$0"`
exec "${DIRNAME}/runtime/bin/karaf" "${@}"

Which does not have a runtime/karaf/bin/karaf in line 6…

I had the same problem 30 min ago: does not delete, so you (we) are using the old
Copy it from the online snapshot and don’t forget to give the correct permissions …

I am not even able to find this “makeHAB”. Could you link it? Is the author still around to update it? Would be interesting to put it into a repository and/or into documentation…

Edit: and:

Sounds like the script might need to get updated to overwrite the I have been away a few days, but should be able to look at it soon. For now, just remove the old file and run the script again. The new one will be dropped in.


@Benjy …and let me know if this works.

For me it didn’t. I’ll wait until the next upgrade.
Just for your information:
On my system the directory /usr/share/openhab2/runtime/karaf/etc don’t exist.

Hi @anfaenger, new build went up about an hour ago, try running

“sudo apt-get update && sudo apt-get upgrade” responding Y for any prompts you may get.

Hi @Benjy, sorry but nothing has changed after running “sudo apt-get update && sudo apt-get upgrade”.

That’s odd, do you get anything in /var/log/openhab2/openhab.log? If not, do you get anything related to openhab in /var/log/daemon.log?

I notice that you were running off of a new install. If you haven’t made any changes to openhab worth backing up, the best way to start anew would be to:

sudo apt-get purge openhab2-offline
sudo apt-get install openhab2-offline

Check those logs again and run a couple of “sudo service openhab2 restart” commands, if you’re still not running I will try and run the same process as you and see if I can debug from there.

Sorry, my mistake. Because I waited for the error message in openHABian-welcome-screen to desapear I didn’t tried to connect to dashboard and openhab.

As the openhab.log shows, the dashboard has been started and I can connect to dashboard and ui-interface.

Daemon.log is empty.

Now I did:

sudo apt-get purge openhab2-offline
sudo apt-get install openhab2-offline
sudo service openhab2 restart
sudo shutdown -r now

but in the openHABian-welcome-screen the error

awk: cannot open /usr/share/openhab2/runtime/karaf/etc/ (No such file or directory)

still appears like shown in the picture a few posts before.
Should I have to be worried about this message or just continue using openhab?


This is probably an openHABian specific error, (@ThomDietrich to confirm?) but nothing to worry about, those messages tell me that you’re setup and ready to go! :slight_smile:

@anfaenger another needed change because of the big folder structure change. You really chose the wrong weekend for your first openHAB experiences :sweat_smile:
I’ve already implemented the needed changes in openHABian. Please execute sudo openhabian-config, then first select “Update” to retrieve these changes, then select “Basic Setup” to apply them to your system.

Everyone, I’ve posted a more complete guide over here:

#Solved openHAB2 RPi Debian package service startup problems

I compiled openhab2-distro after the big directory movement, installed the resulting debian package on my Rpi2 and it took me some tuning until it worked. Here is what I had to do:

  • copy the apt-repo directory to the Raspi from
    openhab2-master/git/openhab-distro/distributions/openhab-offline/target/apt-repo to

  • add it to repositories in file /etc/apt/sources.list.d/openhab.list
    deb file:///root/openhab/apt-repo /

-install openhab2-offline via
apt-get install openhab2-offline

Now it should start as a service but gives errors. I tried

service openhab2 start

and looked into the errors in

The paths of KARAF_BASE und KARAF_ETC are wrong. Change the file
as follows (backup the old before):


# DIRNAME is the directory of karaf, setenv, etc.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH

export OPENHAB_HOME=`cd "$DIRNAME/../.."; pwd`
export OPENHAB_CONF="/etc/openhab2"
export OPENHAB_USERDATA="/var/lib/openhab2"
export OPENHAB_LOGDIR="/var/log/openhab2"

  • in file

  • add optinal Java command line parameter in file
    for example
    (some udev rules have to be written but this is another topic)

  • test the start as a service
    service openhab2 start
    service openhab2 status

  • iif the service is stopping or dead after some time, look in

  • if everything works you should get log output under
    /var/log/openhab2/openhab.log and

  • try the web gui on port 8080 or 8443

  • test if stopping the sevrice works
    service openhab2 stop
    service openhab2 status (should be stopped without errors)

  • enable the service to start at boot time via
    systemctl enable openhab2.service

  • now you are able to add addons by copying them into the directory

I myself am new to openHAB 2, but my my first LaCrosse sensor data is coming in with the prototype binding and I’ll see what I accomplish next.
It could be that there are more paths to correct, but these are enough to get the runtime working again.

And perhaps @theoweiss is able to incorporate the changes into the Debian package creation assembly in openhab-distro itself.

I hope this helps.


Hi @greenoid, thanks for the effort, but sorry to say the changes you mention were suggested a couple of days ago above. And an updated debian package has already been published, it should not be necessary to do this anymore.

I would however encourage anyone using these new packages to report any issues, so that we can narrow down any changes that need to be made. And anyone using older packages to delay updating for only a couple days or so.

For anyone using the makeHAB script for the latest online bundle, the script has been upgraded and tested. Feel free to pull it.


@ThomDietrich @Benjy No error-message anymore and connected to dashboard. :clap:
I’m ready for take off. :airplane:

Great job. :+1:
Thanks everybody!

1 Like

I used the openhab2-offline package from openhab-distro after making a git pull yesterday 12:00h. And the path problem was not fixed.

1 Like

…but it actually is. :confused: Have a look:

Well that’s embarrassing, you are totally right…
I assumed that the was indeed updated using makeHAB (as it makes a point of removing *.bat) but it uses unzip -n (no overwrite)… My bad :frowning: