nginx-opentracing icon indicating copy to clipboard operation
nginx-opentracing copied to clipboard

Opentracing module not work in alpine nginx

Open RobertShan2000 opened this issue 10 months ago • 3 comments

OS: alpine 3.19 NGINX: 1.24 Error Log: nginx: [emerg] dlopen() "/var/lib/nginx/modules/ngx_http_opentracing_module.so" failed (Error relocating /var/lib/nginx/modules/ngx_http_opentracing_module.so: arc4random: symbol not found) in /etc/nginx/nginx.conf:1

Root Cause: arc4random is not found in lib, try to install libbsd to fix it, but not work.

RobertShan2000 avatar Apr 23 '24 01:04 RobertShan2000

@RobertShan2000 Can you give more information about did you build image or used prebuilt opentracing/nginx-opentracing:edge-alpine.

In case you did it your self, try to check how it is done in https://github.com/opentracing-contrib/nginx-opentracing/blob/89e7ed4d2c055170a12b572d1d33a96e683a1ebc/Dockerfile#L32

miry avatar Apr 23 '24 11:04 miry

@miry I used a customized alpine base image for NGINX

RobertShan2000 avatar Apr 24 '24 00:04 RobertShan2000

For success build we use next:

FROM nginx:1.24-alpine AS build-nginx-alpine
RUN apk add --no-cache \
    build-base \
    pcre2-dev \
    zlib-dev

As I know arc4random is part of zlib-dev.

miry avatar Apr 24 '24 10:04 miry