0

I am trying to setup an environment consisting of 10 agents, 1 process per agent, 10 threads per process.

The issue comes when I open 10 terminals/prompts and click on "start worker processes" in grinder after starting all the 10 agents. All the agents except for one or two, automatically exit stating this exception. I understand it is because all of them start simultaneously, but is there something I can do to make it work..?

Here is the exception

2013-10-31 14:36:41,469 INFO  agent: communication shut down
2013-10-31 14:36:41,475 ERROR agent: Could not create file store directory
net.grinder.engine.agent.FileStore$FileStoreException: Could not create file store directory
        at net.grinder.engine.agent.FileStore.getDirectory(FileStore.java:111) ~[grinder-core-3.11.jar:na]
        at net.grinder.engine.agent.AgentImplementation.run(AgentImplementation.java:188) ~[grinder-core-3.11.jar:na]
        at net.grinder.Grinder.run(Grinder.java:124) ~[grinder-core-3.11.jar:na]
        at net.grinder.Grinder.main(Grinder.java:67) ~[grinder-core-3.11.jar:na]
Caused by: net.grinder.util.Directory$DirectoryException: Could not delete 'C:\Users\reddys.ADS\.\HYDCNU304BWC0-file-store\current\a360utility$py.clas
s'
        at net.grinder.util.Directory.deleteContents(Directory.java:257) ~[grinder-core-3.11.jar:na]
        at net.grinder.util.Directory.copyTo(Directory.java:473) ~[grinder-core-3.11.jar:na]
        at net.grinder.engine.agent.FileStore.getDirectory(FileStore.java:101) ~[grinder-core-3.11.jar:na]
        ... 3 common frames omitted
kirti
  • 40
  • 5
  • It sounds like you are using the console UI to start your agents? Can you launch each agent manually from the command line if the console is disabled in grinder.properties (or if the console is simply not running)? – Travis Bear Nov 01 '13 at 15:52
  • No Travis, I am starting each agent from command line. java net.grinder.Grinder. – kirti Nov 02 '13 at 17:00
  • However, I found that starting each agent separately, works. For example, I start agent1, run it. Once agent1 starts, start agent2 and so on. So that the concurrency problem is not present. However, you can understand my agony when I update parts of the code and try to test it on multiple agents at once.. :( – kirti Nov 02 '13 at 17:03

1 Answers1

0

Try following settings in grinder.properties:

grinder.processes = 10
grinder.threads = 10

And the just start one agent using startAgent.cmd or .sh script.

Karlo Smid
  • 525
  • 1
  • 5
  • 13