Skip to content

Instantly share code, notes, and snippets.

@parshap
Last active January 5, 2016 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parshap/80473cfac105fabccf12 to your computer and use it in GitHub Desktop.
Save parshap/80473cfac105fabccf12 to your computer and use it in GitHub Desktop.
Newrelic crash in http instrumentation

I'm seeing this crash happen in a node http service running the newrelic agent. It seems to happen in this context:

  1. An http request causes an unrecoverable error (unrelated to newrelic)
  2. req.end() and req.destroy() are called on the request that caused the error
  3. server.close() is called on the http server
  4. The newrelic agent throws the above error

I am using node v4.2.3 and newrelic agent 1.24.0.

TypeError: Cannot read property 'port' of null
at Server.wrappedHandler (/home/deploy/run/web/node_modules/newrelic/lib/instrumentation/core/http.js:57:38)
at Server.wrapped (/home/deploy/run/web/node_modules/newrelic/lib/transaction/tracer/index.js:155:28)
at Server.wrapTransactionInvocation (/home/deploy/run/web/node_modules/newrelic/lib/transaction/tracer/index.js:79:65)
at emitTwo (events.js:87:13)
at Server.emit (events.js:172:7)
at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:528:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment