New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node 14 read ECONNRESET error #145
Comments
I've been running your example code and discovered the following: The issue is not specific to Clinic, Node v14.x or your code example. What is happening?When running Clinic with the included commands, Quick fix for now, would be to run The reason that the errors are logged by the pluginThe HAPI server throws the following log event for this error: {
"channel": "internal",
"tags": ["connection", "client", "error"],
"error": {
"code": "ECONNRESET",
...
}
} This event is being handled by the plugin here. if (!isCustomTagsLoggingIgnored(event, ignoredEventTags.log)) { // first check on ignoring tags
if (event.error) {
logger.error({ err: event.error })
} else {
logEvent(logger, event)
}
} ... it would be possible to ignore these client events with this plugin config: await server.register({
plugin: require('hapi-pino'),
options: {
prettyPrint: true,
ignoredEventTags: { log: ['client'], request: '*' }
}
}) cc @mcollina |
Hi @ovhemert! Thanks for this information! This will be so helpful for us! Can i make a pr with these changes? so we can replace the with
so after this change should be able to ignore this events tags as you are showing here... right?
i know i repeating your comment... I wanna be sure if i'm following you! i'll make a pr with this soom as posible! |
(#149) fixed this issue! |
I'm running performance and capacity tests with Clinic js
but when enable this
hapi-pino
library i receive the following error[1636045080852] INFO (23140 on MacBook-Pro-de-Aaron.local): request completed req: { "id": "1636045080846:MacBook-Pro-de-Aaron.local:23140:kvl6zrp4:12905", "method": "get", "url": "/items", "headers": { "host": "localhost:3000", "connection": "keep-alive" }, "remoteAddress": "127.0.0.1", "remotePort": 56007 } res: { "statusCode": 200, "headers": { "content-type": "application/json; charset=utf-8", "cache-control": "no-cache", "content-length": 96, "accept-ranges": "bytes" } } responseTime: 6 [1636045080853] ERROR (23140 on MacBook-Pro-de-Aaron.local): err: { "type": "Error", "message": "read ECONNRESET", "stack": Error: read ECONNRESET at TCP.onStreamRead (internal/stream_base_commons.js:209:20) at TCP.callbackTrampoline (internal/async_hooks.js:130:17) "errno": -54, "code": "ECONNRESET", "syscall": "read" }
https://github.com/aaestrada/hapi-node-14-example
There is all the information to test and reproduce this error.
or follow this step by step guide:
https://github.com/aaestrada/hapi-node-14-example/tree/master/nodejs-profile
let me know i there is something more than i can do!
The text was updated successfully, but these errors were encountered: