nginx-opentracing
nginx-opentracing copied to clipboard
Opentracing module not work in alpine nginx
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 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 I used a customized alpine base image for NGINX
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.