2017-08-12 62 views
0
  1. Pyagent,Guniccorn和Python(Sanic)應用程序都安裝在虛擬環境中。
  2. 虛擬環境:在macOs中的Python 3.6.1 10.12.4
  3. 我正在使用主管來管理gunicorn進程。需要幫助:Python代理不會將任何數據發送到代理和控制器

    [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 目錄= /項目/ APP_DIR/ 自動重=真

Appdynamics版本; PIP凍結

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 
  • 當我啓動procees,我可以看到代理被正確地裝載和代理開始爲好。

    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 
    
  • 但問題是我不看報控制器時,我產生負荷我的應用程序的任何數據。 (使用wrk生成負載)

  • 代理和代理日誌沒有關於應用程序數據/指標的任何信息。

    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 
    
  • 真的很感激,如果有人可以幫我找到了問題?

    感謝, Manivasagan

    回答

    1
    在appdynamics.cfg

    ,改變

    ssl = (on) 
    

    ssl = on