Archive

cancel
Showing results for 
Search instead for 
Did you mean: 

NodeJS app Agent no connecting to Controller

SOLVED
Highlighted
Regular Visitor

NodeJS app Agent no connecting to Controller

Hello - 

Problem Sympton -

NodeJS App Agent dosen't connect to Controler.

 

Scenario -

1. NodeJS app

2. Everything seems to be working fine from the App and console side

3. App never shows up in the Controler UI.

4.   agentState: 'UNREGISTERED'  message in log

5 Output in the console follows:

  logs:

   { out:

      [ { msg: 'agent.tmpDir = "/tmp/appd/4c0e281b0ccdfa0accebcae670d4b8ed"',

          t: '14-08-2015 20:37:45.654' },

        { msg: 'agent.proxyCtrlDir = "/tmp/appd/4c0e281b0ccdfa0accebcae670d4b8ed/proxy/c"',

          t: '14-08-2015 20:37:45.656' },

        { msg: 'Loaded native extention.',

          t: '14-08-2015 20:37:45.662' },

        { msg: 'launching proxy from master node 0',

          t: '14-08-2015 20:37:45.664' },

        { msg: 'ProcessScanner - maxSnapshotsPerPeriod: 2',

          t: '14-08-2015 20:37:45.698' },

        { msg: 'ProcessScanner - snapshotCountResetPeriodMS: 60000',

          t: '14-08-2015 20:37:45.699' },

        { msg: 'ProcessScanner - autoSnapshotDurationSeconds: 10',

          t: '14-08-2015 20:37:45.699' },

        { msg: 'found cluster module', t: '14-08-2015 20:37:45.719' },

        { msg: 'found fs module', t: '14-08-2015 20:37:45.720' },

        { msg: 'found http module', t: '14-08-2015 20:37:45.727' },

        { msg: 'found https module', t: '14-08-2015 20:37:45.732' },

        { msg: 'found net module', t: '14-08-2015 20:37:45.758' },

        { msg: 'proxyArgs = [\n "-d",\n "/Users/Gaby/Documents/Technical/twilio/Twilio_Twitter/node_modules/appdynamics/node_modules/appdynamics-proxy/proxy",\n "-r",\n "/tmp/appd/4c0e281b0ccdfa0accebcae670d4b8ed/proxy/r",\n "-j",\n "/Users/Gaby/Documents/Technical/twilio/Twilio_Twitter/node_modules/appdynamics/node_modules/appdynamics-jre/jre",\n "--",\n "/tmp/appd/4c0e281b0ccdfa0accebcae670d4b8ed/proxy/c",\n "/tmp/appd/4c0e281b0ccdfa0accebcae670d4b8ed/proxy/l",\n "-Dregister=false"\n]',

          t: '14-08-2015 20:37:46.653' },

        { msg: 'cmdLine = /Users/Gaby/Documents/Technical/twilio/Twilio_Twitter/node_modules/appdynamics/node_modules/appdynamics-proxy/proxy/runProxy -d /Users/Gaby/Documents/Technical/twilio/Twilio_Twitter/node_modules/appdynamics/node_modules/appdynamics-proxy/proxy -r /tmp/appd/4c0e281b0ccdfa0accebcae670d4b8ed/proxy/r -j /Users/Gaby/Documents/Technical/twilio/Twilio_Twitter/node_modules/appdynamics/node_modules/appdynamics-jre/jre -- /tmp/appd/4c0e281b0ccdfa0accebcae670d4b8ed/proxy/c /tmp/appd/4c0e281b0ccdfa0accebcae670d4b8ed/proxy/l -Dregister=false',

          t: '14-08-2015 20:37:46.654' },

        { msg: 'Proxy logging to: /tmp/appd/4c0e281b0ccdfa0accebcae670d4b8ed/proxy/l',

          t: '14-08-2015 20:37:46.662' },

        { msg: 'Proxy spawned!', t: '14-08-2015 20:37:46.662' },

        { msg: 'starting control socket..',

          t: '14-08-2015 20:37:50.685' } ],

     err: [] } }

appdynamics v4.1.3.0 (14-08-2015 20:37:53.025): control response message received from proxy

appdynamics v4.1.3.0 (14-08-2015 20:37:55.032): { type: 'CONFIG',

  configReq:

   { lastVersion: -1,

     nodejsProcessMetrics:

      { cpuUsage: 9,

        heapSize: 28,

        nodeRss: 57,

        numOfFullGCs: 1,

        numOfIncGCs: 7,

        heapSizeChange: 19,

        diskIOKBReadPerSec: 2767,

        diskIOKBWrittenPerSec: 3,

        netwIOKBReadPerSec: 0,

        netwIOKBWrittenPerSec: 0,

        socketIOConnections: 0,

        socketIOConnectionsTotal: 0,

        socketIOMessagesSent: 0,

        socketIOMessagesReceived: 0,

        socketIOSentMessagesSize: 0,

        socketIOReceivedMessagesSize: 0,

        eventLoopTickCount: 90,

        eventLoopMinTickLength: 0,

        eventLoopMaxTickLength: 5,

        eventLoopAvgTickLength: 0,

        eventLoopAvgIOTime: 0 } } }

phone number +14152548385

error [object Object]

appdynamics v4.1.3.0 (14-08-2015 20:38:23.032): { type: 'CONFIG',

  configReq:

   { lastVersion: -1,

     nodejsProcessMetrics:

      { cpuUsage: 1,

        heapSize: 31,

        nodeRss: 55,

        numOfFullGCs: 0,

        numOfIncGCs: 0,

        heapSizeChange: 0,

        diskIOKBReadPerSec: 84,

        diskIOKBWrittenPerSec: 0,

        netwIOKBReadPerSec: 0,

        netwIOKBWrittenPerSec: 0,

        socketIOConnections: 0,

        socketIOConnectionsTotal: 0,

        socketIOMessagesSent: 0,

        socketIOMessagesReceived: 0,

        socketIOSentMessagesSize: 0,

        socketIOReceivedMessagesSize: 0,

        eventLoopTickCount: 299,

        eventLoopMinTickLength: 0,

        eventLoopMaxTickLength: 48,

        eventLoopAvgTickLength: 0,

        eventLoopAvgIOTime: 0 } } }

appdynamics v4.1.3.0 (14-08-2015 20:38:23.094): config response message received from proxy

appdynamics v4.1.3.0 (14-08-2015 20:38:23.094): { currentVersion: '1442288275105',

  agentState: 'UNREGISTERED',

  timestampSkew: '0' }

NodeJS app Agent no connecting to Controller
8 REPLIES

Re: NodeJS app Agent no connecting to Controller

Any update on this issue? I'm facing the same problem.

Re: NodeJS app Agent no connecting to Controller

Hi. 

 

I would make sure that you've properly set the "require" statement per the document:

 

https://docs.appdynamics.com/display/PRO41/Install+the+Node.js+Agent

 

Make sure your controller info including access key are all correct. 

New Contributor

Re: NodeJS app Agent no connecting to Controller

I've got the same issue. My controller-info.xml is correct. Please could we get some support on this that go beyond the "read the manual" type responses?

appdynamics v4.2.15.0 (28-03-2017 09:36:01.525): config response message received from proxy
appdynamics v4.2.15.0 (28-03-2017 09:36:01.525): { currentVersion: '1493367333962', agentState: 'UNREGISTERED' }

Employee

Re: NodeJS app Agent no connecting to Controller

Hi James,

 

Could you please share the require appdynamics block you added to your nodejs app code, after masking the accesskey and controller host.

 

Please don't remove the fields, just mask it.

 

Thanks

Ayush

 

 

New Contributor

Re: NodeJS app Agent no connecting to Controller

Hi,

 

Here it is:


require('appdynamics').profile({
  controllerHostName: '######.saas.appdynamics.com',
  controllerPort: 443,
  controllerSslEnabled: true,
  accountName: '#####',
  accountAccessKey: '#####',
  applicationName: '#####',
  nodeName: 'Product Cache'
  tierName: 'Product Cache API 1'
});


controller xml on the machine agent is configured not to have a tier, node or application name as per the instructions.

With debug: true set I get the following:

 

 

appdynamics v4.2.15.0 (28-03-2017 10:17:01.779): { type: 'CONFIG',
configReq:
{ lastVersion: 1493367334002,
nodejsProcessMetrics:
{ cpuUsage: 0,
heapSize: 29,
nodeRss: 51,
numOfFullGCs: 0,
numOfIncGCs: 1,
heapSizeChange: 0,
diskIOKBReadPerSec: 0,
diskIOKBWrittenPerSec: 0,
netwIOKBReadPerSec: 0,
netwIOKBWrittenPerSec: 0,
socketIOConnections: 0,
socketIOConnectionsTotal: 0,
socketIOMessagesSent: 0,
socketIOMessagesReceived: 0,
socketIOSentMessagesSize: 0,
socketIOReceivedMessagesSize: 0,
eventLoopTickCount: 347,
eventLoopMinTickLength: 0,
eventLoopMaxTickLength: 2,
eventLoopAvgTickLength: 1,
eventLoopAvgIOTime: 0,
httpIncomingConnectionCount: 0,
httpOutgoingConnectionCount: 0 } } }
appdynamics v4.2.15.0 (28-03-2017 10:17:01.781): config response message received from proxy
appdynamics v4.2.15.0 (28-03-2017 10:17:01.781): { currentVersion: '1493367334003', agentState: 'UNREGISTERED' }

 

Employee

Re: NodeJS app Agent no connecting to Controller

In your controller, is your Tier/Node shows as Java tier ?

 

If so, stop machine agent, please delete the tier/node from controller UI, start the node app, let it register. then start machine agent.

New Contributor

Re: NodeJS app Agent no connecting to Controller

That worked. Thank you.

 

Unless I've missed it elsewhere - please could this be made to be part of the documentation? I spent a good few hours troubleshooting this.

 

Thanks again,

 

James 

Employee

Re: NodeJS app Agent no connecting to Controller