Hi there,
We have a scenario on Linux where the libdtagent.so file is being referenced by two separate Java Applications running on this one host however the two JVM's are started as two separate OS Users and this causes both user accounts trying to write to the tmp/dynaTrace/log however the user that creates this logfile first denies access to the second user to also write to this logfile.
Does anyone know of a workaround to this to maybe get a separate logifle created per os user account used?
Kind Regards
Richard
Answer by Andreas G. ·
Shouldnt each agent create its own log file by appending the PID to the filename to make the filename unique? Or are you overwriting the logfile name and therefore run into this problem?
Answer by Richard M. ·
Hi Andreas,
Thanks for the response my apologies its not trying to write to the same logfile the users are contending for rights to write to the same temp directory.
Answer by Kevin J. ·
Richard-
This sounds like a permissions issue. If so, here are two options to deal with your scenario...One, you can change the permissions of the dynaTrace folder structure to allow the other OS user to access the agent file and write to the log directories (i.e. read, write permissions for "everyone").
Two, if opening up the permissions is not feasible/allowed in your environment, you can copy the dynaTrace agent files to a separate folder, creating two instances of the agent library. This way, one folder can be owned by user A and the other folder by user B. You would just need to modify the JVM argument appropriately to point to each separate agent file.
HTH,
Kevin
If you don't want to make the folder writable for everyone, you could also put the users in one group and give permissions to that group. Something like (without having tried it )
# create the group sudo groupadd dtagentusergrp # add the users to the group sudo usermod -a -G dtagentusergrp dyntrace_user_1 sudo usermod -a -G dtagentusergrp dynatrace_user_2 # change permissions to the directory sudo chgrp -R dtagentusergrp /path/to/the/directory sudo chmod -R 660 /path/to/the/directory
Answer by Richard M. ·
Thanks for the great feedback here I will look into using one of these options to resolve this issue
Kind Regards
Richard
JANUARY 15, 3:00 PM GMT / 10:00 AM ET