Teamcity 6.0 server throws AlreadyExists exceptions in log file

My agent is registered with the Teamcity server yet the logs shows AlreadyExists exceptions for the agent.
Why is Teamcity throwing these exception in my logs? Exception shown below. I also think these exception
are causing a performance issue that I did not experience when using TC 5.1.5.



[2010-12-22 13:25:42,123]  DEBUG -    jetbrains.buildServer.AGENT - Agent registration request from: 3.239.8.143, AgentDetails{Name='pms_q02_agent', AgentId=null, BuildId=null, AgentAddress='null', AlternativeAddresses=[3.239.8.143, 3.239.8.144, 3.239.8.147, 3.239.8.145, 2.1.20.5, 10.1.1.2], Port=9090, Version='15772', PluginsVersion='d15ed162', AvailableRunners=[Ant, Duplicator, gradle-runner, Inspection, Ipr, JPS, Maven2, rake-runner, simpleRunner], AvailableVcs=[cvs, perforce, mercurial, jetbrains.git, svn], AuthorizationToken='542bf8de015089f6ed5227a72ba71736'}, address will be added to the list of alternative agent addresses
[2010-12-22 13:25:42,123]  DEBUG - rverSide.impl.XmlRpcBasedAgent - Agent 'pms_q02_agent' possible agent addresses are [3.239.8.143, 3.239.8.144, 3.239.8.147, 3.239.8.145, 2.1.20.5, 10.1.1.2]
[2010-12-22 13:25:42,123]  DEBUG - rverSide.impl.XmlRpcBasedAgent - Test build agent pms_q02_agent address 3.239.8.143:9090
[2010-12-22 13:25:42,129]  DEBUG - rverSide.impl.XmlRpcBasedAgent - Agent pms_q02_agent is pingable by address 3.239.8.143:9090
[2010-12-22 13:25:42,130]   WARN -    jetbrains.buildServer.AGENT - Registration of agent: pms_q02_agent {id=0, host=3.239.8.143:9090}@1b9f19a failed. Agent with the same name pms_q02_agent {id=10, host=3.239.8.148:9091}@1650da4 is already registered since 12/22/10 12:52 PM
[2010-12-22 13:25:42,130]  DEBUG -    jetbrains.buildServer.AGENT - Registration of agent: pms_q02_agent {id=0, host=3.239.8.143:9090}@1b9f19a failed. Agent with the same name pms_q02_agent {id=10, host=3.239.8.148:9091}@1650da4 is already registered since 12/22/10 12:52 PM
AlreadyExists:10 Agent with the same name pms_q02_agent {id=10, host=3.239.8.148:9091}@1650da4 is already registered since 12/22/10 12:52 PM
        at jetbrains.buildServer.serverSide.impl.BuildAgentManagerImpl.checkUniqueAgentName(BuildAgentManagerImpl.java:135)
        at jetbrains.buildServer.serverSide.impl.BuildAgentManagerImpl.registerAgentImpl(BuildAgentManagerImpl.java:101)
        at jetbrains.buildServer.serverSide.impl.BuildAgentManagerImpl.registerAgent(BuildAgentManagerImpl.java:45)
        at jetbrains.buildServer.serverSide.impl.auth.SecuredBuildAgentManager.registerAgent(SecuredBuildAgentManager.java:13)
        at jetbrains.buildServer.serverSide.impl.XmlRpcBasedServer.doRegisterAgent(XmlRpcBasedServer.java:166)
        at jetbrains.buildServer.serverSide.impl.XmlRpcBasedServer.registerAgent3(XmlRpcBasedServer.java:87)
        at sun.reflect.GeneratedMethodAccessor231.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at jetbrains.buildServer.serverSide.impl.ExceptionCollectorWrapper.execute(ExceptionCollectorWrapper.java:55)
        at jetbrains.buildServer.controllers.XmlRpcController$2.execute(XmlRpcController.java:3)
        at org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:84)
        at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:146)

5 comments
Comment actions Permalink

Paul, please attach agent logs too.

0
Comment actions Permalink

It seems that the agent keeps losing connection to the TC server and then it tries to restore connection and this process creates a never ending loop.

This agent was previously 5.1.5 and got upgraded to 6.0.

[2010-12-22 12:57:36,041]   INFO - agent.impl.AgentPortFileWriter - Writing agent runtime file to /oframe/common1/teamcity_agent/q02_agent/logs/buildAgent.port


[2010-12-22 12:57:36,042]   INFO - agent.impl.AgentPortFileWriter - Launcher version is 15772


[2010-12-22 12:57:36,043]   INFO - agent.impl.AgentPortFileWriter - Writing agent runtime file to /oframe/common1/teamcity_agent/q02_agent/logs/buildAgent.port :DONE!


[2010-12-22 12:57:36,046]   INFO -    jetbrains.buildServer.AGENT - Build agent started


[2010-12-22 12:57:36,233]   WARN - buildServer.AGENT.registration - My id is null. Agent with name "pms_q02_agent" is already registered on server. Please check you do not have two agents with same name.


[2010-12-22 12:57:36,234]   WARN - buildServer.AGENT.registration - Connection to TeamCity server is probably lost. Will be trying to restore it. Take a look at logs/teamcity-agent.log for details (unless you're using custom logging).


[2010-12-22 12:57:39,237]   WARN - buildServer.AGENT.registration - Connection to TeamCity server has been restored




Attachment(s):
teamcity-agent.log.zip
0
Comment actions Permalink

Pavel,

         I reinstalled the agent and that resolved the issue.   The only issue I have now is that TC 6 w/ Oracle is not as responsive as

TC 5.1.5 w/ HSQLDB. This seems surprising to me. Do you have any performance tips?  We move TC 6 to a new server box as well

so I will investigate if other processes could be causing the problem.

0
Comment actions Permalink

It would be great if you could take several thread dumps when server was slow and send them to us: http://confluence.jetbrains.net/display/TCD6/Reporting+Issues#ReportingIssues-HangsandThreadDumps

0
Comment actions Permalink

Pavel I deleted the 2 problematicagents and reinstalled them and this resolved the issues.

0

Please sign in to leave a comment.