AppD Archive

Unable to connect agent to controller: Connection reset

CommunityUser
Splunk Employee
Splunk Employee

I am trying to eval AppD with a Python 2.7 django app.  I have created a config file:

[agent]
app = Yang Explorer
tier = Test
node = node f930

[controller]
host = paid134.saas.appdynamics.com
port = 443
ssl = (on)
account = HIDDEN
accesskey = HIDDEN

This was copy and pasted from the SaaS controller portal.  I believe the creds are right, but when I try to go to:

https://paid134.saas.appdynamics.com/controller/instance/0/applicationConfiguration

In my browser, I get a username/password prompt where nothing seems to work.

On my console, I see these errors:

14:45:43,151  INFO [AD Thread Pool-Global0] ConfigurationChannel - Detected node meta info: [Name:ProcessID, Value:83182, Name:appdynamics.ip.addresses, Value:fe80:0:0:0:90cd:a879:ced7:ff65%utun3,fe80:0:0:0:fbe7:dfc0:db78:7d66%utun2,fe80:0:0:0:8a3f:f286:fab1:37c%utun1,fe80:0:0:0:d405:6ffa:8115:ae2d%utun0,fe80:0:0:0:6033:e3ff:fe50:10f1%awdl0,fe80:0:0:0:aede:48ff:fe00:1122%en10,10.10.10.1,172.16.10.1,172.16.3.1,172.16.2.1,172.16.1.1,172.16.129.1,2001:420:2280:1272:6c7a:da29:e71d:ba77,fe80:0:0:0:188b:eba9:caf4:b94b%en0,10.150.53.253,fe80:0:0:0:0:0:0:1%lo0]
14:45:43,154  INFO [AD Thread Pool-Global0] ConfigurationChannel - Sending Registration request with: Application Name [Yang Explorer], Tier Name [Test], Node Name [node f930], Host Name [HIDDEN] Node Unique Local ID [node f930], Version [Proxy v4.1.10.6 GA SHA-1:a9af909f76524b2191ac757179ba0f93d35afb55 #4466 37-4.1.10.next-build]
14:45:43,374 ERROR [AD Thread Pool-Global0] ConfigurationChannel - Fatal transport error while connecting to URL [/controller/instance/0/applicationConfiguration]: java.net.SocketException: Connection reset
14:45:43,374  WARN [AD Thread Pool-Global0] ConfigurationChannel - Could not connect to the controller/invalid response from controller, cannot get initialization information, controller host [paid134.saas.appdynamics.com], port[443], exception [Fatal transport error while connecting to URL [/controller/instance/0/applicationConfiguration]]
14:45:43,374  WARN [AD Thread Pool-Global0] AgentErrorProcessor - Agent error occurred, [name,transformId]=[com.singularity.CONFIG.ConfigurationChannel - java.net.SocketException,2147483647]
14:45:43,374  WARN [AD Thread Pool-Global0] AgentErrorProcessor - 3 instance(s) remaining before error log is silenced
14:45:43,374 ERROR [AD Thread Pool-Global0] ConfigurationChannel - Exception: Connection reset
java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(SocketInputStream.java:209)
	at java.net.SocketInputStream.read(SocketInputStream.java:141)
	at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:136)
	at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:152)
	at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:270)
	at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
	at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
	at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:260)
	at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:161)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.http.impl.conn.CPoolProxy.invoke(CPoolProxy.java:138)
	at com.sun.proxy.$Proxy2.receiveResponseHeader(Unknown Source)
	at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:271)
	at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:254)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
	at com.singularity.ee.util.httpclient.j.a(j.java:291)
	at com.singularity.ee.rest.d.y(d.java:378)
	at com.singularity.ee.rest.d.x(d.java:331)
	at com.singularity.ee.rest.controller.request.ob.x(ob.java:96)
	at com.singularity.ee.rest.controller.request.pb.a(pb.java:35)
	at com.singularity.ee.agent.appagent.kernel.config.xml.i.a(i.java:1274)
	at com.singularity.ee.agent.appagent.kernel.config.xml.i.a(i.java:107)
	at com.singularity.ee.agent.appagent.kernel.config.xml.p.a(p.java:613)
	at com.singularity.ee.agent.appagent.kernel.config.xml.i.a(i.java:416)
	at com.singularity.ee.agent.appagent.kernel.config.xml.ab.run(ab.java:656)
	at com.singularity.ee.util.javaspecific.scheduler.n.run(n.java:122)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at com.singularity.ee.util.javaspecific.scheduler.z.e(z.java:335)
	at com.singularity.ee.util.javaspecific.scheduler.a.b(a.java:152)
	at com.singularity.ee.util.javaspecific.scheduler.b.a(b.java:119)
	at com.singularity.ee.util.javaspecific.scheduler.b.b(b.java:206)
	at com.singularity.ee.util.javaspecific.scheduler.b.run(b.java:236)
        at com.singularity.ee.util.javaspecific.scheduler.i.a(i.java:694)
	at com.singularity.ee.util.javaspecific.scheduler.i.run(i.java:726)
	at java.lang.Thread.run(Thread.java:745)

What did I miss?

CommunityUser
Splunk Employee
Splunk Employee

First things first, does network connectivity exist between your application server and your paid SaaS controller

# telnet paid134.saas.appdynamics.com 443

If that is successful, you will see something like this:

Trying XXX.XXX.XXX.XXX...
Connected to paid134.saas.appdynamics.com.
Escape character is '^]'.

If connectivity exists, then there is likely a problem with your controller-info.xml file.  Make sure you have the appropriate username + password in it?  Did you configure the controller-info.xml manually?  If so, you may want to try to download the phython agent from the wizard on the controller, then sftp it to your appolication server host.  All of the appropriate values will be pre-populated in the controller-info.xml file if you use the wizard from the controller.

Good luck, 

Justin

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Yes, network connectivity is there. As I mentioned, I can hit this URL in my browser (on the same macOS box running the django app).

I'm not using a controller-info.xml.  According to the Python agent docs, I only needed the .cfg file (that I provided) that is passed to pyagent.  I start my app with:

pyagent run -c /path/to/appd.cfg -- manager.py ...

I followed all of the instructions in the Python docs for running a django app through pyagent.  If there are other steps, please point me to those docs.  Thanks.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Unfortunately, i only have experience with the db-agent, machine-agent and java-agent deployments and I haven't dealt with python yet so i'm not of much use here.  If you have a support contract, try opening a helpdesk ticket with appdynamics.  They are pretty quick to respond.

0 Karma

Kyle_Furlong
Contributor

Hi jclarke,

Could you try removing the parenthesis from around the ssl = (on) config setting? It's possible the config parser isn't handling that correctly.

Regards,

Kyle

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Thanks, Kyle. I already tried that (first in fact). Same exact errors and behavior.  It was only after that failed I copy and pasted the exact config from the portal.

0 Karma
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...