Daniel Knezevic

Hi there,

I'm struggling with setting up my Jennifer agent; I'm getting the error below when my agent tries to load my .so file.

I have tried both the libs that were included in the agent download:
- libjennifer5_0.3.0-aix_7.1_32.so
- libjennifer5_0.3.0-aix_7.1_64.so

But both give the same error.  I'm using jennifer 5.1.2.2, however I also tried updating to the latest version of the agent but still received this error on both libs.

This is my Java version:
[bkuser@stg-wbktool101z agent.java]$ java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)

OS version:
[bkuser@stg-wbktool101z agent.java]$ uname -a
Linux stg-wbktool101z.stg.jp.local 2.6.18-274.el5 #1 SMP Fri Jul 22 04:43:29 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

I feel like it is a mismatch between 64 and 32 bit architectures, but I'm stuck.  Has anyone else encountered this error before?  Do you need anymore information from me?

Here's the error:

java.lang.UnsatisfiedLinkError: /usr/local/apm/jennifer_bbs/agent.java/libs/libjennifer5_0.3.0-aix_7.1_32.so: /usr/local/apm/jennifer_bbs/agent.java/libs/libjennifer5_0.3.0-aix_7.1_32.so: ???ELF??? (Possible cause: endianness mismatch)
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674)
        at java.lang.Runtime.load0(Runtime.java:770)
        at java.lang.Runtime.load(Runtime.java:758)
        at jennifer.runtime.jni.SysJniImpl.<clinit>(SourceFile:28)
        at jennifer.control.recorder.jni.b.<clinit>(SourceFile:24)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at jennifer.control.h.a(SourceFile:123)
        at jennifer.control.ModuleMain.start(SourceFile:68)
        at jennifer.base.ModuleManager$3.call(ModuleManager.java:259)
        at jennifer.base.ModuleManager$3.call(ModuleManager.java:251)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)

Khalid Saeed

Hi Daniel, 

I think this error is because you are trying to load an AIX library on Linux machine. 

[bkuser@stg-wbktool101z agent.java]$ uname -a
Linux stg-wbktool101z.stg.jp.local 2.6.18-274.el5 #1 SMP Fri Jul 22 04:43:29 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

Can you try removing the libjennifer.xxx-aix.so files from your AGENT_HOME/libs directory. 

 

Daniel Knezevic

Thanks for getting back to me Khalid!

When I remove the lib I get the message "no jennifer5 native lib on '.../agent.java/libs'" in the logs.

Which library do you recommend I use for a linux machine?  I was looking elsewhere and saw something about libjennifer20_linux_32_32.so - would this be what I'm after?  Where can I find it?

Thanks again,

Daniel

Khalid Saeed

That is just an INFO message, it is not an error. 

For Linux based machine, there is no Library needed. The agent make use of the stat provded by linux as well as  JMX data.

The libjennifer20_linux_32_32.so is the name of the library for JENNIFER Version 4.x not JENNIFER 5.x

Daniel Knezevic

Ah I see, I understand now.

 

It's working now, thanks a lot for the help!