Bug 62795 - JMeter master sometimes ends distributed test even though some of the slaves have not finished
Summary: JMeter master sometimes ends distributed test even though some of the slaves ...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 4.0
Hardware: PC All
: P2 normal (vote)
Target Milestone: JMETER_5.1
Assignee: JMeter issues mailing list
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2018-10-02 14:41 UTC by Catalin Bararu
Modified: 2018-10-30 19:08 UTC (History)
1 user (show)



Attachments
Archive with logs from master and slaves (4.99 KB, application/x-rar)
2018-10-02 14:41 UTC, Catalin Bararu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Catalin Bararu 2018-10-02 14:41:31 UTC
Created attachment 36185 [details]
Archive with logs from master and slaves

- Description: JMeter master sometimes ends distributed test even though some of the slaves have not finished

- Environment: 
-- 1 Master: ubuntu 16.04, JMeter version: 4
-- 2 Slaves: ubuntu 16.04, JMeter version: 4
All machines are running: openjdk version "1.8.0_181"
The .jmx file is checking if a variable from user.properties is set to true, and if it is, it then runs some code.


Steps:
1.
./jmeter -n -t /fake-path/prepare-environment.jmx -r -Djava.rmi.server.hostname=MASTERIP

Results:
In some conditions, the master decides that the test has ended even thought one of the slaves has not finished. 
It seems this is happening when one of the slaves finishes before the other slaves starts. 
As seen in jmeter.log the second slave finishes "Finished remote host: 10.17.41.203" and then the first slaves starts "Started remote host:  10.17.41.202". After this the master creates the dashboard while one of the slaves is still running.
If i change the logic of the two slaves and jmeter starts the remote engines in the same order the test fill finish successful, but i can not rely on this.
As a workaround i put both slaves to sleep for a couple of seconds at the start of test so one does not finish before the other starts.

I do not really know how jmeter decides which slave will start first.
Attached jmeter.log for master and both slaves.
Comment 1 Philippe Mouawad 2018-10-08 19:08:29 UTC
Hello,
Can you run your test again with 5.0 and provide the logs and console output of each server and client ?

Also did you check in Test Plan "Run Thread Groups consecutively" ?

Thank you
Comment 2 Catalin Bararu 2018-10-09 07:28:46 UTC
Hello,

For the moment i can not do the test with jmeter 5.0, as my jmeter imfrastructure is at my workplace and i can not change/upgrade it at this time. I will try to do it, but i can not say for sure when.

As for the "Run Thread Groups consecutively", i think this is irrelevant because the .jmx file has only 1 thread group. If you think it is not, i will do the test.

Thanks you.
Catalin B.
Comment 3 Philippe Mouawad 2018-10-27 14:30:46 UTC
Author: pmouawad
Date: Sat Oct 27 14:30:13 2018
New Revision: 1844975

URL: http://svn.apache.org/viewvc?rev=1844975&view=rev
Log:
Bug 62795 - JMeter master sometimes ends distributed test even though some of the slaves have not finished
Bugzilla Id: 62795

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
    jmeter/trunk/xdocs/changes.xml
Comment 4 Philippe Mouawad 2018-10-27 14:31:41 UTC
Hello,
Issue should be fixed in nightly build.
Could you download it after tomorrow, test and confirm issue is fixed for you ?

Thanks
Comment 5 Catalin Bararu 2018-10-29 08:36:26 UTC
Hello,

Can you tell me the location from where i can download your fix ?

Thank you.
Comment 6 Philippe Mouawad 2018-10-29 09:46:09 UTC
(In reply to Catalin Bararu from comment #5)
> Hello,
> 
> Can you tell me the location from where i can download your fix ?
> 
> Thank you.

Here:
https://ci.apache.org/projects/jmeter/nightlies/
Comment 7 Catalin Bararu 2018-10-30 13:48:18 UTC
(In reply to Catalin Bararu from comment #5)
> Hello,
> 
> Can you tell me the location from where i can download your fix ?
> 
> Thank you.

Hi, can you please explain how should I upgrade my env? Can I just copy some files from that build to my env (jmeter 4) or how should I use it ?
Comment 8 Catalin Bararu 2018-10-30 13:55:39 UTC
I tried copying ApacheJMeter.jar to my master (from LATEST (r1845186)) and running the test again. The issues still reproduced, but i think that the way I did this is not correct.
Comment 9 Philippe Mouawad 2018-10-30 19:08:26 UTC
(In reply to Catalin Bararu from comment #8)
> I tried copying ApacheJMeter.jar to my master (from LATEST (r1845186)) and
> running the test again. The issues still reproduced, but i think that the
> way I did this is not correct.

Indeed you don't proceed correctly.

To replace the version, you need to unzip the bundle you download from the link and use it, you need to do it on masters and slaves.

Thanks

Regards