16 Dec 2019
04:59 PM
- last edited on
24 Jun 2021
05:53 AM
by
MaciejNeumann
We have custom nginx plugin that has a single directive that goes into nginx.conf. We usually place this directive right inside the http block.
http {
tcell_app_id xxxxxxxx;
...
This works fine without dynatrace.
Running with dynatrace, we get a strange error from nginx:
# sh -x dynatrace-agent64.sh nginx -g "daemon off;"
...
nginx: [emerg] "tcell_app_id" directive is duplicate in /usr/local/openresty/nginx/conf/nginx.conf:19
Strange because that directive is not duplicated and this works fine without dynatrace.
Now if I move our directive down a bit inside the http { block, the error goes away when running with dynatrace.
http {
...
...
tcell_app_id xxxxxxxx;
server {
So something in Dynatrace appears to be processing or writing this file before startup, and it is causing problems with custom directives.
Solved! Go to Solution.
Oneagent is modifying the configuration files at runtime (no persistent changes). As it causes issues with your NGINX configuration, I suggest opening a support ticket to get this investigated as this should not happen.