Fully featured low overhead profiler for Java EE and Java SE platforms.
Easy to use performance and memory profiler for .NET Framework.
Performance monitoring and profiling of Jenkins, Bamboo, TeamCity, Gradle, Maven, Ant and JUnit.

Jenkins stage failing only when using youMonitor block

Moderators: Vladimir Kondratyev, Anton Katilin

Jenkins stage failing only when using youMonitor block

Postby bbianchi » Thu Jan 02, 2020 10:01 pm

I have a Jenkinfile file with this block:

stage('Assemble') {
steps {
youMonitor {
bat "gradlew --info --stacktrace -Dorg.gradle.java.home=${winJavaHome} -PincludeExtraProjects=true -PbuildUi=false :assemble"

The gradle assemble runs and completes just fine, but Jenkins interprets the stageResult value as FAILURE.

If I remove the "youMonitor" block, the stageResult value is SUCCESS.

At the bottom of the log I see references to JAVA_TOOL_OPTIONS but other than that, the fail and success logs appear the same:

[2020-01-02T21:08:36.638Z] Picked up JAVA_TOOL_OPTIONS: "-agentlib:youmonitor="
[2020-01-02T21:08:36.638Z] Stopped 1 worker daemon(s).
[2020-01-02T21:08:36.639Z] Picked up JAVA_TOOL_OPTIONS: -agentlib:youmonitor

Is youMonitor compatible with gradle? Am I using it incorrectly in the jenkinsfile?

Thank you
Posts: 7
Joined: Mon Dec 30, 2019 9:09 pm

Re: Jenkins stage failing only when using youMonitor block

Postby Ilya Kalikin » Fri Jan 03, 2020 2:54 pm

Yes, Gradle is supported. Such Jenkins pipeline script should work. What Java and Gradle versions are used? Could you add --no-daemon option to gradlew call and see if that helps.

Maybe YouMonitor agent caused an error in the JVM. It would help if you send YouMonitor agent logs from <jenkins user home>\.youmonitor\log\ to [email protected] for examination.
Ilya Kalikin
Posts: 14
Joined: Mon Jun 12, 2017 3:06 pm

Re: Jenkins stage failing only when using youMonitor block

Postby Vladimir Kondratyev » Tue Jan 07, 2020 8:38 pm

We have just released build #64 of YouMonitor 2019.1

New build fixes exception which we've found in your logs. And we added more logging to find an
issues with empty repository list. Please install #64 and send us new log from Jenkins plugin.

Best regards,
Vladimir Kondratyev
YourKit GmbH
"Don't get lost in data, get information!"
Vladimir Kondratyev
Posts: 1521
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany

Return to YouMonitor

Who is online

Users browsing this forum: No registered users and 1 guest


YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.