Aiohttp.server Error cause?

At random times throughout the day My HA generates a aiohttp.server error.

“/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py:403”

The last time it did this was at 1:18:42 today… Checking the logs to see what might have cause this… Yields zero suspects.

Other posts on this error point to an issue with either DuckDNS or a bad port forward. right now everything is working fine. (both local and remote access if fine and all cloud services are OK too)…

Just ignore it?

Running on a Pi4, Samsung SSD, Core and HA OS on current version.

File “/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py”, line 332, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “aiohttp/_http_parser.pyx”, line 557, in aiohttp.http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message:
Bad status line "Invalid method encountered:\n\n b’SSTP_DUPLEX_POST /sra
{BA195980-CD49-458b-9E23-C84EE0ADCD75}/ HTTP/1.1\r’\n

Is there a clue in the Long hexadecimal number?

did you figure this out?

i’m getting flooded with that error:

I believe it might be the source of my remote UI issues that means google assistant cannot connect to my instance.

Well for what its worth, mine was a local device using home assistant cloud(https) and being redirected(http) from my DNS rewrite. No idea why it suddenly starting being a problem, but its fixed and it also fixed my HA cloud and Google integration.

I still have the problem… Do you resolve this within HA or was it in your router?

Dear all, I follow this post becouse I have the same problem.
Started with a issue with HA that not want connect and in the log I find it:

Registratore: aiohttp.server
Fonte: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421
Prima occorrenza: 3 maggio 2024 alle ore 08:08:49 (22 occorrenze)
Ultima registrazione: 08:43:55

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 350, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aiohttp/_http_parser.pyx", line 557, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message:
  Invalid method encountered:

    b'\x16\x03\x01'
      ^

Have solved in some way?

Thank you all

+1 here… I face the same errors. I do not feel anything bad in terms of functionality or performance, but I’m generally concerned, because I have no idea where this error is coming from, as the messages do not direct towards any particular integration, addon or something like that…

Logger: aiohttp.server
Quelle: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421
Erstmals aufgetreten: 10:25:18 (175 Vorkommnisse)
Zuletzt protokolliert: 20:46:18

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/soco/events_asyncio.py", line 138, in notify
    variables = parse_event_xml(content)
                ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/soco/events_base.py", line 104, in parse_event_xml
    value = from_didl_string(value)[0]
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/soco/data_structures_entry.py", line 31, in from_didl_string
    root = XML.fromstring(string.encode("utf-8"))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/xml/etree/ElementTree.py", line 1330, in XML
    parser.feed(text)
xml.etree.ElementTree.ParseError: junk after document element: line 1, column 486

Same here with over 50.0000 occurrences in three days.
Unfortunately the error log doesn’t give any information where this might be coming from.

1 Like

According to aiohttp · Issue #108533 · home-assistant/core · GitHub it’s a device doing HTTPS requests on the HTTP port.

Since my firewall blocks port 80 for my HA device and all traffic goes through 443 or 8123, that means that my problem device must be local…

Right?

+1 with the same issue

same here, the log shows my external ip:

 Invalid method encountered:

    b'MGLNDD_188.25.xxx.xxx_8123\n'