core icon indicating copy to clipboard operation
core copied to clipboard

Finding this error constntly in the Log - Error handling Request

Open Dzoker2 opened this issue 1 year ago • 17 comments

The problem

Logger: aiohttp.server Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:433 First occurred: 13:49:05 (2 occurrences) Last logged: 14:13:27

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

b'\x16\x03\x01\x02\x96\x01'
  ^

What version of Home Assistant Core has the issue?

core-2024.8.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

unknown

Link to integration documentation on our website

No response

Diagnostics information

Sorry, I don't have any details

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

Dzoker2 avatar Aug 26 '24 18:08 Dzoker2

@Dzoker2 this looks like someone is attempting https, when the other side is expecting normal http. Is your homeassistant reachable from outside?

WebSpider avatar Aug 26 '24 21:08 WebSpider

@WebSpider

@Dzoker2 this looks like someone is attempting https, when the other side is expecting normal http. Is your homeassistant reachable from outside?

It is not accessible from outside... I do have an add-on HTTPS Everywhere - https://www.eff.org/https-everywhere in Firefox... could that be the issue? I access my HA via Firefox.

ty

Dzoker2 avatar Aug 26 '24 23:08 Dzoker2

It will most likely be your browser attempting to access the resource with https while it doesn't have the setting to handle SSL

joostlek avatar Aug 27 '24 10:08 joostlek

I have same version and same problem, when trying to login through a nginx proxy manger "reverse proxy" running on the same docker-installation.

It's driving me nuts, because I can't get remote functionality to work at all (only if I login through OpenVPN against the http-address). In Chrome I only get to the part where the "Blue House" shows up - and end up getting "Unable to connect to Home Assistant"... I have a theory, that it could be due to docker running as host - and the docker-nginx (reverse proxy) can't access the hameassistant docker-machine for some lame reason..

This is from my log:

Logger: aiohttp.server Kilde: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:433 Første forekomst: 08.41.13 (44 forekomster) Senest logget: 11.08.50

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

b'\x16\x03\x01\x07\x1c\x01'

It would be great, if a developer could extend the functionality in the log, to say which endpoint the installation is trying to reach, when the exception occur.

amigasger avatar Aug 28 '24 09:08 amigasger

@joostlek

It will most likely be your browser attempting to access the resource with https while it doesn't have the setting to handle SSL

I have deleted the extension from Firefox so it is not forcing https anymore but I still get that error in the logs. anything else I could do to troubleshoot this?

ty

Dzoker2 avatar Aug 30 '24 12:08 Dzoker2

Same issue here. I am very new to all this but willing to help. I currently have a very basic setup using a HA green. Someone mentioned http vs https above and I am using Duck DNS, so could that be the issue? If so, I really dont know enough to try and resolve that while still being able to access my HAOS from outside my network.

MDoom81 avatar Aug 31 '24 15:08 MDoom81

Hi All, It looks like this error stopped after I removed the https://www.eff.org/https-everywhere extension from Firefox. will keep an eye on it.

ty

Dzoker2 avatar Sep 03 '24 01:09 Dzoker2

I spoke too soon, it just happened again:

`Logger: aiohttp.server Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:433 First occurred: 21:57:44 (1 occurrences) Last logged: 21:57:44

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

b'\x16\x03\x01\x02\x96\x01'
  ^`

Dzoker2 avatar Sep 03 '24 02:09 Dzoker2

even with latest HA 2024.9.0

Registratore: aiohttp.server
Fonte: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:433
Prima occorrenza: 14:29:26 (2 occorrenze)
Ultima registrazione: 14:29:34

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

    b'\x16\x03\x01'
      ^

Destroyer061090 avatar Sep 05 '24 14:09 Destroyer061090

Can anyone help with this issue? Same with latest 2024.9.1.

TY

Dzoker2 avatar Sep 07 '24 23:09 Dzoker2

Same issue for me i did not arrive to solve it

sosso-b avatar Sep 18 '24 18:09 sosso-b

same here 2024.9.2

Enregistreur: aiohttp.server
Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:433
S'est produit pour la première fois: 20 septembre 2024 à 08:33:02 (6 occurrences)
Dernier enregistrement: 04:09:46

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

    b'\x16\x03\x01'
      ^

niighthawk avatar Sep 22 '24 12:09 niighthawk

Same issue in 2024.9.3

Dzoker2 avatar Sep 27 '24 14:09 Dzoker2

Same for me

H3rian avatar Oct 08 '24 18:10 H3rian

Same error here;

I'm running Caddy as a reverse proxy and wondering if it could be related to this.

File "aiohttp/_http_parser.pyx", line 563, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message:
  Invalid method encountered:

    b'\x16\x03\x01\x01g\x01'
      ^

ENWOD avatar Oct 10 '24 11:10 ENWOD

Same for me

jontofront avatar Oct 10 '24 13:10 jontofront

Same issue in 2024.10.2

Dzoker2 avatar Oct 15 '24 20:10 Dzoker2

same for current docker installation with image: ghcr.io/home-assistant/home-assistant:stable

herrxyz avatar Oct 18 '24 20:10 herrxyz

same here 2024.10.3 I have no idea where Python3.12 is coming from. I have Python3.11 installed....

DanoBoca avatar Oct 21 '24 07:10 DanoBoca

Same issue in 2024.10.3

Will anyone take a look at this issue?!?

Dzoker2 avatar Oct 25 '24 19:10 Dzoker2

Same issue in 2024.10.4

Dzoker2 avatar Oct 28 '24 19:10 Dzoker2

something changed, my docker installation started today after pulling new image version is now 2024.10.4

herrxyz avatar Oct 28 '24 20:10 herrxyz

Same issue on 2024.10.4 on bare metal behind a caddy reverse proxy.

bccostin avatar Nov 04 '24 18:11 bccostin

Hi, same issue on 2024.11.0

Thank you

Dzoker2 avatar Nov 08 '24 14:11 Dzoker2

Hi I confirm me too same issue 2024.11.0

sosso-b avatar Nov 08 '24 19:11 sosso-b

Same issue on 2024.11.2

Dzoker2 avatar Nov 16 '24 16:11 Dzoker2

Same issue with 2024.11.3

andyfrei avatar Nov 22 '24 14:11 andyfrei

Same here

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 377, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aiohttp/_http_parser.pyx", line 563, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadHttpMessage: 400, message:
  Data after `Connection: close`:

    b'\x00B'

knows-cloud avatar Nov 29 '24 19:11 knows-cloud