question

Ron F. avatar image
Ron F. asked ·

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

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/installer/agent/solaris/paas/latest?Api-Token=vWejlAH5SuW_Po1t-K5Y8&arch=sparc&flavor=default

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-oneagent-on-solaris/?configure-oneagent-solaris=generic-java-applications/aris_every=oneagent-v1141-and-above

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

oneagenterrors
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Chakravarthula P. avatar image
Chakravarthula P. answered ·

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

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Ron F. avatar image
Ron F. answered ·

Thanks for having a look Joseph

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Joe H. avatar image
Joe H. answered ·

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.

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Ron F. avatar image
Ron F. answered ·

:~$ 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.

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Ron F. avatar image
Ron F. answered ·

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

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Joe H. avatar image
Joe H. answered ·

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.

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Ron F. avatar image
Ron F. answered ·

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

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Ron F. avatar image
Ron F. answered ·

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

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Joe H. avatar image
Joe H. answered ·

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?

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.