cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why are we getting "wrong ELF data format: ELFDATA2LSB" error on startup

ron_fitzpatrick
Participant


We are trying to set up Dynatrace On Agent on a 64 bit Solaris Sparc architecture

We downloaded the agent with the following:

wget -O Dynatrace-OneAgent-Solaris-sparc-1.153.307.zip
https://tno645.dynatrace-managed.com/e/c1b75698-6a53-437b-8763-791551d554e2/api/v1/deployment/instal...

We plan to run the agent for multiple tomcats and are taking the approach of setting the required environmental variables for each tomcat startup script. We are setting the variables according to the instructions here:

https://www.dynatrace.com/support/help/deploy-dynatrace/oneagent/solaris/installation/install-oneage...

namely:

DT_HOME=/opt/dynatrace/oneagent
export DT_HOME
LD_PRELOAD_64=$DT_HOME/agent/lib64/liboneagentproc.so
export LD_PRELOAD_64
LD_PRELOAD=$DT_HOME/agent/lib/liboneagentproc.so
export LD_PRELOAD

The paths look correct and the permissions on the file are rwxr-xr-x (so it should be readable by all). We are attempting this config on one of the tomcats and we get the following error:

ld.so.1: tty: fatal: /opt/dynatrace/oneagent/agent/lib/liboneagentproc.so: wrong ELF data format: ELFDATA2LSB

Can you shed any light on what we might have done wrong and/or how to fix?

thx


9 REPLIES 9

Joe_Hoffman
Dynatrace Champion
Dynatrace Champion

This is possibly caused by using the wrong bit size library.

The error shows that it's trying to load the 32bit .so file, which means that process is using the LD_PRELOAD Env Var. Can you force it to only see the LD_PRELOAD_64 Env Var?


ron_fitzpatrick
Participant

We are using Dynatrace's own instructions located here:

https://www.dynatrace.com/support/help/deploy-dyna...

It says to set these:

DT_HOME=/opt/dynatrace/oneagent
export DT_HOME
LD_PRELOAD_64=$DT_HOME/agent/lib64/liboneagentproc.so
export LD_PRELOAD_64
LD_PRELOAD=$DT_HOME/agent/lib/liboneagentproc.so
export LD_PRELOAD

Are you saying to remove the lines:

LD_PRELOAD=$DT_HOME/agent/lib/liboneagentproc.so
export LD_PRELOAD


ron_fitzpatrick
Participant

I tried removing these lines. It gives the error about the 64 bit lib


ld.so.1: java: fatal: /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so: wrong ELF data format: ELFDATA2LSB

verifying our platform:

~$ isainfo -kv
64-bit sparcv9 kernel modules


Joe_Hoffman
Dynatrace Champion
Dynatrace Champion

Ron, I'm more thinking that the bit issue is with the process you're trying to monitor, not the OS bit size. What do you get when you type "Java -version", be sure to run the java that you use for the application to be monitored.


ron_fitzpatrick
Participant

We're monitoring Tomcat 8 running on Java 1.8.0_45-b14


ron_fitzpatrick
Participant

:~$ java -version
java version "1.8.0_60"

- the version of Java at the OS level is different, but this is a shared server with multiple Tomcats and multiple versions of Java. Any given Tomcat we want to monitor could be running a different version of Java.


Joe_Hoffman
Dynatrace Champion
Dynatrace Champion

Ron, Sorry I couldn't be more help. I'm still thinking this is a bitness issue, but what you're doing looks correct. I suggest you reach out to Dynatrace support and have someone look into this further.


ron_fitzpatrick
Participant

Thanks for having a look Joseph


Iam facing same issue. Did anyone have an answer for this?