core: aiohttp.server Error
The problem
Getting error in system log Logger: aiohttp.server Source: /usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py:405
What version of Home Assistant Core has the issue?
2021.12.7
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
No response
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: /usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py:405
First occurred: December 30, 2021, 18:50:01 (4 occurrences)
Last logged: 07:18:26
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 334, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 34 (1 by maintainers)
I was forwarding 443 to 8123 directly. I was in effect bypassing NGINX. Of course, I had to forward 443 to 443, then NGINX forwards 443 to 8123. So simple and obvious…
Same error happens when I use a Long-Lived Access Token to send a POST to
/api/alexa/smart_homevia public URL or internal IP of my Home Assistant instance running 2023.1.7:I suspect the error is related to configuration in
http:and those in Settings -> System -> Network -> Home Assistant URLMy set up ingress is proxied through Cloudflared:
Home Assistant URL has the public facing Cloudflare hosted https URL in Internet field, with the internal IP:8123 in the Local Network.
Saw this as i wanted to figure out if it is possible two serve up both http and https via NPM (which is not easily possible, at least not to my knownledge). I would suspect the configuration.yaml has no ssl_key/ssl_certificate entry or you transport a http to the home assistant instance which expects https (signified by the key) and therfor confusing aiohttp. (https has to be forced by npm)