libyjpagent.so: No such file or directory

Questions about YourKit Java Profiler
Post Reply
dav
Posts: 3
Joined: Tue Aug 27, 2019 5:59 am

libyjpagent.so: No such file or directory

Post by dav »

I am trying to integrate yourkit with Jboss EAP-6.4.16. I am including the yourkit in startup script as follows:

-agentpath:/usr/local/EAP-6.4.16/jboss-eap-6.4/yourkit/libyjpagent.so

but I get the error:

No such file or directory

The file is there. The permissions are as follows:

ls -l /usr/local/EAP-6.4.16/jboss-eap-6.4/yourkit/libyjpagent.so
-rw-r--r-- 1 jboss jboss 5133136 Aug 26 22:08 /usr/local/EAP-6.4.16/jboss-eap-6.4/yourkit/libyjpagent.so

I am running the jboss server by logging as jboss user.

The JDK that is being used is Oracle JDK

JAVA: /usr/java/jdk1.8.0_131/bin/java

The OS is Redhat Linux 64 bit version and I am using linux-x86-64 version of Yourkit.

Anything more I have to do here.

Thanks
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: libyjpagent.so: No such file or directory

Post by Anton Katilin »

Please provide output of these commands:

ldd -r /usr/local/EAP-6.4.16/jboss-eap-6.4/yourkit/libyjpagent.so
file /usr/local/EAP-6.4.16/jboss-eap-6.4/yourkit/libyjpagent.so
uname -a
/usr/java/jdk1.8.0_131/bin/java -version

Which version of the profiler do you use?

Instead of manually patching the script please consider using the console wizard: https://www.yourkit.com/docs/java/help/ ... remote.jsp
dav
Posts: 3
Joined: Tue Aug 27, 2019 5:59 am

Re: libyjpagent.so: No such file or directory

Post by dav »

ldd -r /usr/local/EAP-6.4.16/jboss-eap-6.4/yourkit/libyjpagent.so
linux-vdso.so.1 => (0x00007fff055ff000)
librt.so.1 => /lib64/librt.so.1 (0x00007fcaa7220000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fcaa701c000)
libm.so.6 => /lib64/libm.so.6 (0x00007fcaa6d97000)
libc.so.6 => /lib64/libc.so.6 (0x00007fcaa6a04000)
/lib64/ld-linux-x86-64.so.2 (0x0000003faea00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fcaa67e7000)


file /usr/local/EAP-6.4.16/jboss-eap-6.4/yourkit/libyjpagent.so
/usr/local/EAP-6.4.16/jboss-eap-6.4/yourkit/libyjpagent.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped


uname -a
Linux QJBB11CUSWA 2.6.32-358.6.2.el6.x86_64 #1 SMP Tue May 14 15:48:21 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux


/usr/java/jdk1.8.0_131/bin/java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

I am using the following version of profiler:
YourKit-JavaProfiler-2019.8-b109.zip
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: libyjpagent.so: No such file or directory

Post by Anton Katilin »

All seems OK with the output and the profiler version.

Did you have a chance to try the wizard?

Perhaps you get the error because you improperly inserted the -agentpath Java option. It should be specified among other Java options such as -Xmx or -D<property>=<value>.

Please provide the content of the start script with -agentpath specified.
dav
Posts: 3
Joined: Tue Aug 27, 2019 5:59 am

Re: libyjpagent.so: No such file or directory

Post by dav »

eval \"$JAVA\" -D\"[Standalone]\" $JAVA_OPTS \
\"-Dorg.jboss.boot.log.file="$JBOSS_LOG_DIR"/server.log\" \
\"-Dlogging.configuration=file:"$JBOSS_CONFIG_DIR"/logging.properties\" \
-jar \""$JBOSS_HOME"/jboss-modules.jar\" \
$MODULE_OPTS \
-mp \""${JBOSS_MODULEPATH}"\" \
-jaxpmodule "javax.xml.jaxp-provider" \
org.jboss.as.standalone \
-Djboss.home.dir=\""$JBOSS_HOME"\" \
-Djboss.server.base.dir=\""$JBOSS_BASE_DIR"\" \
-agentpath:/usr/local/EAP-6.4.16/jboss-eap-6.4/yourkit/libyjpagent.so \
"$SERVER_OPTS"


The above command gets executed as part of standlone.sh which is called when the server is started.
Vladimir Kondratyev
Posts: 1619
Joined: Tue Aug 10, 2004 7:52 pm

Re: libyjpagent.so: No such file or directory

Post by Vladimir Kondratyev »

Please execute the command below under the jboss user:

Code: Select all

/usr/java/jdk1.8.0_131/bin/java -agentpath:/usr/local/EAP-6.4.16/jboss-eap-6.4/yourkit/libyjpagent.so -version
What is the output?

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: libyjpagent.so: No such file or directory

Post by Anton Katilin »

The problem seems to be with the order of options. Please put -agentpath earlier in the command line, before -jar.
Post Reply