Splunk AppDynamics

Django apache wsgi config

CommunityUser
Splunk Employee
Splunk Employee

Hi,

I’m looking for further documentation or support materials to assist me with configuring the pyagent for Django using webfaction, apache wsgi and virtualenv. The 44 docs detail a python email address but I've had no reply.
 
I’ve installed and configured the agent as per the docs, my site loads and functions as expected. But when starting the proxy manually it simply loops trying to connect creating pids and no agent connection to the controller is successful.
I’m able to invoke curl to the controller and get a correct response, so I’m suspecting my config within httpd.conf is not correct.
 
My scriptalias points to a .py file, with ScriptAlias pointing to wsgi.py file. Within wsgi.py a wsgi handler is created with application = get_wsgi_application(), which is of type <class 'django.core.handlers.wsgi.WSGIHandler’> so I refereenced this in the APPD_WSGI_MODULE variable.
   
SetEnv APPD_CONFIG_FILE /path-to-config/appdynamics.cfg
SetEnv APPD_WSGI_MODULE myapp.config.wsgi:application
WSGIDaemonProcess wowtest processes=2 threads=12 python-
WSGIProcessGroup wowtest
WSGIRestrictEmbedded On
WSGILazyInitialization On
WSGIScriptAlias / /path-to-venv/venv/lib/python3.6/site-packages/appdynamics/scripts/wsgi.py
 
When manually running the proxy passing the app dynamics.cfg path with the -c flag, no connection is made the proxy appears to keep trying to connect
 
Is there any further information for configuring the agent for pyagent for Django wssgi?
 
Thanks
 
Labels (1)
0 Karma

Kyle_Furlong
Contributor

Hi Chris,

If the pyagent proxy "watchdog" is looping, likely what's happening is that the Java process is not starting up properly. We want to recursively check the permissions on each of these directories: /tmp/appd, the Python module directory. The user which runs the Python process and the pyagent proxy command should have read execute on both. Let me know if that helps!

Regards,

Kyle

CommunityUser
Splunk Employee
Splunk Employee

Hey Kyle 

Thanks for the note.

I'm running within a python3.6 virtual env, created by my user to which i have full permissions. The /tmp/appd dir and children again are all belonging to my user. 

I've spent a couple of hours trying things with no joy. I'm wondering if it's related to the loading of python path incorrectly, and using another version that requires root privileges 

Cheers

Chris 

 

Tags (1)
0 Karma

Jeremy_Freedman
Engager

I know this is an old post, but did you ever find a resolution for this?  I am seeing the same issue with the loop of the pyagent process going defunct then the watchdog spinning up a new one.

0 Karma

Kyle_Furlong
Contributor

Hi Jeremy,

These issues are usually due to the proxy process not being able to start. In the watchdog logs you should have a command line printed out that's trying to run. Please try to run that separately and see if there are any errors.

0 Karma

Jeremy_Freedman
Engager

I found my issue, posting it here in case anyone else has similar issues.

After I installed the agent via pip, I had to set execute permissions on:

<path to my virtualenv>/lib64/python3.6/site-ackages/appdynamics_bindeps/proxy/runProxy

<path to my virtualenv>/lib64/python3.6/site-packages/appdynamics_proxysupport/java

Get Updates on the Splunk Community!

New This Month - Splunk Observability updates and improvements for faster ...

What’s New? This month, we’re delivering several enhancements across Splunk Observability Cloud for faster and ...

What's New in Splunk Cloud Platform 9.3.2411?

Hey Splunky People! We are excited to share the latest updates in Splunk Cloud Platform 9.3.2411. This release ...

Buttercup Games: Further Dashboarding Techniques (Part 6)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...