My Application cannot be listed under profiler monitor applications

Questions about YourKit Java Profiler
Locked
prashi.nmpl
Posts: 11
Joined: Wed Dec 20, 2023 8:56 am

Re: My Application cannot be listed under profiler monitor applications

Post by prashi.nmpl »

we have our command line tool to run dokcer images has below options to run the app:
Executing command: docker run --rm -d --name=prime --net=pclinet --label=jetty --group-add=$(id -g) --mount type=bind,source=${REPO_HOME}/projects/tools/pcli/config/log4j2.xml,target=/u01/jetty_home/resources/log4j2.xml --mount type=bind,source=${BINGIT_HOME:-${HOME}/.bingit},target=${BINGIT_HOME:-${HOME}/.bingit} --mount type=tmpfs,destination=/tmp --mount type=bind,source=${PCLI_HOME}/../config/hazelcast/hazelcast-client-config.xml,target=/u01/jetty_home/etc/hazelcast.xml --mount type=bind,source=${PCLI_HOME}/../config/hazelcast/hazelcast-remote-config.xml,target=/u01/jetty_home/etc/sessions/hazelcast/remote.xml --mount type=bind,source=${REPO_HOME}/projects/tools/build/jetty-config/session-store-hazelcast-remote.mod,target=/u01/jetty_home/modules/session-store-hazelcast-remote.mod --mount type=bind,source=${REPO_HOME}/3rdparty/hazelcast/,target=/u01/jetty_home/lib/hazelcast/ --mount type=bind,source=${PCLI_HOME}/../config/hazelcast/session-store-hazelcast-remote.ini,target=/u01/jetty_home/start.d/session-store-hazelcast-remote.ini --mount type=bind,source=${CLOVER_PATH:-${REPO_HOME}/reports},target=/u01/jetty_home/clover/clover_registry --env JETTY_SERVER_PORT=8080 --env JAVA_OPTIONS=-Djetty.http.port=8080 -p 8080:8080 -p 8453:8453 --env-file ${PCLI_HOME}/prime-env.properties --env ADMIN_HOST=prime --env pekko_remote_artery_canonical_hostname=prime --env ADMIN_HOST=prime --env cluster_http_port=8080 --mount type=bind,source=${REPO_HOME}/projects/tools/build/jetty-config/jetty-jaas-config.xml,target=/u01/jetty_home/etc/jetty.xml --mount type=bind,source=${REPO_HOME}/projects/tools/build/jetty-config/webdefault.xml,target=/u01/jetty_home/etc/webdefault.xml --mount type=bind,source=${REPO_HOME}/projects/gridcache/gar/META-INF/extend-security-override.xml,target=/u01/jetty_home/lib/extend-security-override.xml --mount type=bind,source=${REPO_HOME}/projects/gridcache/gar/META-INF/prime-pof-scheme.xml,target=/u01/jetty_home/lib/cache-pof-scheme.xml --mount type=bind,source=${REPO_HOME}/projects/gridcache/gar/META-INF/client-coherence-cache-config.xml,target=/u01/jetty_home/lib/client-coherence-cache-config.xml --env USER_MEM_ARGS="-Xms6272m -Xmx6272m" --mount type=bind,source=${REPO_HOME}/3rdparty/builds/help.war,target=/u01/jetty_home/webapps/help.war --mount type=bind,source=${REPO_HOME}/snapshots/web.war,target=/u01/jetty_home/webapps/web.war --mount type=bind,source=${REPO_HOME}/snapshots/primeintg.war,target=/u01/jetty_home/webapps/primeintg.war --mount type=bind,source=${REPO_HOME}/snapshots/primems.war,target=/u01/jetty_home/webapps/primems.war jetty-dev-yourkit
and when we run our app which has to be profiled, there wont be any logs created after startup of my app in <usename>/.yjp/log folder inside of the docker container.

when i run this command
java -agentpath:/u01/yourkitprofiler/bin/linux-x86-64/libyjpagent.so -version
, then i could see one log file gets created in this location
/home/cegbu_apps/.yjp/log/java-xxxx.log
, but inside the logs the JVM process terminates and due to this unable to profile the app.

Below is the result of above command
java -agentpath:/u01/yourkitprofiler/bin/linux-x86-64/libyjpagent.so -version
:
[cegbu_apps@3a3342fd12eb ~]$ java -agentpath:/u01/yourkitprofiler/bin/linux-x86-64/libyjpagent.so -version
[YourKit Java Profiler 2023.9-b103] Log file: /home/cegbu_apps/.yjp/log/java-706.log
java version "1.8.0_391"
Java(TM) SE Runtime Environment (build 1.8.0_391-b31)
Java HotSpot(TM) 64-Bit Server VM (build 25.391-b31, mixed mode)
Here i have few things to verify :
  • Do we get logs to be created on the application startup itself in this location(/home/cegbu_apps/.yjp/log/java-xxxx.log) ?
  • What could be the reason of server shutdown if i ran above command(java -agentpath:/u01/yourkitprofiler/bin/linux-x86-64/libyjpagent.so -version)?
As we dont have any clue whats wrong with our approach in order to profile our application using yjp, earlier we used to profile the same app without any issues.

Kindly suggest us what should be done in order to resolve this issue?
prashi.nmpl
Posts: 11
Joined: Wed Dec 20, 2023 8:56 am

Re: My Application cannot be listed under profiler monitor applications

Post by prashi.nmpl »

