lot of time went by but this error still exists. RC2.1.0 is working fine but 2.2.0 or 2.3.0-SNAPSHOT are still having this issue. It is not possible to start openhab2 via a launchdaemon.
Is someone able to provide a solution?
Btw I already tried a fresh install so it is not specific to my configuration.
Best regards,
Manolo
is someone still supporting openhab? I know it’s becoming spring and people spent more time outdoor but this issue persists since 8 month at least. @Kai are you able to provide me with a hint how to solve this issue?
I already tried a fresh install fro 2.2 and 2.3 snapshot but still the LaunchDaemon doesn’t work.
Thanks a lot in advance,
Manolo
i made the start.sh executable and added it to the start items for my account.
it’s not beautiful because a terminal window is shown but it works.
i have the problem that oh constantly restarts when i configure the daemon.
maybe a launch agent is the way to go? i am not a developer so i don’t know exactly.
Hi Holger, you mention that you don’t use start.sh when starting openHAB as a daemon. How do you start it then? Can you share your plist file? I tried to start karaf directly but still get the same error with the dumb terminal and eventual shutdown.
Hi everyone, I think I found a solution to this problem by adding the parameter ‘server’ to the launchscript for karaf. I think this make sure karaf doesn’t try to launch a terminal:
#!/bin/sh
echo Launching the openHAB runtime…
DIRNAME=dirname "$0"
exec “${DIRNAME}/runtime/bin/karaf” server “${@}”
Hi @Berthold. My startscript works similar. The main problem was that the start.sh script is starting karaf with parameter “start”. (internally the start.sh script calls “…/karaf start”) This includes the startup of the karaf console which is the reason why the rest does not work.
I’m just surprised that there is a parameter “server”. I use the parameter “daemon”.
So what I call from my daemon script is “…/karaf daemon”. This disables the karaf console and everything works fine.
Now you have to options. Either modify start.sh to use the
can you please post your daemon here?
i am still stuck at this …
I managed to make an executable start.command that starts the karat like the start.sh does.
but this opens a terminal window.
I’m not sure if this helps you, because I’m using systemd
at the end you can use the start.sh script too. Just be sure that you call it with the parameter “daemon”
means something like “start.sh daemon” should work. If this is not enough you can also export the environment variable OPENHAB_STARTMODE=daemon. But I guess this variable was just a helper and is not really needed.
hmmm did not work for me. I copied the plist (per drag and drop but that should not matter) into launch deamons and set the rights as described but OH does not start
i had to rename start.sh into start.command to be able to execute it at startup.
do you mean I just have to add the server parameter there or how did you execute the start.sh at launch? did you create the .plist linked In the article for OH1?
ok further progress using the parameters.
server: the terminal window has to stay open or it will quit the server (makes sense).
daemon: I can quit the terminal window and openhab is still running.
now I just need to quit the window after execution. any advice?
Thank you so much, this has sorted it for me. I’m using the same LaunchDaemon, and just added the server to the start.sh and it works. Now running 2.3 on MacOS.