question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

aiohttp.server Error

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:29 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Madelinotcommented, Mar 30, 2022

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…

1reaction
emphasizecommented, Jan 23, 2022

Same error over here, but mine started showing after I added SSL via the Nginx Proxy Manager.

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)

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR (MainThread) [aiohttp.server] Error handling request
I'm getting this error on my home-assistant.log, everything was working fine. Don't have any idea of what could it be.
Read more >
Web Server Exceptions — aiohttp 4.0.0a2.dev0 documentation
aiohttp.web defines a set of exceptions for every HTTP status code. ... 100-300 are not really errors; 400s are client errors, and 500s...
Read more >
ERROR (MainThread) [aiohttp.server] Unhandled exception
Hi All, I'm having this error, is it a bug? 2021-07-10 03:02:09 ERROR (MainThread) [aiohttp.server] Unhandled exception Traceback (most ...
Read more >
aiohttp: Getting a server's response when the request status ...
There won't be a HTTP error code or server response in this case. When exactly is the error thrown in your case? –...
Read more >
aiohttp-middlewares 2.2.0 ... - aiohttp_middlewares.error
However in **1.0.0** version ``aiohttp-middlewares`` ships default error ... the default error handler provides 500 Server Error JSON: .. code-block:: json ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found