home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.67k stars 30.42k forks source link

ONVIF: Unclosed client session #36344

Closed McGiverGim closed 4 years ago

McGiverGim commented 4 years ago

The problem

I have several lines in the home assistant log with the message:

ERROR (SyncWorker_5) [homeassistant.core] Error doing job: Unclosed client session

After playing a little with the integrations trying to find the culprit, it seems it is the Onvif integration if my camera is off. I have one of this message with each of this other:

WARNING (MainThread) [homeassistant.config_entries] Config entry for onvif not ready yet. Retrying in 40 seconds.

And if I power on the camera any of those messages appear more.

I think it only happens when the camera is off and I restart Home Assistant. If I power off it after it has been detected this message does not appear.

Environment

Problem-relevant configuration.yaml

Used the flow to add the integration.

Traceback/Error logs

Sample of the log messages.

2020-06-01 15:05:31 WARNING (MainThread) [homeassistant.components.onvif] Couldn't connect to camera 'Cámara trastero', but will retry later. Error: Cannot connect to host camara-trastero.piminet:8899 ssl:None [Connect call failed ('192.168.100.13', 8899)]
2020-06-01 15:05:31 WARNING (MainThread) [homeassistant.config_entries] Config entry for onvif not ready yet. Retrying in 40 seconds.
2020-06-01 15:06:16 WARNING (MainThread) [homeassistant.components.onvif] Couldn't connect to camera 'Cámara trastero', but will retry later. Error: Cannot connect to host camara-trastero.piminet:8899 ssl:None [Connect call failed ('192.168.100.13', 8899)]
2020-06-01 15:06:16 WARNING (MainThread) [homeassistant.config_entries] Config entry for onvif not ready yet. Retrying in 80 seconds.
2020-06-01 15:07:45 WARNING (MainThread) [homeassistant.components.onvif] Couldn't connect to camera 'Cámara trastero', but will retry later. Error: Cannot connect to host camara-trastero.piminet:8899 ssl:None [Connect call failed ('192.168.100.13', 8899)]
2020-06-01 15:07:45 WARNING (MainThread) [homeassistant.config_entries] Config entry for onvif not ready yet. Retrying in 80 seconds.
2020-06-01 15:07:46 ERROR (SyncWorker_5) [homeassistant.core] Error doing job: Unclosed client session
2020-06-01 15:07:46 ERROR (SyncWorker_5) [homeassistant.core] Error doing job: Unclosed client session
2020-06-01 15:07:46 ERROR (SyncWorker_5) [homeassistant.core] Error doing job: Unclosed client session
2020-06-01 15:09:14 WARNING (MainThread) [homeassistant.components.onvif] Couldn't connect to camera 'Cámara trastero', but will retry later. Error: Cannot connect to host camara-trastero.piminet:8899 ssl:None [Connect call failed ('192.168.100.13', 8899)]
2020-06-01 15:09:14 WARNING (MainThread) [homeassistant.config_entries] Config entry for onvif not ready yet. Retrying in 80 seconds.
2020-06-01 15:10:43 WARNING (MainThread) [homeassistant.components.onvif] Couldn't connect to camera 'Cámara trastero', but will retry later. Error: Cannot connect to host camara-trastero.piminet:8899 ssl:None [Connect call failed ('192.168.100.13', 8899)]
2020-06-01 15:10:43 WARNING (MainThread) [homeassistant.config_entries] Config entry for onvif not ready yet. Retrying in 80 seconds.
2020-06-01 15:12:04 ERROR (MainThread) [homeassistant.core] Error doing job: Unclosed client session
2020-06-01 15:12:04 ERROR (MainThread) [homeassistant.core] Error doing job: Unclosed client session

Additional information

None.

probot-home-assistant[bot] commented 4 years ago

Hey there @hunterjm, mind taking a look at this issue as its been labeled with a integration (onvif) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

stale[bot] commented 4 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.