Hey guys,
PROBLEM:
I’m having trouble figuring out how to deal with these HTTP errors in my logs. I see roughly one error per second when I ssh into the home assistant server and trail the logs. The error in question looks like this:
2020-08-07 13:04:30 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 275, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File "aiohttp\_http_parser.pyx", line 523, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: invalid HTTP method
I’ve searched around and found a few threads on the subject: here’s one, here’s another, and here’s one more. It looks like most of these threads land on the idea that this errors are due to something trying to access my instances via https instead of http.
SETUP:
My setup is pretty simple. I’m running the latest 64bit version Home Assistant OS on an RPI4. I’m using Nabu Casa for external access, and internally I’m not using ssl. My instance of HA is accessible on LAN via http://homeassistant.local:8123.
For add-ons, I’m running the following:
For UI integrations:
For yaml integrations:
doods, generic camera, netgear, google calendar, google cloud tts.
For custom components:
HACS and Node-RED, along with a bunch of themes and front end stuff pulled down from HACS
WHAT I’VE DONE SO FAR:
I’ve trailed the logs via ssh during a restart of HA and have not found any pattern regarding when this error first shows up. Sometimes it first appears when zigbee is setting up, sometimes when netgear is setting up, and sometimes when i think nabu casa is setting up.
Here’s an example of a first appearance after restart with logging set to debug. It pops up when some ZHA and roomba stuff is setting up. The restart began at 11:12:10, so this is about 11 seconds after:
2020-08-07 11:12:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=vacuum.roomba_eve, old_state=None, new_state=<state vacuum.roomba_eve=paused; fan_speed_list=['Automatic', 'Eco', 'Performance'], battery_level=34, battery_icon=mdi:battery-30, fan_speed=Eco, software_version=v2.4.13-119, status=Charging, position=(-537, -294, 129), bin_present=True, bin_full=True, friendly_name=Roomba - Status, supported_features=13308 @ 2020-08-07T11:12:21.349621-05:00>>
2020-08-07 11:12:21 DEBUG (MainThread) [zigpy_deconz.api] Read parameter nwk_panid response: [0xfaf2]
2020-08-07 11:12:21 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_indication (1, 1)
2020-08-07 11:12:21 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x170a000800010001
2020-08-07 11:12:21 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 275, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File "aiohttp\_http_parser.pyx", line 523, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: invalid HTTP method
2020-08-07 11:12:21 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.548042845680] Sending {'id': 4, 'type': 'event', 'event': <Event state_changed[L]: entity_id=vacuum.roomba_eve, old_state=None, new_state=<state vacuum.roomba_eve=paused; fan_speed_list=['Automatic', 'Eco', 'Performance'], battery_level=34, battery_icon=mdi:battery-30, fan_speed=Eco, software_version=v2.4.13-119, status=Charging, position=(-537, -294, 129), bin_present=True, bin_full=True, friendly_name=Roomba - Status, supported_features=13308 @ 2020-08-07T11:12:21.349621-05:00>>}
I’ve made sure all add-ons are configured with ssl:false
or equivalent.
I don’t have any port forwards set up in my router. UPnP is off in the router.
I have disabled netgear, all generic cameras, and doods and the errors still appear. Typically one a second but sometimes less frequent.
Any help here? Do i start going nuclear and killing integrations until i find the one? This isn’t something related to nabu casa is it?