Openhab2 Rel 2.4 not starting on Pi3 B

Hi ,

I’m struggling getting oh2 2.4 up and running on my Pi3 Model B
Although I’ve tried out a lot of recommendations which I have found in several threads , it didn’t solved my problem.
system information is
PRETTY_NAME=“Raspbian GNU/Linux 9 (stretch)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“9”
VERSION=“9 (stretch)”

latest stable release of oh 2.4

I’ve tried out Zulu 8 and Oracle jdk 8 - both not working

Info from sudo systemctl status openhab2.service -l

● openhab2.service - The openHAB 2 Franks Smarthome
Loaded: loaded (/lib/systemd/system/openhab2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2018-12-21 10:35:32 CET; 10min ago
Docs: http://docs.openhab.org
Main PID: 5344 (code=exited, status=254)

Dec 21 10:35:32 raspberrypi3 systemd[1]: openhab2.service: Control process exited, code=exited status=1
Dec 21 10:35:32 raspberrypi3 systemd[1]: openhab2.service: Unit entered failed state.
Dec 21 10:35:32 raspberrypi3 systemd[1]: openhab2.service: Failed with result ‘exit-code’.
Dec 21 10:35:32 raspberrypi3 systemd[1]: openhab2.service: Service hold-off time over, scheduling restart.
Dec 21 10:35:32 raspberrypi3 systemd[1]: Stopped The openHAB 2 Franks Smarthome.
Dec 21 10:35:32 raspberrypi3 systemd[1]: openhab2.service: Start request repeated too quickly.
Dec 21 10:35:32 raspberrypi3 systemd[1]: Failed to start The openHAB 2 Franks Smarthome.
Dec 21 10:35:32 raspberrypi3 systemd[1]: openhab2.service: Unit entered failed state.
Dec 21 10:35:32 raspberrypi3 systemd[1]: openhab2.service: Failed with result ‘exit-code’.

I also checked permissions on /usr/share/openhab2 and /var/log/openhab2 - all is permitted for openhab user

any further ideas ?

Ah - not to forget - I’ve reinstalled openhab more then once after changing JAVA - but problems occurs anyway

thanks

Is it a new Raspi install?
If yes then you should use openHABIAN

Your issue is caused by a stale service file, which as probably been there for a while, and was not installed by the current package: use the following commands to fix.

sudo systemctl disable openhab2
sudo systemctl stop openhab2
sudo rm -f /lib/systemd/system/openhab2.service
sudo systemctl daemon-reload
sudo systemctl enable openhab2
sudo systemctl start openhab2

Hi Ben
did it again - but same issue
● 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 Fri 2018-12-21 14:28:50 CET; 2s ago
Docs: https://www.openhab.org/docs/
https://community.openhab.org
Process: 7658 ExecStop=/usr/share/openhab2/runtime/bin/karaf stop (code=exited, status=1/FAILURE)
Process: 7497 ExecStart=/usr/share/openhab2/runtime/bin/karaf $OPENHAB_STARTMODE (code=exited, status=0/SUCCESS)
Main PID: 7497 (code=exited, status=0/SUCCESS)

Dec 21 14:28:50 raspberrypi3 systemd[1]: openhab2.service: Unit entered failed state.
Dec 21 14:28:50 raspberrypi3 systemd[1]: openhab2.service: Failed with result ‘exit-code’.

Hi Vincent,
no - the pi3 is planned to be my kodi server as well . Also I intend to transfer my current oh2 rules/items stuff from my working pi2/oh2.2 to the updated pi3. That’s why I’m working with plain installs instead of purpose driven distributions

If you have nothing on the pi yet, then start over.

flash rasbian lite on the card and then follow this:

Especially the LAST TWO STEPS java and repo install

You may get more information about errors with the following command:

sudo journalctl -b -u openhab2.service

The bottom of that list will show most recent errors.

interesting, it is restarting again and again now

Dec 21 16:15:10 raspberrypi3 systemd[1]: openhab2.service: Service hold-off time over, scheduling restart.
Dec 21 16:15:10 raspberrypi3 systemd[1]: Stopped openHAB 2 - empowering the smart home.
Dec 21 16:15:10 raspberrypi3 systemd[1]: Started openHAB 2 - empowering the smart home.
Dec 21 16:15:12 raspberrypi3 karaf[3422]: Listening for transport dt_socket at address: 5005
Dec 21 16:15:18 raspberrypi3 karaf[3422]: [1B blob data]
Dec 21 16:15:18 raspberrypi3 karaf[3422]: __ _____ ____
Dec 21 16:15:18 raspberrypi3 karaf[3422]: ____ ____ ___ ____ / / / / | / __ )
Dec 21 16:15:18 raspberrypi3 karaf[3422]: / __ / __ / _ / __ / // / /| | / __ |
Dec 21 16:15:18 raspberrypi3 karaf[3422]: / /
/ / // / __/ / / / __ / ___ |/ // /
Dec 21 16:15:18 raspberrypi3 karaf[3422]: _/ ./_// /// /// |/_____/
Dec 21 16:15:18 raspberrypi3 karaf[3422]: /_/ 2.4.0
Dec 21 16:15:18 raspberrypi3 karaf[3422]: Release Build
Dec 21 16:15:18 raspberrypi3 karaf[3422]: [1B blob data]
Dec 21 16:15:18 raspberrypi3 karaf[3422]: Hit ‘’ for a list of available commands
Dec 21 16:15:18 raspberrypi3 karaf[3422]: and ‘[cmd] --help’ for help on a specific command.
Dec 21 16:15:18 raspberrypi3 karaf[3422]: Hit ‘’ or type ‘system:shutdown’ or ‘logout’ to shutdown openHAB.
Dec 21 16:15:20 raspberrypi3 karaf[3422]: openhab>
Dec 21 16:15:31 raspberrypi3 karaf[3576]: Can’t connect to the container. The container is not running.
Dec 21 16:15:31 raspberrypi3 systemd[1]: openhab2.service: Control process exited, code=exited status=1
Dec 21 16:15:31 raspberrypi3 systemd[1]: openhab2.service: Unit entered failed state.
Dec 21 16:15:31 raspberrypi3 systemd[1]: openhab2.service: Failed with result ‘exit-code’.

