opentracing-contrib/nginx-opentracing

Opentracing module not work in alpine nginx

Closed this issue · 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.

miry commented

@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

FROM --platform=$BUILDPLATFORM alpine:3.19 as build-base-alpine

@miry I used a customized alpine base image for NGINX

miry commented

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.