we have our command line tool to run dokcer images has below options to run the app:
Executing command: docker run --rm -d --name=prime --net=pclinet --label=jetty --group-add=$(id -g) --mount type=bind,source=${REPO_HOME}/projects/tools/pcli/config/log4j2.xml,target=/u01/jetty_home/resources/log4j2.xml --mount type=bind,source=${BINGIT_HOME:-${HOME}/.bingit},target=${BINGIT_HOME:-${HOME}/.bingit} --mount type=tmpfs,destination=/tmp --mount type=bind,source=${PCLI_HOME}/../config/hazelcast/hazelcast-client-config.xml,target=/u01/jetty_home/etc/hazelcast.xml --mount type=bind,source=${PCLI_HOME}/../config/hazelcast/hazelcast-remote-config.xml,target=/u01/jetty_home/etc/sessions/hazelcast/remote.xml --mount type=bind,source=${REPO_HOME}/projects/tools/build/jetty-config/session-store-hazelcast-remote.mod,target=/u01/jetty_home/modules/session-store-hazelcast-remote.mod --mount type=bind,source=${REPO_HOME}/3rdparty/hazelcast/,target=/u01/jetty_home/lib/hazelcast/ --mount type=bind,source=${PCLI_HOME}/../config/hazelcast/session-store-hazelcast-remote.ini,target=/u01/jetty_home/start.d/session-store-hazelcast-remote.ini --mount type=bind,source=${CLOVER_PATH:-${REPO_HOME}/reports},target=/u01/jetty_home/clover/clover_registry --env JETTY_SERVER_PORT=8080 --env JAVA_OPTIONS=-Djetty.http.port=8080 -p 8080:8080 -p 8453:8453 --env-file ${PCLI_HOME}/prime-env.properties --env ADMIN_HOST=prime --env pekko_remote_artery_canonical_hostname=prime --env ADMIN_HOST=prime --env cluster_http_port=8080 --mount type=bind,source=${REPO_HOME}/projects/tools/build/jetty-config/jetty-jaas-config.xml,target=/u01/jetty_home/etc/jetty.xml --mount type=bind,source=${REPO_HOME}/projects/tools/build/jetty-config/webdefault.xml,target=/u01/jetty_home/etc/webdefault.xml --mount type=bind,source=${REPO_HOME}/projects/gridcache/gar/META-INF/extend-security-override.xml,target=/u01/jetty_home/lib/extend-security-override.xml --mount type=bind,source=${REPO_HOME}/projects/gridcache/gar/META-INF/prime-pof-scheme.xml,target=/u01/jetty_home/lib/cache-pof-scheme.xml --mount type=bind,source=${REPO_HOME}/projects/gridcache/gar/META-INF/client-coherence-cache-config.xml,target=/u01/jetty_home/lib/client-coherence-cache-config.xml --env USER_MEM_ARGS="-Xms6272m -Xmx6272m" --mount type=bind,source=${REPO_HOME}/3rdparty/builds/help.war,target=/u01/jetty_home/webapps/help.war --mount type=bind,source=${REPO_HOME}/snapshots/web.war,target=/u01/jetty_home/webapps/web.war --mount type=bind,source=${REPO_HOME}/snapshots/primeintg.war,target=/u01/jetty_home/webapps/primeintg.war --mount type=bind,source=${REPO_HOME}/snapshots/primems.war,target=/u01/jetty_home/webapps/primems.war jetty-dev-yourkit
and when we run our app which has to be profiled, there wont be any logs created after startup of my app in <usename>/.yjp/log folder inside of the docker container.

when i run this command
java -agentpath:/u01/yourkitprofiler/bin/linux-x86-64/libyjpagent.so -version
, then i could see one log file gets created in this location
/home/cegbu_apps/.yjp/log/java-xxxx.log
, but inside the logs the JVM process terminates and due to this unable to profile the app.

Below is the result of above command:
java -agentpath:/u01/yourkitprofiler/bin/linux-x86-64/libyjpagent.so -version
:
[cegbu_apps@3a3342fd12eb ~]$ java -agentpath:/u01/yourkitprofiler/bin/linux-x86-64/libyjpagent.so -version
[YourKit Java Profiler 2023.9-b103] Log file: /home/cegbu_apps/.yjp/log/java-706.log
java version "1.8.0_391"
Java(TM) SE Runtime Environment (build 1.8.0_391-b31)
Java HotSpot(TM) 64-Bit Server VM (build 25.391-b31, mixed mode)

Here i have few things to verify :
  • Do we get logs to be created on the application startup itself in this location(/home/cegbu_apps/.yjp/log/java-xxxx.log) ?
  • What could be the reason of server shutdown if i ran above command(java -agentpath:/u01/yourkitprofiler/bin/linux-x86-64/libyjpagent.so -version)?
As we dont have any clue whats wrong with our approach in order to profile our application using yjp, earlier we used to profile the same app without any issues.

Kindly suggest us what should be done in order to resolve this issue?
Vladimir Kondratyev
Posts: 1660
Joined: Tue Aug 10, 2004 7:52 pm

Re: My Application cannot be listed under profiler monitor applications

Post by Vladimir Kondratyev »

Command "java -agentpath:/u01/yourkitprofiler/bin/linux-x86-64/libyjpagent.so -version" of course terminates, because JVM just prints version and exists.

You must pass "-agentpath:/u01/yourkitprofiler/bin/linux-x86-64/libyjpagent.so" paratemer to the JVM which runs your Jetty server. Most propably you have to add "-agentpath:/u01/yourkitprofiler/bin/linux-x86-64/libyjpagent.so" to your JAVA_OPTIONS variable.
Locked