cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not a customer? Start a free trial

Click the Start a free trial link to start a 15-day SaaS trial of our product and join our community as a trial user. If you are an existing customer do not start a free trial.

AppDynamics customers and established members should click the sign in button to authenticate.

Dynamic Languages (Node.JS, Python, PHP, C/C++, Webserver Agent)

Error starting up the Python Agent

Dylann.Orozco
Creator

Error starting up the Python Agent

Hello community,

 

I'm new to AppDynamics and I'm trying to instrument a simple app using the Python agent, but I'm having some issues in the process. The Agent Proxy is up, but not communicating or sending any data to the controller. I've validated that the settings in the configuration files are correct. The error messages (which continue on a loop) are shown below.
One of the messages coming from the proxy agent is that there's Java isn't able to find jzmq, but I've verified it's actually properly installed in my system (macOS Big Sur 11.6 running on Apple Silicon M1). Is there a way in which I could direct the Java proxy agent to use the path (/usr/local/lib) that holds this library? 


Exception in thread "main" java.lang.UnsatisfiedLinkError: no jzmq in java.library.path

 

ImportError: cannot import name 'constants' from partially initialized module 'appdynamics_bindeps.zmq.backend.cython' (most likely due to a circular import) (/private/tmp/appd/lib/cp39-cp39-1f01d87b92610d5ab8a368411361e151/site-packages/appdynamics_bindeps/zmq/backend/cython/__init__.py)

 

NameError: name 'appdynamics' is not defined

 

I'd appreciate any input on this matter, thanks in advance.

 

 

2021-09-28 18:25:18,733 [ERROR] appdynamics.agent <50988>: Exception in agent startup.
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/appdynamics/autoinject/sitecustomize.py", line 20, in <module>
    import appdynamics.agent
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/appdynamics/agent/__init__.py", line 137, in <module>
    from appdynamics.agent.core.agent import Agent
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/appdynamics/agent/core/agent.py", line 24, in <module>
    from appdynamics.agent.services.config import ConfigService
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/appdynamics/agent/services/config.py", line 15, in <module>
    from appdynamics.agent.core.transport import ConfigTransport
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/appdynamics/agent/core/transport.py", line 12, in <module>
    import appdynamics_bindeps.zmq as zmq
  File "/private/tmp/appd/lib/cp39-cp39-1f01d87b92610d5ab8a368411361e151/site-packages/appdynamics_bindeps/zmq/__init__.py", line 50, in <module>
    from appdynamics_bindeps.zmq import backend
  File "/private/tmp/appd/lib/cp39-cp39-1f01d87b92610d5ab8a368411361e151/site-packages/appdynamics_bindeps/zmq/backend/__init__.py", line 40, in <module>
    reraise(*exc_info)
  File "/private/tmp/appd/lib/cp39-cp39-1f01d87b92610d5ab8a368411361e151/site-packages/appdynamics_bindeps/zmq/utils/sixcerpt.py", line 34, in reraise
    raise value
  File "/private/tmp/appd/lib/cp39-cp39-1f01d87b92610d5ab8a368411361e151/site-packages/appdynamics_bindeps/zmq/backend/__init__.py", line 27, in <module>
    _ns = select_backend(first)
  File "/private/tmp/appd/lib/cp39-cp39-1f01d87b92610d5ab8a368411361e151/site-packages/appdynamics_bindeps/zmq/backend/select.py", line 28, in select_backend
    mod = __import__(name, fromlist=public_api)
  File "/private/tmp/appd/lib/cp39-cp39-1f01d87b92610d5ab8a368411361e151/site-packages/appdynamics_bindeps/zmq/backend/cython/__init__.py", line 6, in <module>
    from . import (constants, error, message, context,
ImportError: cannot import name 'constants' from partially initialized module 'appdynamics_bindeps.zmq.backend.cython' (most likely due to a circular import) (/private/tmp/appd/lib/cp39-cp39-1f01d87b92610d5ab8a368411361e151/site-packages/appdynamics_bindeps/zmq/backend/cython/__init__.py)
Error in sitecustomize; set PYTHONVERBOSE for traceback:
NameError: name 'appdynamics' is not defined

 

Tags (2)
By replying you agree to the Terms and Conditions of the AppDynamics Community.
Error starting up the Python Agent
1 REPLY 1
Ryan.Paredez
Community Manager

Hi @Dylann.Orozco,

 

I found some info.

 

There might be some nuggets in here: https://community.appdynamics.com/t5/Dynamic-Languages-Node-JS-Python/Python-Agent-in-python-3-6/m-p...

 

And I also found this To instrument a raw script (without wsgi), you need to use the Python agent API. Here's an example: https://gist.github.com/kylefurlong/920b9824a8c0cf933e416fde5eb040cf

 

Not sure if this info pertains to exactly your post, but maybe it can lead to further ideas or investigation.


Thanks,
Ryan, AppDynamics Community Manager



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