Dynamic Languages (Node.JS, Python, PHP, C/C++, Webserver Agent)

cancel
Showing results for 
Search instead for 
Did you mean: 

Node.js Agent Unable to Connect to AppDynamics Controller

Wanderer

Node.js Agent Unable to Connect to AppDynamics Controller

Hello everyone,

 

I've been trying to set up the AppDynamics Node.js agent on my application but to no avail.

 

I added the following lines in my app.js file.

 

require("appdynamics").profile({
controllerHostName: 'dangerous2017110516021721.saas.appdynamics.com',
controllerPort: 443,

// If SSL, be sure to enable the next line
controllerSslEnabled: true,
accountName: 'dangerous2017110516021721',
accountAccessKey: 'ah02lso4vb6f',
applicationName: 'MyDigi',
tierName: 'MyDigi Tier',
nodeName: 'process', // The controller will automatically append the node name with a unique number
proxyHost: '172.16.32.151',
proxyPort: '8001'

logging: {
'logfiles': [
{
'root_directory': '/tmp/appd',
'filename': 'echo_%N.log',
'level': 'TRACE',
'max_size': 5242880,
'max_files': 10,
'outputType': 'console' // Set this parameter if you want to log to STDOUT/STDERR. Omit this parameter if you want to log to a file.
}
]
}
});

 

Could someone please help?

 

Thanks.

Node.js Agent Unable to Connect to AppDynamics Controller
5 REPLIES 5
Highlighted
AppDynamics Team

Re: Node.js Agent Unable to Connect to AppDynamics Controller

Hi,

 

Your SAAS controller is not showing any application on this name. Could you please verify if the outgoing requests from the agent are routed properly by the network proxy?

 

Alternatively, could you please remove the network proxy from the environment as well as from the agent configs and verify that the agent is able to connect properly.

 

Lastly, could you please add debug:true in the agent configuration and verify if there are any errors reported in the logs under /tmp/appd folder?

 

Best Regards,

Piyush

Wanderer

Re: Node.js Agent Unable to Connect to AppDynamics Controller

Hello Piyush,

 

After adding 'debug: true', I still don't see the 'appd' folder in /tmp.

 

It seems that my application is not starting the agent.

 

Is there anything else I can do?

 

require("appdynamics").profile({
controllerHostName: 'dangerous2017110516021721.saas.appdynamics.com',
controllerPort: 443,

controllerSslEnabled: true,
accountName: 'dangerous2017110516021721',
accountAccessKey: 'ah02lso4vb6f',
applicationName: 'MyDigi',
tierName: 'MyDigi Tier',
nodeName: 'processss',
proxyHost: '172.16.32.151',
proxyPort: '8001',
debug: true
});

 

Thanks.

AppDynamics Team

Re: Node.js Agent Unable to Connect to AppDynamics Controller

Hi,

 

Could you please confirm that the agent's require statement is before adding/requiring any other modules in the application?

 

Also, please verify if there is a JAVA process running after starting the node application with the help of ps -ef | grep -i proxy command. Please also share the output of this command here.

 

Best Regards,

Piyush

Wanderer

Re: Node.js Agent Unable to Connect to AppDynamics Controller

Hello Piyush,

 

Yes, the require statement is at the beginning of the my application js file.

 

[mdgadmin@a0110teceapp01 OCSServer]$ ps -ef | grep -i proxy
mdgadmin 2844 1776 0 09:39 pts/2 00:00:00 grep --color=auto -i proxy
root 22513 1 0 Sep19 ? 00:34:16 /usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --authorization-plugin=rhel-push-plugin --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --selinux-enabled --log-driver=journald --signature-verification=false --add-registry registry.access.redhat.com

 

Thanks.

AppDynamics Team

Re: Node.js Agent Unable to Connect to AppDynamics Controller

Hi,

 

The JAVA proxy process is not able to start. I see that you are running with SELinux enabled. Could you disable it once and see if that helps?

 

Best Regards,

Piyush