JMeter Maven plugin mysteriously exits with 143 return code

214 views
Skip to first unread message

⇜Krishnan Mahadevan⇝

unread,
Jul 2, 2020, 2:08:25 PM7/2/20
to maven-jmeter...@googlegroups.com
Folks,

Every now and then I keep seeing the JMeter Maven plugin mysteriously exits with 143 return code. I havent been able to identify as to what is causing this. 

Has anyone experienced this ? If yes, what is the resolution for this.

Here's what I have researched so far:
  • Java and Maven version: 
mvn --version
Maven home: /usr/share/maven
Java version: 1.8.0_201, vendor: Oracle Corporation, runtime: /opt/jdk1.8.0_201/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.14.171-136.231.amzn2.x86_64", arch: "amd64", family: "unix"

  • JMeter version: 5.2.1
  • JMeter Maven plugin version : 3.0.0
  • Jenkins 2.235.1
  • My Jenkins instance is running on an AWS EC2 instance. Version details as below
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
Amazon Linux release 2 (Karoo)

The plugin entry looks like below

          <plugin>
            <groupId>com.lazerycode.jmeter</groupId>
            <artifactId>jmeter-maven-plugin</artifactId>
            <version>${jmeter.plugin.version}</version>
            <executions>
              <!-- Generate JMeter configuration -->
              <execution>
                <id>configuration</id>
                <goals>
                  <goal>configure</goal>
                </goals>
              </execution>
              <!-- Run JMeter tests -->
              <execution>
                <id>jmeter-tests</id>
                <goals>
                  <goal>jmeter</goal>
                </goals>
              </execution>
              <!-- Fail build on errors in test -->
              <execution>
                <id>jmeter-check-results</id>
                <goals>
                  <goal>results</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <jmeterExtensions>
                <jmeterExtension>kg.apc:jmeter-plugins-casutg:2.9</jmeterExtension>
                <jmeterExtension>kg.apc:jmeter-plugins-tst:2.5</jmeterExtension>
              </jmeterExtensions>
              <reportDirectory>${project.build.directory}/reports</reportDirectory>
              <jMeterProcessJVMSettings>
                <xms>${xms}</xms>
                <xmx>${xmx}</xmx>
              </jMeterProcessJVMSettings>
              <propertiesGlobal>
                <threadgroup.count>${users}</threadgroup.count>
                <threadgroup.duration>${duration}</threadgroup.duration>
                <threadgroup.srps>${srps}</threadgroup.srps>
                <threadgroup.erps>${erps}</threadgroup.erps>
                <threadgroup.rampup>${rampup}</threadgroup.rampup>
                <threadgroup.loopcount>${loop}</threadgroup.loopcount>
                <test.environment.hostname>${env}</test.environment.hostname>
                <zeus.hostname>${zeus.host}</zeus.hostname>
                <zeus.port>${zeus.port}</zeus.port>
                <zeus.user.group>${groupID}</zeus.user.group>
                <fileNum.count>${fileNum}</fileNum.count>
                <Username>${Username}</Username>
                <count>${count}</count>
                <loginuser>${loginuser}</loginuser>
              </propertiesGlobal>
              <propertiesUser>
                <baseDir>${resources}/src/resources</baseDir>
                <server.rmi.ssl.disable>true</server.rmi.ssl.disable>
                <CookieManager.save.cookies>true</CookieManager.save.cookies>
              </propertiesUser>
              <!-- Add all jmx files here -->
              <testFilesIncluded>
                ${script}
              </testFilesIncluded>
              <generateReports>true</generateReports>
              <scanResultsForSuccessfulRequests>true</scanResultsForSuccessfulRequests>
              <scanResultsForFailedRequests>true</scanResultsForFailedRequests>
              <ignoreResultFailures>true</ignoreResultFailures>
              <remoteConfig>
                <startServersBeforeTests>true</startServersBeforeTests>
                <serverList>${servers}</serverList>
              </remoteConfig>
              <resultsFileFormat>xml</resultsFileFormat>
              <overrideRootLogLevel>${log.level}</overrideRootLogLevel>
            </configuration>
          </plugin>


This is what I see in the Jenkins job console

