Showing results for 
Show  only  | Search instead for 
Did you mean: 

socket hang up errors with nodejs apps


We are starting to see Socket Hang up errors on node js applications that appears to point us to dynatrace being an issue. We could be wrong. But, what is interesting is we are moving from CA to dynatrace. When we were not on dynatrace, we didnt see this issue and as soon as we introduced dynatrace we are starting to notice it. Initially we thought it could be us. But, then as we move apps to utilize dynatrace, we are seeing a spike in this error. First SPA and now Lambdas. We have SPA app and AWS lambdas where we have noticed this. Attached are some of sample errors for your reference. Are there any suggestions for us on how to troubleshoot this issue or how to prove this is not dynatrace being the problem?

Any help is greatly appreciated.

From Lambda:

RequestError: socket hang up at ClientRequest.<anonymous> (/var/task/node_modules/got/source/request-as-event-emitter.js:178:14) at ClientRequest.c (/opt/nodejs/node_modules/@dynatrace/oneagent-dependency/agent/bin/ at Object.dynatraceOnServiceExecutionIndicator (/opt/nodejs/node_modules/@dynatrace/oneagent-dependency/agent/bin/ at Object.a.safeInvoke (/opt/nodejs/node_modules/@dynatrace/oneagent-dependency/agent/bin/ at ClientRequest.<anonymous> (/opt/nodejs/node_modules/@dynatrace/oneagent-dependency/agent/bin/ at ClientRequest.emit (events.js:326:22) at ClientRequest.EventEmitter.emit (domain.js:483:12) at ClientRequest.origin.emit (/var/task/node_modules/@szmarczak/http-timer/source/index.js:37:11) at TLSSocket.socketCloseListener (_http_client.js:401:11) at Object.dynatraceOnServiceExecutionIndicator (/opt/nodejs/node_modules/@dynatrace/oneagent-dependency/agent/bin/

From SPA:

Error: socket hang up at createHangUpError (_http_client.js:323:15) at TLSSocket.socketOnEnd (_http_client.js:426:23) at Object.dynatraceOnServiceExecutionIndicator [as doInvoke] (/opt/dynatrace/oneagent/agent/bin/ at Object.b.safeInvoke (/opt/dynatrace/oneagent/agent/bin/ at TLSSocket.<anonymous> (/opt/dynatrace/oneagent/agent/bin/ at TLSSocket.emit (events.js:203:15) at endReadableNT (_stream_readable.js:1145:12) at process._tickCallback (internal/process/next_tick.js:63:19)


DynaMight Guru
DynaMight Guru

I rather suggest you to rise support ticket. If this indeed is kind of bug, support will take care of this.


Regards, Sebastian

Thanks. I have opened a ticket with support.

Community Team
Community Team

In case other Dynatrace users have a similar issue, here are the Support findings:

This is an uncaught exception and Dynatrace is capturing the socket hang up - which is why you see references to Dynatrace in the stack trace. It does not appear that this issue is caused by Dynatrace. If you would like to confirm this, you can disable monitoring on the host generating this service call and note if the issue persists.

Keep calm and build Community!

Featured Posts