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)
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.
Setting priority to high, since it carries patch code.
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.
See also bug 39792
Additional testing shows this is now fixed
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1229