# APM connection is getting killed in nodejs

**URL:** <https://discuss.elastic.co/t/apm-connection-is-getting-killed-in-nodejs/169484>\
**Category:** APM\
**Created:** [February 21, 2019, 8:33pm UTC](https://discuss.elastic.co/t/apm-connection-is-getting-killed-in-nodejs/169484 "2019-02-21T20:33:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronak\_Patel1](https://avatars.discourse-cdn.com/v4/letter/r/a698b9/32.png) [@Ronak\_Patel1](https://discuss.elastic.co/u/Ronak_Patel1)\
**Post date:** [February 21, 2019, 8:33pm UTC](https://discuss.elastic.co/t/apm-connection-is-getting-killed-in-nodejs/169484/1 "2019-02-21T20:33:24Z")

</div>

**Kibana version** : 6.6.0

**Elasticsearch version** : 6.6.0

**APM Server version** : 6.6.1

**APM Agent language and version** : nodejs

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**: Client and server both running in kubernetes cluster

**Fresh install or upgraded from other version?** Fresh. Using Azure template for ELK stake.

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:

**Steps to reproduce** :

1. Get ELK stack on Azure by official template.
2. Run APM server in kubernetes cluster.
3. Run nodejs application with APM client within the same kubernetes cluster.
4. Try to connect it using kubernetes internal DNS (apm-server.default.svc.cluster.local:8200)

**Provide logs and/or server output (if relevant)**:  
adding hook to Node.js module loader  
shimming finalhandler@1.1.1 module  
shimming http@10.0.0 module  
shimming http.Server.prototype.emit function  
shimming http.request function  
shimming http.ServerResponse.prototype.writeHead function  
shimming express@4.16.4 module  
shimming express.Router.process\_params function  
shimming express.Router.use function  
shimming express.static function  
copying property mime from express.static  
shimming bluebird@3.5.3 module  
shimming bluebird.prototype functions: ['\_then', '\_addCallbacks']  
shimming bluebird.config  
shimming generic-pool@3.6.1 module  
shimming generic-pool.PriorityQueue.prototype.enqueue  
shimming mysql2@1.6.5 module  
shimming https@10.0.0 module  
shimming https.Server.prototype.emit function  
shimming https.request function  
shimming graphql@14.1.1 module  
shimming express-graphql@0.6.12 module  
shimming layer.handle\_request function (layer: )  
shimming layer.handle\_request function (layer: )  
skip shimming layer.handle\_request (layer: urlencodedParser, path: /)  
skip shimming layer.handle\_request (layer: jsonParser, path: /)  
skip shimming layer.handle\_request (layer: helmet, path: /)  
skip shimming layer.handle\_request (layer: cookieParser, path: /)  
skip shimming layer.handle\_request (layer: corsMiddleware, path: /)  
skip shimming layer.handle\_request (layer: serveStatic, path: /)  
shimming layer.handle\_request function (layer: csrf)  
shimming layer.handle\_request function (layer: router)  
shimming layer.handle\_request function (layer: router)  
shimming layer.handle\_request function (layer: auth)  
shimming layer.handle\_request function (layer: router)  
shimming layer.handle\_request function (layer: )  
shimming layer.handle\_request function (layer: router)  
shimming layer.handle\_request function (layer: router)  
skip shimming layer.handle\_request (layer: , path: /)  
no active transaction found - cannot build new span  
intercepted call to http.request { id: null }  
no active transaction found - cannot build new span  
no active transaction found - cannot build new span  
intercepted call to generic-pool.PriorityQueue.prototype.enqueue { id: null }  
no active transaction found - cannot build new span  
no active transaction found - cannot build new span  
Killed  
npm ERR! code ELIFECYCLE  
npm ERR! errno 137  
npm ERR! my-api@0.0.0 staging: `NODE_ENV=staging node src/loader.js`  
npm ERR! Exit status 137  
npm ERR!  
npm ERR! Failed at the my-api@0.0.0 staging script.  
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:  
npm ERR! /home/node/.npm/\_logs/2019-02-21T20\_20\_57\_725Z-debug.log

---

<div class="post-metadata">

**Author:** ![stephenbelanger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenbelanger/32/34880_2.png) [@stephenbelanger](https://discuss.elastic.co/u/stephenbelanger)\
**Post date:** [February 23, 2019, 1:20am UTC](https://discuss.elastic.co/t/apm-connection-is-getting-killed-in-nodejs/169484/2 "2019-02-23T01:20:27Z")

</div>

I don't see anything in that log indicating that this is caused by the Node.js APM agent. Do you have more context you could provide? Do you know what exactly the code is doing when it stops?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 15, 2019, 9:20pm UTC](https://discuss.elastic.co/t/apm-connection-is-getting-killed-in-nodejs/169484/3 "2019-03-15T21:20:27Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
