ATS : Restarting ATS Agent during RUN execution

During RUN execution, sometimes a restart of the agent is required.

If that particular agent was not previously configured ( you did not see any log message like "Pushing configuration to ATS Agent at  '<Address of the agent you need to restart>' " ), then you are lucky.

But if you do see it, then even after the agent is restarted successfully, ATS will continue to "think" that this agent is already able/configured to log to the ATS Log database, which is not the case anymore.


So after you restart the agent, you need to invalidate its state, mark is as not configured.

Here is a simple scenario:


Restarting ATS Agent during RUN execution
...
// execute something on ATS Agent, like getting the RAM size of the machine, where it is deployed
ProcessExecutor pe = new ProcessExecutor(ATS_AGENT, GET_RAM_SIZE_SCRIPT);
pe.execute();
long ramSize = getRamSize(pe.getStandartOutput());
// do someting with the ramSize and restart the agent if needed
...
// now tell ATS that this agent needs to be configured again
com.axway.ats.agent.webapp.client.AgentConfigurationClient acc = new AgentConfigurationClient(ATS_AGENT);
acc.invalidateAtsDbLogConfiguration();
// continue happily using the agent
...





Back to parent page

Go to Table of Contents