ERROR (MainThread) [aiohttp.server] Error handling request


#1

I’m getting this error on my home-assistant.log, everything was working fine. Don’t have any idea of what could it be.

ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py”, line 278, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File “aiohttp/_http_parser.pyx”, line 273, in aiohttp._http_parser.HttpParser.feed_data (aiohttp/_http_parser.c:4351)
aiohttp.http_exceptions.BadStatusLine: invalid HTTP method


#2

which version of HA are you using ? Have you tried to upgrade to the latest version ?


#3

I’m using v 0.46.1, I’ve also tried with dev version.
I’m running HA on my Synology NAS using the official docker image.

Tried a fresh install of both versions with same error.


#4

Sorry for hijacking the thread, but this was the only ticket I could find Googling. The problem still persists. I’m experiencing this on a clean install with Docker on 0.49.0

2017-07-17 23:59:55 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py”, line 278, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File “aiohttp/_http_parser.pyx”, line 274, in aiohttp._http_parser.HttpParser.feed_data (aiohttp/_http_parser.c:4364)
aiohttp.http_exceptions.BadStatusLine: invalid HTTP method


#5

Almost the same by me, using the latest version (0.49.1), but I was experiencing it right before the upgrade as well:

2017-07-28 16:56:51 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.5/dist-packages/aiohttp/web_protocol.py”, line 278, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File “aiohttp/_http_parser.pyx”, line 274, in aiohttp._http_parser.HttpParser.feed_data (aiohttp/_http_parser.c:4364)
aiohttp.http_exceptions.BadStatusLine: invalid HTTP method


#6

Hey peeps i’m getting the same issue. Did this get resolved?


#7

I found this problem on my docker install of hass. It stoped when Im added the base_url on the configuration file. I matched the base url with the url i’m using to access the docker container (hass.mydomane.com:8123) and now the error is gone.


Node-red-contrib-home-assistant-websocket
#8

I got this error after one of my cameras went dead. Error was resolved after a re-boot of the camera.


#9

I am getting this error and after a little debugging it looks like this exception will occur any time something tries to connect using HTTPS and hass is setup for HTTP.


#10

Months later, new install, same issue. This time… Spaces!!. I had
http:
ssl_certificate: …

There was an space at the beginning of the http line. No errors on check. It was driving me crazy!!.. YAML is insanely strict, but you usually you get formatting errors, not this time, just a weird behavior.


#11

hi all - i fixed this by adding the full address of the site into the http: component under base_url
I believe the error comes is caused in most instances by using https without having this set in the configuration.yaml

http:
  base_url: https://hass.example.com

#12

I’ve always had it in that format so don’t think it’s the issue…