Very strange, I would usually expect errors here, have you edited any system/config files for the process? Could you post the results of the following for me:

openhab-cli info

(BTW, please put any logs or code snippets inside ``` for example:

```
Line 1
Line 2
Line 3
```

it is …

Version:     2.4.0 (Build)

User:        openhab (Environment Variable Set)
User Groups: openhab

Directories: Folder Name      | Path                        | User:Group
             -----------      | ----                        | ----------
             OPENHAB_HOME     | /usr/share/openhab2         | openhab:openhab
             OPENHAB_RUNTIME  | /usr/share/openhab2/runtime | openhab:openhab
             OPENHAB_USERDATA | /var/lib/openhab2           | openhab:openhab
             OPENHAB_CONF     | /etc/openhab2               | openhab:openhab
             OPENHAB_LOGDIR   | /var/log/openhab2           | openhab:openhab

All fine so far… finally, does /var/log/openhab2 contain any information?

Hi Ben,

after further testings , I stopped more efforts and re-setup the pi from scretch. Installed raspian stretch lite, oracle java and openhab2 from scretch and everything seems to work as it do on my pi2. All rules, items etc are up and running now.
Anyway - would have been interesting to understand what’s the reason for startup problems, but as the new system should be the productive system - it’s better to start with a clean system.
So far - thanks for your help

1 Like

I have exactly the same problem and it is very annoying. It looks like a karaf problem to me. The core problem is there is absolutely no output log by the karaf process. It simply terminates and the whole startup process is running again. An new install of everything is something for Windows guys and a I am not satisfied with answers like this. There must be a reason underneath, any more suggestions how to monitor the karaf process?
I have the idea that maybe the karaf process is giving up too early let the container start, however this is just a guess without any information…