domyway opened a new issue #6719: URL: https://github.com/apache/apisix/issues/6719
### Current Behavior I run the demo in mac docker Dockfile content: ``` FROM apache/apisix:2.12.0-alpine AS builder ENV OPENTELEMETRY_VERSION v1.2.0 RUN echo 'https://mirrors.ustc.edu.cn/alpine/v3.15/main' > /etc/apk/repositories \ && echo 'https://mirrors.ustc.edu.cn/alpine/v3.15/community' >> /etc/apk/repositories\ && apk update \ && apk add --update alpine-sdk build-base cmake linux-headers libressl-dev pcre-dev zlib-dev grpc-dev curl-dev protobuf-dev c-ares-dev re2-dev RUN git clone --shallow-submodules --depth 1 --recurse-submodules -b ${OPENTELEMETRY_VERSION} \ https://github.com/open-telemetry/opentelemetry-cpp.git \ && cd opentelemetry-cpp \ && mkdir build \ && cd build \ && cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/install \ -DCMAKE_PREFIX_PATH=/install \ -DWITH_OTLP=ON \ -DWITH_OTLP_GRPC=ON \ -DWITH_OTLP_HTTP=OFF \ -DBUILD_TESTING=OFF \ -DWITH_EXAMPLES=OFF \ -DWITH_ABSEIL=ON \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ .. \ && make -j2 \ && make install RUN git clone https://github.com/open-telemetry/opentelemetry-cpp-contrib.git \ && cd opentelemetry-cpp-contrib/instrumentation/nginx \ && mkdir build \ && cd build \ && cmake -DCMAKE_BUILD_TYPE=Release \ -DNGINX_BIN=/usr/local/openresty/bin/openresty \ -DCMAKE_PREFIX_PATH=/install \ -DCMAKE_INSTALL_PREFIX=/usr/local/openresty/nginx/modules \ -DCURL_LIBRARY=/usr/lib/libcurl.so.4 \ .. \ && make -j2 \ && make install FROM apache/apisix:2.12.0-alpine RUN echo 'https://mirrors.ustc.edu.cn/alpine/v3.15/main' > /etc/apk/repositories \ && echo 'https://mirrors.ustc.edu.cn/alpine/v3.15/community' >> /etc/apk/repositories\ && apk update \ && apk add --update alpine-sdk build-base cmake linux-headers libressl-dev pcre-dev zlib-dev grpc-dev curl-dev protobuf-dev c-ares-dev re2-dev \ && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ && echo "Asia/Shanghai" > /etc/timezone COPY --from=builder /usr/local/openresty/nginx/modules/otel_ngx_module.so /usr/local/openresty/nginx/modules/otel_ngx_module.so WORKDIR /usr/local/apisix ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin EXPOSE 9080 9443 CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"] STOPSIGNAL SIGQUIT ``` docker-compose.yaml ``` # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # APISIX_DOCKER_TAG version: "3" services: apisix: user: root privileged: true cap_add: - ALL image: "docker.mydomain.com/apisix/apisix:2.12.0-alpine-otel" restart: always volumes: - ../example/apisix_log:/usr/local/apisix/logs - ../example/apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro - ../example/apisix_conf/otel-nginx.toml:/usr/local/apisix/conf/otel-nginx.toml:ro depends_on: - etcd ports: - "9080:9080/tcp" - "9091:9091/tcp" - "9443:9443/tcp" networks: - apisix etcd: image: bitnami/etcd:3.4.9 user: root restart: always volumes: - ../example/etcd_data:/etcd_data environment: ETCD_DATA_DIR: /etcd_data ETCD_ENABLE_V2: "true" ALLOW_NONE_AUTHENTICATION: "yes" ETCD_ADVERTISE_CLIENT_URLS: "http://0.0.0.0:2379" ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379" ports: - "2379:2379/tcp" networks: - apisix networks: apisix: driver: bridge ``` apisix_conf/config.yaml ``` # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # basic: enable: true apisix: node_listen: 9080 # APISIX listening port enable_ipv6: false allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow - 0.0.0.0/0 # We need to restrict ip access rules for security. 0.0.0.0/0 is for test. admin_key: - name: "admin" key: edd1c9f034335f136f87ad84b625c8f1 role: admin # admin: manage all configuration data # viewer: only can view configuration data - name: "viewer" key: 4054f7cf07e344346cd3f287985e76a2 role: viewer enable_control: true control: ip: "0.0.0.0" port: 9092 etcd: host: # it's possible to define multiple etcd hosts addresses of the same etcd cluster. - "http://etcd:2379" # multiple etcd address prefix: "/apisix" # apisix configurations prefix timeout: 30 # 30 seconds nginx_config: main_configuration_snippet: | load_module /usr/local/openresty/nginx/modules/otel_ngx_module.so; http_configuration_snippet: | http_server_configuration_snippet: | plugin_attr: prometheus: export_addr: ip: "0.0.0.0" port: 9091 ``` run docker-compose -d up curl http://127.0.0.1:9091/apisix/prometheus/metrics apisix/logs/error.log ``` [alert] 1#1: worker process 46 exited on signal 11 [error] 93#93: *768 [lua] plugin.lua:109: load_plugin(): failed to load plugin [ldap-auth] err: error loading module 'lualdap' from file '/usr/local/apisix//deps/lib/lua/5.1/lua Error loading shared library libldap-2.4.so.2: No such file or directory (needed by /usr/local/apisix//deps/lib/lua/5.1/lualdap.so), context: init_worker_by_lua* ``` if I do not load the so, everything is ok. but also, base image lack the openldap , after I install the openldap , coredump disappears also. I want to know the auth-ldap has anything with the opentelemetry so? ### Expected Behavior output normaly ### Error Logs [alert] 1#1: worker process 46 exited on signal 11 [error] 93#93: *768 [lua] plugin.lua:109: load_plugin(): failed to load plugin [ldap-auth] err: error loading module 'lualdap' from file '/usr/local/apisix//deps/lib/lua/5.1/lua Error loading shared library libldap-2.4.so.2: No such file or directory (needed by /usr/local/apisix//deps/lib/lua/5.1/lualdap.so), context: init_worker_by_lua* ### Steps to Reproduce 1. docker build with the Dockerfile 2. run docker-compose 3. curl http://127.0.0.1:9091/apisix/prometheus/metrics ### Environment - APISIX version (run `apisix version`): - Operating system (run `uname -a`): - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`): - APISIX Dashboard version, if relevant: - Plugin runner version, for issues related to plugin runners: - LuaRocks version, for installation issues (run `luarocks --version`): -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
