Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
I can't install the python agent in python 3.6, the appdynamics dependencies are not installed with pip.
I tried installing manually but it doesn't work and with python 3.4 but is not working also.
I have a virtualenv with python3.6
Whe I run pyagent run -c /etc/appdynamics.cfg -- gunicorn app.wsgi:application -w 2 --reload --log-level=debug --timeout 150
it gives me:
NameError: name 'appdynamics' is not defined
Could you do a
ls -lf
in the agent installed directory and send us the output, I belive it will be in your
<virtual environment>/lib/pythonX.x/site-packages/.
There is a open issue with Python 3.4+, I just want to make sure its not the case.
It couldn't find appdynamics, and you also iterated that you are unable to install. What error are you getting while installing.
Is it possible to run you application in Python 2.7 ?
Thanks
Ayush
This is the error when starting the pyagent:
(venv) [ec2-user@ip site-packages]$ pyagent run -c /etc/appdynamics.cfg - gunicorn my_app.wsgi -b unix:///var/app/run/gunicorn.sock -w 5
2017-05-12 02:58:19,704 [WARNING] appdynamics.proxy.watchdog <3161>: Defunct proxy pid (3476) found; starting over
2017-05-12 02:58:19,706 [INFO] appdynamics.proxy.watchdog <3161>: Started watchdog with pid=3161
Traceback (most recent call last):
File "/var/app/envs/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 429, in get_provider
module = sys.modules[moduleOrReq]
KeyError: 'appdynamics_bindeps.proxy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/app/envs/venv/bin/pyagent", line 11, in <module>
sys.exit(main())
File "/var/app/envs/venv/lib/python3.6/site-packages/appdynamics/scripts/pyagent/pyagent.py", line 65, in main
mod.command(options, args)
File "/var/app/envs/venv/lib/python3.6/site-packages/appdynamics/scripts/pyagent/commands/run.py", line 159, in command
proxy.start(proxy_args)
File "/var/app/envs/venv/lib/python3.6/site-packages/appdynamics/scripts/pyagent/commands/proxy.py", line 119, in start
proxy_pid = start_fn(run_proxy_script=run_proxy_script, script_args=args, debug=debug)
File "/var/app/envs/venv/lib/python3.6/site-packages/appdynamics/scripts/pyagent/commands/proxy.py", line 221, in start_watchdog
start_proxy(run_proxy_script=run_proxy_script, script_args=script_args, debug=debug, proxy_logger=logger)
File "/var/app/envs/venv/lib/python3.6/site-packages/appdynamics/scripts/pyagent/commands/proxy.py", line 227, in start_proxy
run_proxy_script = run_proxy_script or resource_filename('appdynamics_bindeps.proxy', 'runProxy')
File "/var/app/envs/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1197, in resource_filename
return get_provider(package_or_requirement).get_resource_filename(
File "/var/app/envs/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 431, in get_provider
__import__(moduleOrReq)
ModuleNotFoundError: No module named 'appdynamics_bindeps'
2017-05-12 02:58:19,884 [ERROR] appdynamics.agent <3159>: Exception in agent startup.
Traceback (most recent call last):
File "/var/app/envs/venv/lib/python3.6/site-packages/appdynamics/agent/__init__.py", line 133, in import_zmq
__import__('appdynamics_bindeps.zmq')
ModuleNotFoundError: No module named 'appdynamics_bindeps'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/app/envs/venv/lib/python3.6/site-packages/appdynamics/autoinject/sitecustomize.py", line 20, in <module>
import appdynamics.agent
File "/var/app/envs/venv/lib/python3.6/site-packages/appdynamics/agent/__init__.py", line 138, in <module>
import_zmq()
File "/var/app/envs/venv/lib/python3.6/site-packages/appdynamics/agent/__init__.py", line 135, in import_zmq
make_virtual_bindeps_package()
File "/var/app/envs/venv/lib/python3.6/site-packages/appdynamics/agent/__init__.py", line 50, in make_virtual_bindeps_package
src_root = get_bindeps_location()
File "/var/app/envs/venv/lib/python3.6/site-packages/appdynamics/agent/__init__.py", line 96, in get_bindeps_location
import appdynamics_bindeps
ModuleNotFoundError: No module named 'appdynamics_bindeps'
Failed to import the site module
Traceback (most recent call last):
File "/var/app/envs/venv/lib/python3.6/site.py", line 703, in <module>
main()
File "/var/app/envs/venv/lib/python3.6/site.py", line 694, in main
execsitecustomize()
File "/var/app/envs/venv/lib/python3.6/site.py", line 548, in execsitecustomize
import sitecustomize
File "/var/app/envs/venv/lib/python3.6/site-packages/appdynamics/autoinject/sitecustomize.py", line 27, in <module>
appdynamics.agent.remove_autoinject()
NameError: name 'appdynamics' is not defined
This is the output after running pip install appdynamics: