Skip to content

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

Description

@pfink

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: openhab/openhab-linuxpkg#138

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions