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

Python agent does not send any data to proxy and controller

manivasagant
Wanderer

1. Pyagent, Guniccorn and Python (Sanic) app are all installed in a Virtual Environment.

2. Vitual Env: Python 3.6.1 in macOs 10.12.4

3. I am using supervisor to manage gunicorn process.

 

[program:Test app]
command = /env/bin/pyagent run -c /etc/appdynamics.cfg -- /env/bin/gunicorn app:app --bind 0.0.0.0:8000 --worker-class sanic.worker.GunicornWorker
directory = /projects/app_dir/
autorestart=true

 

Appdynamics versions; pip freeze

appdynamics==4.3.8.0
appdynamics-bindeps-osx-x64==6.0
appdynamics-proxysupport-osx-x64==1.8.0.51.1

 

 

Appdynamics.cfg

 

 

MacBook-Pro:appd$ cat /etc/appdynamics.cfg
[agent]
app = Test app
tier = api
node = node dev

[controller]
host = elephant2017072405043015.saas.appdynamics.com
port = 443
ssl = (on)
account = XXXXXXXXX
accesskey = XXXXXXXX
 
[log]
level = debug
debugging = on

 

4. When i start the procees, i can see that agent is loaded properly and proxy is started as well.

2017-08-12 12:43:51,029 [WARNING] appdynamics.proxy.watchdog <83867>: Defunct proxy pid (83627) found; starting over
2017-08-12 12:43:51,093 [INFO] appdynamics.proxy.watchdog <83867>: Started watchdog with pid=83867
2017-08-12 12:43:51,198 [WARNING] appdynamics.proxy.watchdog <83867>: Found defunct proxy pid file with pid=83628
2017-08-12 12:43:51,218 [INFO] appdynamics.proxy.watchdog <83867>: Starting proxy: /Volumes/Personal/Django/versions/3.6.1/envs/events/lib/python3.6/site-packages/appdynamics_bindeps/proxy/runProxy -j /Volumes/Personal/Django/versions/3.6.1/envs/events/lib/python3.6/site-packages/appdynamics_proxysupport -d /Volumes/Personal/Django/versions/3.6.1/envs/events/lib/python3.6/site-packages/appdynamics_bindeps/proxy -r /tmp/appd/run /tmp/appd/run/comm /tmp/appd/logs
2017-08-12 12:43:51,723 [INFO] appdynamics.proxy.watchdog <83867>: Started proxy with pid=83868
Install Directory resolved to[/Volumes/Personal/Django/versions/3.6.1/envs/events/lib/python3.6/site-packages/appdynamics_bindeps/proxy]
Agent Logging Directory [/private/tmp/appd/logs]
Logs Directory resolved to[/tmp/appd/logs]
12:44:01,271  INFO [main] ProxyControlEntryPoint - ProxyControl - init
12:44:01,272  INFO [main] ProxyControlEntryPoint - comm dir set to: /tmp/appd/run/comm
12:44:01,423  INFO [main] ZeroMQControlServer - ipcNodeBaseDir dir set to: /tmp/appd/run/comm/proxy-6272190574628013158
12:44:01,423  INFO [main] ZeroMQControlServer - ZeroMQControlServer - init
12:44:01,722  INFO [main] ZeroMQControlServer - ControlReqRouterSocket started at:ipc:///tmp/appd/run/comm/0
12:44:02,330  INFO [main] ProxyControlEntryPoint - ProxyControl - init completed
12:44:02,330  INFO [main] ProxyControlEntryPoint - Should register node at startup:false

 

5. But the problem is i dont see any data reported to controller when i generate load to my app. (using wrk to generate load)

 

6. Agent and proxy  Logs does not have any info about app data/metrics.

 

MacBook-Pro:appd $ cat /tmp/appd/logs/Test app-node_dev.log
2017-08-12 12:29:33,602 [DEBUG] appdynamics.agent <82799>: Running http.client hook <function intercept_httplib at 0x10fbfa730>
2017-08-12 12:29:33,603 [DEBUG] appdynamics.agent <82799>: Running logging hook <function intercept_logging at 0x10fb36c80>
2017-08-12 12:35:50,887 [DEBUG] appdynamics.agent <83569>: Running http.client hook <function intercept_httplib at 0x108151730>
2017-08-12 12:35:50,904 [DEBUG] appdynamics.agent <83569>: Running logging hook <function intercept_logging at 0x10808dc80>
2017-08-12 12:40:33,493 [DEBUG] appdynamics.agent <83625>: Running http.client hook <function intercept_httplib at 0x109b04730>
2017-08-12 12:40:33,517 [DEBUG] appdynamics.agent <83625>: Running logging hook <function intercept_logging at 0x109a40c80>
2017-08-12 12:43:54,092 [DEBUG] appdynamics.agent <83862>: Running http.client hook <function intercept_httplib at 0x108116730>
2017-08-12 12:43:54,115 [DEBUG] appdynamics.agent <83862>: Running logging hook <function intercept_logging at 0x108051c80>

 

MacBook-Pro:appd$ cat /tmp/appd/logs/proxyCore.2017_08_12__12_40_33.0.log
[main] 12 Aug 2017 12:40:33,704  INFO com.singularity.proxyControl.ProxyControlEntryPoint - ProxyControl - init
[main] 12 Aug 2017 12:40:33,705  INFO com.singularity.proxyControl.ProxyControlEntryPoint - comm dir set to: /tmp/appd/run/comm
[main] 12 Aug 2017 12:40:33,724  INFO com.singularity.proxyControl.ZeroMQControlServer - ipcNodeBaseDir dir set to: /tmp/appd/run/comm/proxy-2817425872527039173
[main] 12 Aug 2017 12:40:33,725  INFO com.singularity.proxyControl.ZeroMQControlServer - ZeroMQControlServer - init
[main] 12 Aug 2017 12:40:33,757  INFO com.singularity.proxyControl.ZeroMQControlServer - ControlReqRouterSocket started at:ipc:///tmp/appd/run/comm/0
[main] 12 Aug 2017 12:40:33,903  INFO com.singularity.proxyControl.ProxyControlEntryPoint - ProxyControl - init completed
[main] 12 Aug 2017 12:40:33,904  INFO com.singularity.proxyControl.ProxyControlEntryPoint - Should register node at startup:false

 

 

Would really appreciate if someone can help me find out  the issue?

 

Thanks,

Manivasagan

+91 9972454070

1 REPLY 1

Kyle.Furlong
AppDynamics Team (Retired)

Hi Manivasagan,

 

Unfortunately since Sanic is not a WSGI-based framework, it is not supported at this time.

 

Regards,

Kyle

Thanks,
Kyle Furlong, Technical Lead (C++ and Dynamic Languages)




Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.