Splunk AppDynamics

Cannot write to parent folder /AppServerAgent-1.8-23.10.0.35234/ver23.10.0.35234/logs/8b60cbc478b0

Nathan_Sowatske
New Member

The code for this issue is here: https://github.com/NathanDotTo/structurizr-onpremises/blob/main/structurizr-onpremises/Dockerfile_se...

I am using the AppD agent within a Tomcat based web app. The agent directory is copied into the container unaltered from the original zip file:

ENV APPDAGENTDIR=AppServerAgent-1.8-23.10.0.35234
ADD $APPDAGENTDIR /$APPDAGENTDIR

RUN chown -R root /$APPDAGENTDIR
RUN chmod -R a+rwx /$APPDAGENTDIR

I start the web app with:

ENV CATALINA_OPTS="-Xms512M -Xmx512M -javaagent:/AppServerAgent-1.8-23.10.0.35234/javaagent.jar"

I get this error:

>>>> MultiTenantAgent Dynamic Service error - could not open Dynamic Service Log /AppServerAgent-1.8-23.10.0.35234/ver23.10.0.35234/logs/8b60cbc478b0/argentoDynamicService_11-27-2023-08.17.53.log
Running as user root
Cannot write to parent folder /AppServerAgent-1.8-23.10.0.35234/ver23.10.0.35234/logs/8b60cbc478b0
Could NOT get owner for MultiTenantAgent Dynamic Services Folder
Likely due to fact that owner (null) is not same user as the runtime user (root)
which means you will need to give group write access using this command: find external-services/argentoDynamicService -type d -exec chmod g+w {}
Possibly due to lack of permissions or file access to folder: Exists: false, CanRead: false, CanWrite: false
Possibly due to lack of permissions or file access to log: Exists: false, CanRead: false, CanWrite: false
Possibly due to java.security.Manager set - null
Possibly due to missed agent-runtime-dir in Controller-XML and will need the property set to correct this...
Call Stack: java.io.FileNotFoundException: /AppServerAgent-1.8-23.10.0.35234/ver23.10.0.35234/logs/8b60cbc478b0/argentoDynamicService_11-27-2023-08.17.53.log (No such file or directory)

From within the container I can see that the logs directory is owned by root:

cd /AppServerAgent-1.8-23.10.0.35234/ver23.10.0.35234/logs/
root@8b60cbc478b0:/AppServerAgent-1.8-23.10.0.35234/ver23.10.0.35234/logs# ls -la
total 16
drwxrwxrwx 1 root root 4096 Nov 27 08:20 .
drwxrwxrwx 1 root root 4096 Oct 27 20:45 ..
drwxr-x--- 2 root root 4096 Nov 27 08:20 Tomcat@8b60cbc478b0_8005
root@8b60cbc478b0:/AppServerAgent-1.8-23.10.0.35234/ver23.10.0.35234/logs#

Since the logs directory is clearly owned by root, I suspect that the error message is simply misleading. 

Any suggestions please?

Many thanks

Nathan

Labels (1)
0 Karma

iamryan
Community Manager
Community Manager

Hi @Nathan.Sowatskey,

I just wanted to share some info that I hope may help. 


https://community.appdynamics.com/t5/Java-Java-Agent-Installation-JVM/AppDynamics-kubernetes-cluster...

Please let me know if you are using the Secure Agent. If not, please follow the below steps to get rid of this problem.

  • Go to the <java-agent-home>/<version>/external-services directory.
  • Delete the argentoDynamicService directory.
  • Restart the JVM.
0 Karma
Get Updates on the Splunk Community!

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 ...

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...