Came at some point into HTTPProxyActor log. The log line has no timestamp… I don’t know the call that was made. However, my question is does anyone know what could cause this error?
Traceback
Traceback (most recent call last):
--
| File "/usr/local/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 136, in handle_events
| event = self.conn.next_event()
| File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 485, in next_event
| exc._reraise_as_remote_protocol_error()
| File "/usr/local/lib/python3.10/site-packages/h11/_util.py", line 77, in _reraise_as_remote_protocol_error
| raise self
| File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 467, in next_event
| event = self._extract_next_receive_event()
| File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 409, in _extract_next_receive_event
| event = self._reader(self._receive_buffer)
| File "/usr/local/lib/python3.10/site-packages/h11/_readers.py", line 81, in maybe_read_from_IDLE_client
| raise LocalProtocolError("illegal request line")
| h11._util.RemoteProtocolError: illegal request line
| WARNING: Invalid HTTP request received.
| Traceback (most recent call last):
| File "/usr/local/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 136, in handle_events
| event = self.conn.next_event()
| File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 485, in next_event
| exc._reraise_as_remote_protocol_error()
| File "/usr/local/lib/python3.10/site-packages/h11/_util.py", line 77, in _reraise_as_remote_protocol_error
| raise self
| File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 467, in next_event
| event = self._extract_next_receive_event()
| File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 409, in _extract_next_receive_event
| event = self._reader(self._receive_buffer)
| File "/usr/local/lib/python3.10/site-packages/h11/_readers.py", line 85, in maybe_read_from_IDLE_client
| matches = validate(
| File "/usr/local/lib/python3.10/site-packages/h11/_util.py", line 91, in validate
| raise LocalProtocolError(msg)
| h11._util.RemoteProtocolError: illegal request line: bytearray(b'SM')
| WARNING: Invalid HTTP request received.
Update:
maybe this comment on SO is relevent.
My issue was that when I was calling my FastAPI microservice I was using https when my microservice did not have HTTPS support. I changed the url from https to http and it started working as expected.
Note that if your service requires HTTPS support you can add HTTPS support as Ilgizar Murzakov suggests.