-
-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start/stop script does not wait until openHAB2 is really up and running #258
Comments
These scripts are part of Karaf, not openHAB and they launch a service in the background, which is an operation that has to return quickly and not block. Once eclipse-archived/smarthome#1896 is implemented, we could add a service that writes a file to the filesystem to indicate that the HTTP server and all bundles are up and running. You could then check for the existence of this file in your scripts. |
Great! Thank you for the info 👍 |
On desktop computers this problem does not occur, but when launching openHAB2 here on my QNAP NAS I noticed the following.
When starting openHAB2 with the script (that is also used in the RPi docs) the script is not waiting until the service is really up. That means to me:
The QNAP is able to wait for a service to be turned on. The result is at the moment that if you enable the service, that a "open" button appears really quickly. Clicking on it will show a eg. "service not available" message.
Same for the "stop" script. In theory you are able to start the service again right after stopping it, while openHAB2 is still shutting down. Currently I'm doing checks whether OPENHAB_HTTP_PORT or OPENHAB_HTTP_PORT are still being used, before rerunning openHAB2.
The scripts I mentioned above:
${QPKG_DISTRIBUTION}/runtime/karaf/bin/[start, stop]
Was not sure where this problem actually belongs to, so added it here first.
Regards
The text was updated successfully, but these errors were encountered: