[SOLVED] Issue with startup via init.d or systemctl

Hi,

i have issues with the start script since a few weeks (and builds). I can only start manually via runtime/bin/start (without any problems).

If i start via init.d and systemctl (i tried both) the following happens:

Jan 11 10:11:16 openhab systemd[1]: Starting openHAB runtime...
Jan 11 10:11:16 openhab openHAB-service[1993]: Starting openHAB runtime...
Jan 11 10:11:17 openhab systemd[1]: Started openHAB runtime.
Jan 11 10:11:36 openhab systemd[1]: openHAB.service: main process exited, code=exited, status=1/FAILURE
Jan 11 10:11:36 openhab openHAB-service[2179]: Stopping openHAB runtime...
Jan 11 10:11:36 openhab openHAB-service[2179]: openHAB runtime was not running.
Jan 11 10:11:36 openhab systemd[1]: Unit openHAB.service entered failed state.

I am running this on

Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19)

Any ideas what this could be?

Jens

Hi,

if i do multiple “ps -aux | grep openhab” i can see that the wrapper is started, after that the java file is started which terminates short afterwards and after that the wrapper terminates also.

There are no entries in openhab.log, and darmon.log looks similar to the syslog:

Jan 11 10:11:16 openhab systemd[1]: Starting openHAB runtime...
Jan 11 10:11:16 openhab openHAB-service[1993]: Starting openHAB runtime...
Jan 11 10:11:17 openhab systemd[1]: Started openHAB runtime.
Jan 11 10:11:36 openhab systemd[1]: openHAB.service: main process exited, code=exited, status=1/FAILURE
Jan 11 10:11:36 openhab openHAB-service[2179]: Stopping openHAB runtime...
Jan 11 10:11:36 openhab openHAB-service[2179]: openHAB runtime was not running.
Jan 11 10:11:36 openhab systemd[1]: Unit openHAB.service entered failed state.

Did you check your java version?
We had multiple issues in other posts with older java builds, not only related to the new openHAB cloud connector, but also to the startup of openHAB.
Oracle java should be at least 101 or even newer …

Hi sihui,

i am running

java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

and OpenHAB is running well if i start it manually via runtime/bin/start

Jens

It seems like you build your own service file. Please check if your setup is still in line with the installation instructions: http://docs.openhab.org/installation/linux.html

Hi Thom,

no i did not… i deleted (or at least i think so) all created skripts and run install-service to create new ones. But i will look into the documentation. I thought it was the way how it is supposed to be to let the KARAF console build the skripts.

Jens

Hi,

i created the script myself now according to the instructions and it is working absolutely fine.

Thank you very much.

Jens