nuimo-openhab-python icon indicating copy to clipboard operation
nuimo-openhab-python copied to clipboard

Error on startup: 503 Server Error: Jersey is not ready yet!

Open pfink opened this issue 6 years ago • 0 comments

When using the suggested systemd configuration, during startup the following error occurs if this program is running on the same host as openHAB:

nuimo-openhab.service - Nuimo openHAB Integration Service
Loaded: loaded (/etc/systemd/system/nuimo-openhab.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-02-21 17:52:41 GMT; 15h ago
Main PID: 562 (python3)
CGroup: /system.slice/nuimo-openhab.service
└─562 /usr/bin/python3 /home/openhabian/nuimo-openhab-python/main.py
Feb 21 17:53:12 openHABianPi nuimo-openhab[562]: self.main.app_builder.fetch_sitemap()
Feb 21 17:53:12 openHABianPi nuimo-openhab[562]: File "/home/openhabian/nuimo-openhab-python/nuimo_openhab/app_builder.py", line 14, in fetch_sitemap
Feb 21 17:53:12 openHABianPi nuimo-openhab[562]: sitemap = self.openhab.req_get("/sitemaps/" + self.sitemapName)
Feb 21 17:53:12 openHABianPi nuimo-openhab[562]: File "/usr/local/lib/python3.5/dist-packages/openhab/client.py", line 102, in req_get
Feb 21 17:53:12 openHABianPi nuimo-openhab[562]: self._check_req_return(r)
Feb 21 17:53:12 openHABianPi nuimo-openhab[562]: File "/usr/local/lib/python3.5/dist-packages/openhab/client.py", line 86, in _check_req_return
Feb 21 17:53:12 openHABianPi nuimo-openhab[562]: req.raise_for_status()
Feb 21 17:53:12 openHABianPi nuimo-openhab[562]: File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 940, in raise_for_status
Feb 21 17:53:12 openHABianPi nuimo-openhab[562]: raise HTTPError(http_error_msg, response=self)
Feb 21 17:53:12 openHABianPi nuimo-openhab[562]: requests.exceptions.HTTPError: 503 Server Error: Jersey is not ready yet! for url: http://localhost:8080/rest/sitemaps/nuimo

Workaround would be to sleep some seconds before startup. Clean solution is anticipated here: https://github.com/openhab/openhab-linuxpkg/issues/138

pfink avatar Feb 23 '19 17:02 pfink