Bug 23487 - Remote execution from command-line does not work correctly
Summary: Remote execution from command-line does not work correctly
Status: CLOSED REMIND
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 1.9.1
Hardware: Other Linux
: P1 normal with 3 votes (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-29 16:06 UTC by Hilbert Schraal
Modified: 2007-08-20 07:07 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hilbert Schraal 2003-09-29 16:06:46 UTC
When trying this using two remote servers, specified in the jmeter.properties, I
get the following stacktrace:

[schraal@spiff jakarta-jmeter-1.9.1]$ java -jar ./bin/ApacheJMeter.jar -n -r -t
tests/Vanilla\ Servlet.jmx -p bin/jmeter.properties
Created the tree successfully
java.lang.IndexOutOfBoundsException: Index: -1, Size: 6
        at java.util.LinkedList.entry(LinkedList.java:356)
        at java.util.LinkedList.set(LinkedList.java:313)
        at
org.apache.jorphan.collections.ListedHashTree.replace(ListedHashTree.java:171)
        at
org.apache.jmeter.engine.ConvertListeners.addNode(ConvertListeners.java:59)
        at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:893)
        at
org.apache.jmeter.engine.ClientJMeterEngine.run(ClientJMeterEngine.java:148)
        at java.lang.Thread.run(Thread.java:536)


The test does run, but only with one machine.
Did the same test using the nightly from the 9th of september. This gives
basically the same result:

[schraal@spiff jakarta-jmeter-20030909]$ java -jar ./bin/ApacheJMeter.jar -n -r
-t tests/Vanilla\ Servlet.jmx -p bin/jmeter.properties
Created the tree successfully
java.lang.IndexOutOfBoundsException: Index: -1, Size: 6
        at java.util.LinkedList.entry(LinkedList.java:356)
        at java.util.LinkedList.set(LinkedList.java:313)
        at
org.apache.jorphan.collections.ListedHashTree.replace(ListedHashTree.java:170)
        at
org.apache.jmeter.engine.ConvertListeners.addNode(ConvertListeners.java:58)
        at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:1015)
        at
org.apache.jmeter.engine.ClientJMeterEngine.run(ClientJMeterEngine.java:148)
        at java.lang.Thread.run(Thread.java:536)
Comment 1 Dirk Temme 2004-01-19 12:19:06 UTC
In org.apache.jmeter.engine.ClientJMeterEngine.run() I have put an extra try-
catch block:

        try {
            theTree.traverse(sampleListeners);
        }
        catch (java.lang.IndexOutOfBoundsException e) {
            System.out.println("A java.lang.IndexOutOfBoundsException appeared."
                                + "\nApparently the Listener is already 
replaced."
                                + "\nTry to move on...");
        }

That seems to work. The problem was that in the HashTree corresponding to the 
testplan, for remote testing, any ResultCollector has to be replaced bij a 
RemoteListenerWrapper. This replacement was done bij all instances of 
ClientJMeterEngine (one per remote testPC). Only the first of these instances 
succeeded in doing this. The idea behind above workaround is that once the 
replacement is done, all is OK, and the other ClientJMeterEngine's don't have 
to bother.

This workaround is not THE solution, it seems to me. The code for replacing the 
ResultCollector should be somewhere else probably.
Comment 2 Jordi Salvat i Alabart 2004-01-23 01:39:47 UTC
Setting priority to high, since it carries patch code.
Comment 3 Sebb 2004-02-09 00:49:23 UTC
Updated code to add the suggested patch (but changed the println to log.warn)

Left TODO message in code to show it needs to be revisited; setting resolution 
accordingly.
Comment 4 Sebb 2007-08-20 05:39:44 UTC
See also bug 39792
Comment 5 Sebb 2007-08-20 07:07:52 UTC
Additional testing shows this is now fixed
Comment 6 The ASF infrastructure team 2022-09-24 20:37:31 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1229