+++ This bug was initially created as a clone of Bug #963982 +++ Install everything. Give a bogus public endpoint to the server. Register a new agent (make sure the default setting of rhq.agent.test-failover-list-at-startup remains "true" - since this is the default, nothing to do here, just wanted to point that out). See that the server registered the agent successfully, assigned it a token and sent it to the agent. The agent, however, fails the server endpoint ping test and retries. However, by now, the token has been assigned, but the agent didn't persist it yet. So the retry fails. I haven't tested this, but this is the behavior reported to me and the code I see seems to tell me this is what will happen. We should persist the token as soon as we get it. --- Additional comment from John Mazzitelli on 2013-05-16 19:43:07 EDT --- I think the code to fix is in here: org.rhq.enterprise.agent.AgentMain.registerWithServer(long, boolean)
This may explain apparent token loss issues from customers which we've never been able to reproduce or explain. We need to make sure we document all the test case scenarios that need to be tested in this area, not just the ones which exercise this particular failure scenario.
see bug #963982 for test procedures to know if this is fixed.
git commit to master: edaffb8
Created attachment 800569 [details] agent_log.png
verified in jon 3.2 er1 by steps described in bug #963982