apache / jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
https://jmeter.apache.org/
Apache License 2.0
8.3k stars 2.09k forks source link

DistributedRunner %JME% .isActive always returns true even when agents have stopped #4977

Closed asfimport closed 5 years ago

asfimport commented 5 years ago

Steven (Bug 63087): the API states.

boolean isActive() Returns: boolean Flag to show whether engine is active (true when test is running). Set to false at end of test

however,

when executing distributed runner and calling this function on the iteration of JMeterAgent , after the agent has ended the test, the value is still true. my interpretation is that at this point the isActive should return false as all agents/engines are finished. Severe negative impact on distributed testing as it is impossible to now if the agent/engine is available to accept a test.

Severity: normal OS: All Resolution: LATER

asfimport commented 5 years ago

@pmouawad (migrated from Bugzilla): Hello, Could you provide a reproducer of what you are doing.

There is no known bug on this feature which is part of our Automated testing.

I guess your are using the API within your program right ?

Thanks

asfimport commented 5 years ago

Steven (migrated from Bugzilla): Hi,

Im not sure how to provide the reproducer as this is within our OpenShift cluster. I can however provide you with any form of logs or debugs as you prescribe.

This is a killer for us so please do advise if there is absolutely anything within my scope to give you. I can perhaps prepare some screenshots displaying the issue with clocks for you to verify the issue? Please do let me know.

Regards, Steven

asfimport commented 5 years ago

@pmouawad (migrated from Bugzilla):

1/ A first step is to put JMeter in debug, add this to log4j2.xml:

<Logger name="org.apache.jmeter.engine" level="debug" />

on both client and server

2/ Then provide:

Also , how do you know issue is due to isActive() ? Are you using JMX or Java generated JMX or any other approach ?

3/ Try using nightly build , there is a fix on Distributed Testing https://ci.apache.org/projects/jmeter/nightlies/

Thank you

asfimport commented 5 years ago

Steven (migrated from Bugzilla): Hi,

I will apply the logging changes and provide them soonest.

To answer the relation to inActive() question...

I have created a service which iterates a hash table of known agents/clients executing tests. In this hash table I can pull out per key, and get access to he DistributedRunner(DR) in order to see which agents are still executing.

When I call the isActive() on the engines provided by the DR(which is debugged and listed as correct) calling the isActive() function returns true, even though my view on the agent states the test has finished executing(As per the stdout). I suspected this may be timing but after waiting over an hour to eliminate this possibility the isActive still returns true. If this is not the isActive function, as your query suggests, please advise what could be wrong? I am using vanilla API so not sure where the fault could be.

Infrastructure - This is being executed in a OpenShift environment. I have the controller wrapped in a springboot application. When a call is made to my endpoint I fire off a new thread which instantiates my DR and fires off the tests on the relevant addresses(trying to be which aren't busy). This all works perfectly, apart from the isActive issues I'm currently seeing.

JMX - We script locally in order to get functioning tests. After which we upload to the server via different services and then start the DR programmatically. So we pass the JMX file into the service/server/ I then manually change the JMX to reflect correct paths for CSV datasets and sampler result location and then launch the test.

JMeter properties/User.properties. These are all vanilla apart from the ssl rmi set to disabled. This is within a secured cluster so Ssl isn't required for these agents.

Regards, Steven

(In reply to Philippe Mouawad from comment 3)

1/ A first step is to put JMeter in debug, add this to log4j2.xml:

<Logger name="org.apache.jmeter.engine" level="debug" />

on both client and server

2/ Then provide:

  • jmeter.log for all
  • jmeter.properties and user.properties for all servers
  • detail how you are proceeding
  • provide information on your infrastructure

Also , how do you know issue is due to isActive() ? Are you using JMX or Java generated JMX or any other approach ?

3/ Try using nightly build , there is a fix on Distributed Testing https://ci.apache.org/projects/jmeter/nightlies/

Thank you

asfimport commented 5 years ago

Steven (migrated from Bugzilla): Information provided.

asfimport commented 5 years ago

Steven (migrated from Bugzilla): Sorry for the duplicates, first time using bugzilla.

Information provided.

asfimport commented 5 years ago

@pmouawad (migrated from Bugzilla): (In reply to Steven from comment 6)

Sorry for the duplicates, first time using bugzilla.

Information provided.

Any feedback ? Thanks

asfimport commented 5 years ago

Steven (migrated from Bugzilla): Happy to close this as we have found a way around the issue. No fix required.