core: HTTP fails to start if cameras cannot be setup

The problem

If there is an issue setting up the camera integration, the HTTP server will fail to load and home assistant will be completely inaccessible.

Environment

  • Home Assistant Core release with the issue: 0.110
  • Last working Home Assistant Core release (if known): 0.109.6
  • Operating environment (Home Assistant/Supervised/Docker/venv): Docker
  • Integration causing this issue: http + camera
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml

- platform: generic
  # Note that this camera is currently unplugged, but didn't cause any problems in 0.109.x
  still_image_url: http://192.168.1.96/snap.jpeg
  stream_source: rtsp://192.168.1.60:7447/5de6188051ec9659df33fsdceb6441b2_2
  name: G3 Flex

Traceback/Error logs


Additional information

There wouldn’t be any errors visible to suggest the problem, I had to go through my integrations one by one to find the culprit. Instead, it would always be in the starting state and never complete. Removing the unavailable cameras fixes the issue.

The issue should be reproducible by setting up a generic camera pointing to a URL with a long timeout on it.

There are similar issues at #35873 and #35888

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (12 by maintainers)

Most upvoted comments

We now have the following startup improvements in 0.111

I’m not saying they should be cancelled, just they the logging should be improved. There’s a massive jump between 10 seconds and 30 minutes, with the user not knowing what’s happening in between.

A log on a 1m loop with something like

Waiting for the following integrations to complete:
- [ ] camera
- [x] rest
- [x] spotify

For example would make debugging much better. However the fix in #36093 would also go a long way in helping.

(Originally posted on the PR):

30 minutes seems a bit long, but maybe we can add some logs after 2m or 5m? Something like “Waiting {x}m for slower integrations to complete setup”. When I was debugging my issue there was absolutely nothing in the logs and it seemed that everything had just given up.

I have the same issue since upgrading to 0.110., unfortunately disabling the camera integration didn’t help, too many integrations to try manually ☹️