cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Liboneagentproc.so appears to be rewriting nginx.conf in such a way to cause errors

paul_callahan
Newcomer

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.

2 REPLIES 2

Julius_Loman
DynaMight Legend
DynaMight Legend

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.


Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

paul_callahan
Newcomer
Actually, moving the directive doesn't seem to make a difference. It seems to randomly work and then not work.

Featured Posts