13:02:41 [INFO] --- jmeter-maven-plugin:3.0.0:jmeter (jmeter-tests) @ kratos ---
13:02:41 [INFO]  
13:02:41 [INFO] -------------------------------------------------------
13:02:41 [INFO]  P E R F O R M A N C E    T E S T S
13:02:41 [INFO] -------------------------------------------------------
13:02:41 [INFO]  
13:02:41 [INFO] Will generate HTML report in /var/lib/jenkins/workspace/kratos/kratos/target/reports/driver/driver_intake_reports_mariaDB
13:02:41 [INFO] Executing test: driver_intake_reports_mariaDB.jmx
13:02:41 [INFO] Arguments for forked JMeter JVM: [java, -Xms1024M, -Xmx2048M, -Djava.awt.headless=true, -jar, ApacheJMeter-5.2.1.jar, -d, /var/lib/jenkins/workspace/kratos/kratos/target/e91d4715-a0e7-422b-91fb-9677c337bba8/jmeter, -e, -j, /var/lib/jenkins/workspace/kratos/kratos/target/jmeter/logs/driver_intake_reports_mariaDB.jmx.log, -l, /var/lib/jenkins/workspace/kratos/kratos/target/jmeter/results/20200702-driver_driver_intake_reports_mariaDB.csv, -n, -o, /var/lib/jenkins/workspace/kratos/kratos/target/reports/driver/driver_intake_reports_mariaDB, -r, -t, /var/lib/jenkins/workspace/kratos/kratos/target/jmeter/testFiles/driver/driver_intake_reports_mariaDB.jmx, -L, INFO, -R, 1.2.3.4, -Dsun.net.http.allowRestrictedHeaders, true, -Gthreadgroup.srps=1, -GUsername=KRATOS, -Gtest.environment.hostname=productpt.pvai.com, -Gzeus.user.group=ADMINISTRATION, -Gthreadgroup.count=4, -Gcount=100, -Gzeus.port=8081, -Gthreadgroup.erps=1, -Gthreadgroup.rampup=30, -GfileNum.count=100, -Gthreadgroup.loopcount=1, -Gloginuser=KRATOS0, -Gthreadgroup.duration=3600, -Gzeus.hostname=9.8.7.6]
13:02:41 [INFO]  
13:02:41 [INFO] SLF4J: Class path contains multiple SLF4J bindings.
13:02:41 [INFO] SLF4J: Found binding in [jar:file:/var/lib/jenkins/workspace/kratos/kratos/target/e91d4715-a0e7-422b-91fb-9677c337bba8/jmeter/lib/log4j-slf4j-impl-2.12.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
13:02:41 [INFO] SLF4J: Found binding in [jar:file:/var/lib/jenkins/workspace/kratos/kratos/target/e91d4715-a0e7-422b-91fb-9677c337bba8/jmeter/lib/slf4j-nop-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
13:02:41 [INFO] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
13:02:41 [INFO] SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
13:02:43 [INFO] Creating summariser <summary>
13:02:43 [INFO] Created the tree successfully using /var/lib/jenkins/workspace/kratos/kratos/target/jmeter/testFiles/driver/driver_intake_reports_mariaDB.jmx
13:02:43 [INFO] Configuring remote engine: 1.2.3.4
13:02:43 [INFO] Starting distributed test with remote engines: [1.2.3.4] @ Thu Jul 02 13:02:43 UTC 2020 (1593694963458)
13:02:44 [INFO] Remote engines have been started:[1.2.3.4]
13:02:44 [INFO] Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
13:17:00 [INFO] summary +    634 in 00:14:16 =    0.7/s Avg:   187 Min:     0 Max:   656 Err:     0 (0.00%) Active: 4 Started: 4 Finished: 0
13:18:01 [INFO] summary +     55 in 00:01:01 =    0.9/s Avg:   224 Min:     0 Max:   430 Err:     0 (0.00%) Active: 4 Started: 4 Finished: 0
13:18:01 [INFO] summary =    689 in 00:15:17 =    0.8/s Avg:   190 Min:     0 Max:   656 Err:     0 (0.00%)
13:19:01 [INFO] summary +     57 in 00:01:00 =    0.9/s Avg:   131 Min:     0 Max:   410 Err:     0 (0.00%) Active: 4 Started: 4 Finished: 0
13:19:01 [INFO] summary =    746 in 00:16:17 =    0.8/s Avg:   186 Min:     0 Max:   656 Err:     0 (0.00%)
13:20:05 [INFO] summary +     52 in 00:01:04 =    0.8/s Avg:   286 Min:     0 Max:   610 Err:     0 (0.00%) Active: 4 Started: 4 Finished: 0
13:20:05 [INFO] summary =    798 in 00:17:21 =    0.8/s Avg:   192 Min:     0 Max:   656 Err:     0 (0.00%)
13:21:05 [INFO] summary +     56 in 00:01:00 =    0.9/s Avg:   186 Min:     0 Max:   539 Err:     0 (0.00%) Active: 4 Started: 4 Finished: 0
13:21:05 [INFO] summary =    854 in 00:18:21 =    0.8/s Avg:   192 Min:     0 Max:   656 Err:     0 (0.00%)
13:43:44 [INFO] ------------------------------------------------------------------------
13:43:44 [INFO] BUILD FAILURE
13:43:44 [INFO] ------------------------------------------------------------------------
13:43:44 [INFO] Total time:  41:08 min
13:43:44 [INFO] Finished at: 2020-07-02T13:43:44Z
13:43:44 [INFO] ------------------------------------------------------------------------
13:43:44 Waiting for Jenkins to finish collecting data[ERROR] Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:3.0.0:jmeter (jmeter-tests) on project kratos: Test failed with exit code:143 -> [Help 1]
13:43:44 [ERROR] 
13:43:44 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
13:43:44 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
13:43:44 [ERROR] 
13:43:44 
13:43:44 [ERROR] For more information about the errors and possible solutions, please read the following articles:
13:43:44 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/

Mark Collin

unread,
Jul 2, 2020, 2:15:03 PM7/2/20
to maven-jmeter...@googlegroups.com
Looks like a bug on our side.

The 143 is the exit code provided if the JVM is force killed.

We normally wait for JMeter to shut itself down, then check the exit code to see if it was non-zero. 

In your case it looks like JMeter didn’t shut down quick enough, so we force killed it. That caused the exit code of the process to be 143, so when we checked that the exit code was not zero, we failed the test.

We should probably add a flag that lets you select if killing the JMeter process fails the build or not.

--
You received this message because you are subscribed to the Google Groups "Maven JMeter Plugin Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-jmeter-plugi...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/maven-jmeter-plugin-users/CANikZL%3DxppNjZ%2BCoHeihG_ApUCz_C%3DR8XnKgh6UW5EWUVM5Y2w%40mail.gmail.com.

Ardesco

unread,
Jul 3, 2020, 3:33:18 AM7/3/20
to Maven JMeter Plugin Users

Ardesco

unread,
Jul 3, 2020, 4:45:40 PM7/3/20
to Maven JMeter Plugin Users
Fix applied in version 3.1.1
Reply all
Reply to author
Forward
0 new messages