1
  1. Pyagent、Goniccorn 和 Python (Sanic) 应用程序都安装在虚拟环境中。
  2. 虚拟环境:macOS 10.12.4 中的 Python 3.6.1
  3. 我正在使用主管来管理 gunicorn 进程。

    [程序:测试应用程序] 命令 = /env/bin/pyagent run -c /etc/appdynamics.cfg -- /env/bin/gunicorn app:app --bind 0.0.0.0:8000 --worker-class sanic.worker .GunicornWorker 目录 = /projects/app_dir/ autorestart=true

应用动力学版本;点冻结

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

应用动力学.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
  1. 当我启动进程时,我可以看到代理已正确加载并且代理也已启动。

    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
    
  2. 但问题是当我为我的应用程序生成负载时,我没有看到任何数据报告给控制器。(使用 wrk 产生负载)

  3. 代理和代理日志没有关于应用数据/指标的任何信息。

    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
    

如果有人可以帮助我找出问题,我将不胜感激?

谢谢, 马尼瓦萨根

4

2 回答 2

1

在您的 appdynamics.cfg 中,更改

ssl = (on)

ssl = on
于 2017-11-16T00:37:15.833 回答
0

问题在于 appdynamics_proxysupport 安装目录中存在的 java。

要解决此问题,请按照以下步骤操作:

  1. 安装合适的jre。
  2. 创建从 appdynamics_proxysupport 安装目录中存在的 java 到上面安装的 java 的软链接。

例如,如果您使用 python 3.7 alpine 作为基础 python 映像,则执行以下操作:

  1. apk 添加 openjdk8-jre
  2. ln -sf /usr/lib/jvm/default-jvm/jre/bin/java /usr/local/lib/python3.7/site-packages/appdynamics_proxysupport/bin/java
于 2021-08-03T04:57:05.123 回答