Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

otel_ngx_module.so failed on alpine 1.16.0 #1

Open
ballerabdude opened this issue Jun 8, 2022 · 9 comments
Open

otel_ngx_module.so failed on alpine 1.16.0 #1

ballerabdude opened this issue Jun 8, 2022 · 9 comments

Comments

@ballerabdude
Copy link

You will get the below error when using the latest alpine 1.16.0

docker run -it -v ${PWD}/nginx.conf:/etc/nginx/nginx.conf nginx-proxy sh     
/etc/nginx/nginx -g "daemon off;"
2022/06/08 15:10:48 [emerg] 7#0: dlopen() "/etc/nginx/modules/otel_ngx_module.so" failed (Error relocating /etc/nginx/modules/otel_ngx_module.so: _ZN4absl12lts_2021110216variant_internal21ThrowBadVariantAccessEv: symbol not found) in /etc/nginx/nginx.conf:1
nginx: [emerg] dlopen() "/etc/nginx/modules/otel_ngx_module.so" failed (Error relocating /etc/nginx/modules/otel_ngx_module.so: _ZN4absl12lts_2021110216variant_internal21ThrowBadVariantAccessEv: symbol not found) in /etc/nginx/nginx.conf:1

I compared the build from iquirino91/nginx-opentelemetry which at the time was using alpine 1.15.0

After changing FROM alpine TO FROM alpine:3.15.0 everything works.

Not sure what could have changed on the os level to break the build.

@iquirino
Copy link
Owner

iquirino commented Jun 8, 2022

I rolled out a new version on docker hub. Can you try it again? I didn't modified anything.
It is using lates alpine version.

@ballerabdude
Copy link
Author

I pulled the latest with no cache.

docker run -it --pull=always -v ${PWD}/nginx.conf:/etc/nginx/nginx.conf iquirino91/nginx-opentelemetry sh                                                                      
latest: Pulling from iquirino91/nginx-opentelemetry
Digest: sha256:0657199cb35d4e720f75ac70a09e3022c71f94a9a10ec32f7f2756b4c41ae6fe
Status: Image is up to date for iquirino91/nginx-opentelemetry:latest

/ # cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.16.0
PRETTY_NAME="Alpine Linux v3.16"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"

/ # /etc/nginx/nginx -v
nginx version: nginx/1.21.4
/ # /etc/nginx/nginx -g "daemon off;"
2022/06/08 16:45:04 [emerg] 10#0: dlopen() "/etc/nginx/modules/otel_ngx_module.so" failed (Error relocating /etc/nginx/modules/otel_ngx_module.so: _ZN4absl12lts_2021110216variant_internal21ThrowBadVariantAccessEv: symbol not found) in /etc/nginx/nginx.conf:1
nginx: [emerg] dlopen() "/etc/nginx/modules/otel_ngx_module.so" failed (Error relocating /etc/nginx/modules/otel_ngx_module.so: _ZN4absl12lts_2021110216variant_internal21ThrowBadVariantAccessEv: symbol not found) in /etc/nginx/nginx.conf:1
/ #

nginx.conf

load_module /etc/nginx/modules/otel_ngx_module.so;

events {}

http {
  opentelemetry_config /conf/otel-nginx.toml;
  access_log stderr;
  error_log stderr debug;

  upstream node-backend {
    server example.com:8001;
  }

  server {
    listen 8000;

    root /var/www/html;

    opentelemetry_attribute "test.attrib.global" "global";
    opentelemetry_attribute "test.attrib.custom" "global-custom";

    location = / {
      opentelemetry_operation_name $request_uri;
      opentelemetry_propagate;
      proxy_pass http://node-backend/;
    }
  } 
}`

@iquirino
Copy link
Owner

iquirino commented Jun 8, 2022

I will try to update nginx and open telemetry version

@iquirino
Copy link
Owner

iquirino commented Jun 8, 2022

Updated. Can you try again, please?

@ballerabdude
Copy link
Author

I just pulled down the latest, and the issue is still there. During my initial debugging I actually started with the latest versions of all the libraries thinking that would fix the problem.

@darkobas2
Copy link

Anyone figured this out ?

@iquirino
Copy link
Owner

I've pushed a new image with latest versions of otel and nginx, please pull it again and try it ;)

@Fenkiou
Copy link

Fenkiou commented Dec 28, 2022

Not working for me neither with a Dockerfile like this:

FROM iquirino91/nginx-opentelemetry
RUN echo "load_module /etc/nginx/modules/otel_ngx_module.so;$(cat /etc/nginx/nginx.conf)" > /etc/nginx/nginx.conf

Replaced FROM alpine with FROM alpine:3.15 in your Dockerfile resolved the issue as stated by @ballerabdude, alpine 3.16 and 3.17 does not seems to be working for some reason.

iquirino added a commit that referenced this issue Jan 9, 2023
Fixing issue #1
@iquirino
Copy link
Owner

iquirino commented Jan 9, 2023

I am pushing a new image with alpine:3.15 version fixed.
I am currently without time to check it, if you have time to check why it broken, please share with us...
I'll try to have some time to fix it on the lates version.

Thank you guys! ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants