Using hapi.js with a winston logger the messages we get every now and then is:
data: {"bytesParsed":0,"code":"HPE_INVALID_EOF_STATE"}
What does it mean and where does it come from?
It is an error from the nodejs http parser, see here for more details. I am no c expert as to why you are hitting this error but have never encountered with hapi or node. See this issue on an old version of node also for some more context.
Within HPE_INVALID_EOF_STATE
, HPE
stands for HTTP PARSER ERROR and EOF
is end of file. You could read this as an HTTP parser error that encountered an unexpected end-of-file (or string).
So let's look a bit deeper. When looking that particular line I see that the HPE_INVALID_EOF_STATE
error happens when an HTTP packet of 0 bytes arrives.
It happens in the http_parser_execute()
method and it's likely due to a malformed HTTP packet arriving. It looks like it's been resolved in this case which was for an older version of Node.js:
https://github.com/nodejs/node-v0.x-archive/issues/5220
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With