# Instrumenting ingress-nginx: Error loading shared library ld-linux-x86-64.so.2: No such file or directory

**URL:** <https://community.dynatrace.com/t/instrumenting-ingress-nginx-error-loading-shared-library-ld-linux-x86-64-so-2-no-such-file-or-directory/46523>\
**Category:** Container platforms\
**Tags:** nginx, kubernetes\
**Created:** [July 9, 2024, 8:37pm UTC](https://community.dynatrace.com/t/instrumenting-ingress-nginx-error-loading-shared-library-ld-linux-x86-64-so-2-no-such-file-or-directory/46523 "2024-07-09T20:37:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![YuriiB](https://avatars.discourse-cdn.com/v4/letter/y/c57346/32.png) [@YuriiB](https://community.dynatrace.com/u/YuriiB)\
**Post date:** [July 9, 2024, 8:37pm UTC](https://community.dynatrace.com/t/instrumenting-ingress-nginx-error-loading-shared-library-ld-linux-x86-64-so-2-no-such-file-or-directory/46523/1 "2024-07-09T20:37:41Z")

</div>

Hello,

We’re currently facing a challenge with setting up instrumentation for ingress nginx within a Kubernetes cluster managed by Rancher. We’re using Nginx version 1.19.10 on CentOS Linux 7.

Following the steps outlined in [Instrument ingress-nginx - Dynatrace Docs](https://docs.dynatrace.com/docs/setup-and-configuration/setup-on-k8s/guides/operation/instrument-nginx), we updated the nginx config map to include the Nginx module. However, this resulted in errors within the Nginx pods. The error message indicates a failure to load the shared library ld-linux-x86-64.so.2, which is required by /opt/dynatrace/oneagent/agent/bin/current/linux-x86-64/liboneagentnginx.so, as detailed in the error log. Could anyone shed light on why the shared library fails to load?

```cpp
Error reloading NGINX: ------------------------------------------------------------------------------- Error: exit status 1 2024/07/09 18:20:32 [emerg] 888#888: dlopen() "/opt/dynatrace/oneagent/agent/bin/current/linux-x86-64/liboneagentnginx.so" failed (Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /opt/dynatrace/oneagent/agent/bin/current/linux-x86-64/liboneagentnginx.so)) in /tmp/nginx/nginx-cfg2083950123:15 nginx: [emerg] dlopen() "/opt/dynatrace/oneagent/agent/bin/current/linux-x86-64/liboneagentnginx.so" failed (Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /opt/dynatrace/oneagent/agent/bin/current/linux-x86-64/liboneagentnginx.so)) in /tmp/nginx/nginx-cfg2083950123:15 nginx: configuration file /tmp/nginx/nginx-cfg2083950123 test failed

```

OneAgent version is&nbsp;1.293.153

---

<div class="post-metadata">

**Author:** ![YuriiB](https://avatars.discourse-cdn.com/v4/letter/y/c57346/32.png) [@YuriiB](https://community.dynatrace.com/u/YuriiB)\
**Post date:** [July 9, 2024, 8:47pm UTC](https://community.dynatrace.com/t/instrumenting-ingress-nginx-error-loading-shared-library-ld-linux-x86-64-so-2-no-such-file-or-directory/46523/2 "2024-07-09T20:47:16Z")

</div>

Also, ingress-nginx process has this warning:

![yurii_0-1720557892845.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/8/a808e1cc4eacce25cfb166552c2c9f08de25979d.png)

---

<div class="post-metadata">

**Author:** ![PacoPorro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pacoporro/32/36087_2.png) [@PacoPorro](https://community.dynatrace.com/u/PacoPorro)\
**Post date:** [July 10, 2024, 6:48am UTC](https://community.dynatrace.com/t/instrumenting-ingress-nginx-error-loading-shared-library-ld-linux-x86-64-so-2-no-such-file-or-directory/46523/3 "2024-07-10T06:48:32Z")

</div>

You can try with manual approach

> **[Runtime instrumentation](https://docs.dynatrace.com/docs/ingest-from/technology-support/application-software/nginx/manual-runtime-instrumentation)**
>
> Learn how to force instrumenting patched/non-standard NGINX binaries during runtime.

---

<div class="post-metadata">

**Author:** ![YuriiB](https://avatars.discourse-cdn.com/v4/letter/y/c57346/32.png) [@YuriiB](https://community.dynatrace.com/u/YuriiB)\
**Post date:** [July 10, 2024, 11:45am UTC](https://community.dynatrace.com/t/instrumenting-ingress-nginx-error-loading-shared-library-ld-linux-x86-64-so-2-no-such-file-or-directory/46523/4 "2024-07-10T11:45:17Z")

</div>

Did anything change in OneAgent version 1.293? It was working properly before this version.

---

<div class="post-metadata">

**Author:** ![PacoPorro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pacoporro/32/36087_2.png) [@PacoPorro](https://community.dynatrace.com/u/PacoPorro)\
**Post date:** [July 10, 2024, 12:28pm UTC](https://community.dynatrace.com/t/instrumenting-ingress-nginx-error-loading-shared-library-ld-linux-x86-64-so-2-no-such-file-or-directory/46523/5 "2024-07-10T12:28:06Z")

</div>

[https://docs.dynatrace.com/docs/whats-new/release-notes/oneagent/sprint-293](https://docs.dynatrace.com/docs/whats-new/release-notes/oneagent/sprint-293)

---

<div class="post-metadata">

**Author:** ![YuriiB](https://avatars.discourse-cdn.com/v4/letter/y/c57346/32.png) [@YuriiB](https://community.dynatrace.com/u/YuriiB)\
**Post date:** [July 10, 2024, 12:35pm UTC](https://community.dynatrace.com/t/instrumenting-ingress-nginx-error-loading-shared-library-ld-linux-x86-64-so-2-no-such-file-or-directory/46523/6 "2024-07-10T12:35:06Z")

</div>

I’ve already seen that, but it doesn’t clarify why the Nginx instrumentation has begun to cause problems.

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [July 12, 2024, 8:31am UTC](https://community.dynatrace.com/t/instrumenting-ingress-nginx-error-loading-shared-library-ld-linux-x86-64-so-2-no-such-file-or-directory/46523/7 "2024-07-12T08:31:51Z")

</div>

Hi&nbsp;[@YuriiB](https://community.dynatrace.com/user/58947)

Did you try to use earlier version of OA (instead of latest, request a specific old version)?

Yos

---

<div class="post-metadata">

**Author:** ![YuriiB](https://avatars.discourse-cdn.com/v4/letter/y/c57346/32.png) [@YuriiB](https://community.dynatrace.com/u/YuriiB)\
**Post date:** [July 29, 2024, 5:50pm UTC](https://community.dynatrace.com/t/instrumenting-ingress-nginx-error-loading-shared-library-ld-linux-x86-64-so-2-no-such-file-or-directory/46523/8 "2024-07-29T17:50:48Z")

</div>

I wanted to let you know that we’ve identified the cause of the nginx instrumentation issue. According to the Dynatrace documentation we followed, found here&nbsp;[Instrument ingress-nginx - Dynatrace Docs](https://docs.dynatrace.com/docs/setup-and-configuration/setup-on-k8s/guides/operation/instrument-nginx), it recommends using the following entry under the main-snippet key: load\_module /opt/dynatrace/oneagent/agent/bin/current/ **linux-musl-x86-64** /liboneagentnginx.so;

This solution is effective for certain Linux operating systems, such as Cento OS, but not for others. For instance, on Linux Rocky 9, the correct module to load is&nbsp; /opt/dynatrace/oneagent/agent/bin/current/ **linux-x86-64** /liboneagentnginx.so;

Initially, when we enabled nginx instrumentation, we used the correct library path. However, after temporarily disabling it to assess its impact on performance and later re-enabling it by following the DT documentation, we encountered this issue. This led us to believe the problem might be related to the new version of OA.

It would be helpful if DT could reflect this variation across different Linux versions in that page.
