Created attachment 599227 [details] Agent Log Description of problem: In a typical condition when agent requires "security-token" to register server (otherwise be rejected by server), current solution "service jon-agent start" does not support any option such as "-Drhq.agent.security-token=<the valid security token>" to start the agent Version-Release number of selected component (if applicable): 3.1.0 How reproducible: occassionally Steps to Reproduce: 1. install the agent and config it. 2. run "service jon-agent start" 3. import the agent in the discovery queue 4. quickly kill the agent and uninventory the platform in the inventory 5. uninstall the agent and delete all installed files 6. install the agent again and config agian 7. run agent Actual results: the agent requires "security-token" to register server (otherwise be rejected by server), since it attempt to re-register without a security token. Expected results: agent can pdate the config file with the correct token or add delete buttons in the server UI, "administration" -> "topology" -> "agent" Additional info: see attachment
So the issue is around step4) "quickly" and "occassionally" are related here.
From the description it appears that Zhengping is trying to use the SysV init script (from the agent RPM) to re-configure/re-register the agent. This is not supported in the SysV script from what I recall from a conversation with Stefan. It seems the correct process here would be to use the rhq-agent.sh script to re-register and agent with a new security token.