sdwilsh / hass-truenas

TrueNAS integration for Home Assistant
MIT License
39 stars 11 forks source link

ConnectionResetError: Cannot write to closing transport #72

Open sepahewe opened 3 years ago

sepahewe commented 3 years ago

Hi,

Home Assistant: 2021.10.7 hacs: 1.15.2 hass-truenas: 0.21

Fresh install on my Hass server. I've set host, auth type=apikey and set the api key through Hass UI, but get the following error:

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/hassio/http.py", line 78, in _handle return await self._command_proxy(path, request) File "/usr/src/homeassistant/homeassistant/components/hassio/http.py", line 116, in _command_proxy await response.write(data) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_response.py", line 470, in write await self._payload_writer.write(data) File "/usr/local/lib/python3.9/site-packages/aiohttp/http_writer.py", line 107, in write self._write(chunk) File "/usr/local/lib/python3.9/site-packages/aiohttp/http_writer.py", line 67, in _write raise ConnectionResetError("Cannot write to closing transport") ConnectionResetError: Cannot write to closing transport

When I try to call my nas using curl, from my hass server, it works great (curl "https://nas.mydomain.com/api/v2.0/user" -k -X GET -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")

sdwilsh commented 3 years ago

Are you sure this is related to this integration? That entire stack looks like core home-assistant.

sepahewe commented 3 years ago

I ran journalctl -f in a separate window and the error occurs once everytime I try to configure the truenas integration. I've grepped the logs and I can't find that error on other occasions