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.72k stars 30.45k forks source link

Reolink NVR - Onvif - Unknown Error #58702

Closed fmacmahon closed 2 years ago

fmacmahon commented 2 years ago

The problem

After upgrading Reolink NVR for v3.0.0.148_21100909 firmware.

Logger: aiohttp.server Source: components/onvif/config_flow.py:198 First occurred: 16:05:14 (1 occurrences) Last logged: 16:05:14

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 61, in map_httpcore_exceptions yield File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 281, in handle_async_request ) = await self._pool.handle_async_request( File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 234, in handle_async_request response = await connection.handle_async_request( File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 136, in handle_async_request self.socket = await self._open_socket(timeout) File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 163, in _open_socket return await self._backend.open_tcp_stream( File "/usr/local/lib/python3.9/site-packages/httpcore/_backends/auto.py", line 44, in open_tcp_stream return await self.backend.open_tcp_stream( File "/usr/local/lib/python3.9/site-packages/httpcore/_backends/anyio.py", line 154, in open_tcp_stream stream = await TLSStream.wrap( File "/usr/local/lib/python3.9/contextlib.py", line 137, in exit self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions raise to_exc(exc) from None httpcore.ConnectError: All connection attempts failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request resp = await self._request_handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle resp = await handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 220, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 157, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper result = await method(view, request, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 111, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 198, in async_configure result = await self._async_handle_step(flow, cur_step["step_id"], user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 256, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 158, in async_step_configure return await self.async_setup_profiles() File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 198, in async_setup_profiles await device.update_xaddrs() File "/usr/local/lib/python3.9/site-packages/onvif/client.py", line 297, in update_xaddrs capabilities = await devicemgmt.GetCapabilities({"Category": "All"}) File "/usr/local/lib/python3.9/site-packages/zeep/proxy.py", line 64, in call return await self._proxy._binding.send_async( File "/usr/local/lib/python3.9/site-packages/zeep/wsdl/bindings/soap.py", line 156, in send_async response = await client.transport.post_xml( File "/usr/local/lib/python3.9/site-packages/zeep/transports.py", line 230, in post_xml response = await self.post(address, message, headers) File "/usr/local/lib/python3.9/site-packages/zeep/transports.py", line 215, in post response = await self.client.post( File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1825, in post return await self.request( File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1494, in request response = await self.send( File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1586, in send response = await self._send_handling_auth( File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1616, in _send_handling_auth response = await self._send_handling_redirects( File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1655, in _send_handling_redirects response = await self._send_single_request(request, timeout) File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1699, in _send_single_request ) = await transport.handle_async_request( File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 276, in handle_async_request ( File "/usr/local/lib/python3.9/contextlib.py", line 137, in exit self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 78, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectError: All connection attempts failed

What version of Home Assistant Core has the issue?

core-2021.10.6

What was the last working version of Home Assistant Core?

core-2021.10.6

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Onvif

Link to integration documentation on our website

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: aiohttp.server
Source: components/onvif/config_flow.py:198
First occurred: 16:05:14 (1 occurrences)
Last logged: 16:05:14

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 61, in map_httpcore_exceptions
    yield
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 281, in handle_async_request
    ) = await self._pool.handle_async_request(
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 234, in handle_async_request
    response = await connection.handle_async_request(
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 136, in handle_async_request
    self.socket = await self._open_socket(timeout)
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 163, in _open_socket
    return await self._backend.open_tcp_stream(
  File "/usr/local/lib/python3.9/site-packages/httpcore/_backends/auto.py", line 44, in open_tcp_stream
    return await self.backend.open_tcp_stream(
  File "/usr/local/lib/python3.9/site-packages/httpcore/_backends/anyio.py", line 154, in open_tcp_stream
    stream = await TLSStream.wrap(
  File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions
    raise to_exc(exc) from None
httpcore.ConnectError: All connection attempts failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 220, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 157, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 111, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 198, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 256, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 158, in async_step_configure
    return await self.async_setup_profiles()
  File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 198, in async_setup_profiles
    await device.update_xaddrs()
  File "/usr/local/lib/python3.9/site-packages/onvif/client.py", line 297, in update_xaddrs
    capabilities = await devicemgmt.GetCapabilities({"Category": "All"})
  File "/usr/local/lib/python3.9/site-packages/zeep/proxy.py", line 64, in __call__
    return await self._proxy._binding.send_async(
  File "/usr/local/lib/python3.9/site-packages/zeep/wsdl/bindings/soap.py", line 156, in send_async
    response = await client.transport.post_xml(
  File "/usr/local/lib/python3.9/site-packages/zeep/transports.py", line 230, in post_xml
    response = await self.post(address, message, headers)
  File "/usr/local/lib/python3.9/site-packages/zeep/transports.py", line 215, in post
    response = await self.client.post(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1825, in post
    return await self.request(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1494, in request
    response = await self.send(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1586, in send
    response = await self._send_handling_auth(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1616, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1655, in _send_handling_redirects
    response = await self._send_single_request(request, timeout)
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1699, in _send_single_request
    ) = await transport.handle_async_request(
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 276, in handle_async_request
    (
  File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 78, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectError: All connection attempts failed

Additional information

No response

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

onvif documentation onvif source (message by IssueLinks)

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

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

fmacmahon commented 2 years ago

The error desappeared. It's working again.