Skip to content

[BUG]: conflict with "ngx_http_js_module" in 1.27.4 nginx version #185

@pinguet62

Description

@pinguet62

Module Version(s)

1.5.0

Bug Report

Hello 🖖

After upgrade of nginx from 1.27.3 to 1.27.4, the agent does't work.
It seems side effect with the ngx_http_js_module module I'm using.

The agent does't seem to use the DD_ configuration 🤔
Probably after #169 ?

Thanks in advance.

Reproduction Code

With docker packaging:

# FROM nginx:1.27.3 # OK
FROM nginx:1.27.4 # ERRROR

RUN apt-get update \
 && apt-get install --yes --no-install-recommends wget

# install DataDog agent
RUN sed -i '1 i\load_module modules/ngx_http_datadog_module.so;' /etc/nginx/nginx.conf \
 && wget https://github.com/DataDog/nginx-datadog/releases/download/v1.5.0/ngx_http_datadog_module-amd64-${NGINX_VERSION}.so.tgz --output-document - | tar --extract --gzip --directory /usr/lib/nginx/modules

# sample "ngx_http_js_module" usage
RUN sed -i '1 i\load_module modules/ngx_http_js_module.so;' /etc/nginx/nginx.conf \
 && echo "export default {}" > /etc/nginx/helpers.js \
 && echo "js_import helpers.js; \n" >> /etc/nginx/conf.d/default.conf

docker build --no-cache . --tag test
docker run --rm -it -e DD_AGENT_HOST=datadog-agent test

Error Logs

2025/03/18 15:28:18 [error] 160#164: nginx-datadog: [error code 4] Error occurred during HTTP request for Remote Configuration: Error sending request with libcurl (Couldn't connect to server): Failed to connect to localhost port 8126 after 0 ms: Couldn't connect to server

See "localhost" instead of "datadog-agent" in my example of reproduction code.

No data in DataDog APM page.

Operating System

/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions