I had the same problem 30 min ago: makeHAB.sh does not delete start.sh, so you (we) are using the old start.sh.
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…
Sounds like the script might need to get updated to overwrite the start.sh. 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.
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.
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:
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.
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!
@anfaenger another needed change because of the big folder structure change. You really chose the wrong weekend for your first openHAB experiences
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.
#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
/root/openhab/apt-repo
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
/var/log/syslog
The paths of KARAF_BASE und KARAF_ETC are wrong. Change the file
/usr/share/openhab2/runtime/bin/oh2_dir_layout
as follows (backup the old before):
#!/bin/sh
# 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_RUNTIME="${OPENHAB_HOME}/runtime"
export OPENHAB_USERDATA="/var/lib/openhab2"
export OPENHAB_LOGDIR="/var/log/openhab2"
export KARAF_HOME="${OPENHAB_RUNTIME}"
export KARAF_DATA="${OPENHAB_USERDATA}"
export KARAF_BASE="${OPENHAB_USERDATA}"
export KARAF_ETC="${OPENHAB_USERDATA}/etc"
in file
/usr/lib/systemd/system/openhab2.service
replace
ExecStop=/usr/share/openhab2/runtime/karaf/bin/stop
with
ExecStop=/usr/share/openhab2/runtime/bin/stop
add optinal Java command line parameter in file
/etc/defaults/openhab2
for example
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0"
(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
/var/log/syslog
if everything works you should get log output under
/var/log/openhab2/openhab.log and
/var/log/openhab2/events.log
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
/usr/share/openhab2/addons
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.
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.
Well that’s embarrassing, you are totally right…
I assumed that the start.sh was indeed updated using makeHAB (as it makes a point of removing *.bat) but it uses unzip -n (no overwrite)… My bad