You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
All extensions are loaded and running
HTTP and HTTPS services are ready to be used
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:
thopiekar
changed the title
Start script does not wait until openHAB2 is really up and running
Start/stop script does not wait until openHAB2 is really up and running
Jul 31, 2016
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.
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: