I’ve discovered that sometimes the cloud-connector seems to go offline because of “pool destroyed” or similar errors. Sometimes it also goes offline because the cloud is offline (for a short time)…
After some retries, the connector stops retrying and you have to reboot or deactivate and activate the cloud connector again…
Therefore I would have the Idea for an option on the cloud connector, that it reboots the OpenHab installation, when all retries fail, or it can’t make a connection in the last past 30 min…
Would this be reasonable or a good Idea? Or can I achieve this with a rule?
Better would be to fix it so it doesn’t stop trying after awhile and to fix the “pool destroyed”. Let’s cure the disease instead of the symptom.
You can run command line commands from a rule with the Exec binding and executeCommandLine. You could use that to issue a karaf console command to restart the cloud connector bundle.
It works just fine. But the Docker container doesn’t include that much that is useful to call. So there is no ssh available. But you don’t need it. you can run /openhab/runtime/bin/shell <karaf command> and it will open a shell to the karaf console and execute <karaf command>.
For debugging purpose: This is the actual warn I have in the logs about the cloud-connector…it works fine now, but when cloud goes offline it stops after some retries, and doesn’t catch up anymore…(treid it during the last two cloud failures). Last time the cloud was okay, but the connector was simply disconnected…I hope I find the logs… I think the greatest problem with this error is, that it just occurs rarely and on occassion so it will be hard to find the actual problem…
While you are collecting logs, put the cloud connector binding into debug logging. You can even configure it to log to it’s own file. That will give you the maximum amount of information concerning the error which will likely needed by the developers when an issue is filed.
All I can really say is that I’ve not experienced the same behaviors, but I end up restarting OH every few days during system updates.
It takes either a reaaaaally long online time to develop this issue (like one installation I had was online for 6 months infinite, and suddenly cloud connector disconnected) or a failure of the cloud itself which rarely happens…so it will take some time till I get the issue again…