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
Leader

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.


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