Agents are 'Disconnected'

Hi All,

I have my agents disconnected on two hosts, tried reautorize and reactivate - nothing helps, they stay disconnected forever. In the teamcity-agent.log I can see following entries:

[2014-03-29 20:30:09,838]   INFO - buildServer.AGENT.registration - Registering on server http://192.168.2.208:8111/teamcity, AgentDetails{Name='Default Agent', AgentId=null, BuildId=null, AgentOwnAddress='192.168.2.208', AlternativeAddresses=[192.168.2.208, 192.168.2.222, 192.168.2.223], Port=9090, Version='27616', PluginsVersion='NA', AvailableRunners=[], AvailableVcs=[], AuthorizationToken=''}

[2014-03-29 20:30:10,094]   WARN - buildServer.AGENT.registration - Call http://192.168.2.208:8111/teamcity/RPC2 buildServer.registerAgent3: org.apache.xmlrpc.XmlRpcException: java.lang.RuntimeException: com/mysql/jdbc/TimeUtil

[2014-03-29 20:30:10,094]   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).

[2014-03-29 20:30:13,095]   WARN - buildServer.AGENT.registration - Connection to TeamCity server has been restored

The last entry says it's restored, but nothing really is restored from the TeamCity perspective - still shows the agent 'disconnected' and 'Unathorized' with comment: Agent authorization token does not match the stored one.

How to make it connected?  

3 comments
Comment actions Permalink

You can go to the agent machine, open conf/buildAgent.properties and delete a line with authorizationToken

0
Comment actions Permalink

Thanks Sergey, hovewer my auth toke is actualy empty..

I downloaded the recent Teamcity (8.1.1) and after installing it fails to start I'm geting this error:

java.lang.Exception: java.lang.NoClassDefFoundError: com/mysql/jdbc/TimeUtil

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.runProcess(BackupProcessor.java:204)

 at jetbrains.buildServer.serverSide.maintenance.AbstractMaintenanceProcess.run(AbstractMaintenanceProcess.java:154)

 at jetbrains.buildServer.serverSide.maintenance.MaintenanceProcessManagerImpl$ProcessProxy.run(MaintenanceProcessManagerImpl.java:160)

 at java.lang.Thread.run(Thread.java:744)

caused by: java.lang.NoClassDefFoundError: com/mysql/jdbc/TimeUtil

 at com.mysql.jdbc.ResultSetImpl.fastTimestampCreate(ResultSetImpl.java:1056)

 at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1324)

 at com.mysql.jdbc.ByteArrayRow.getTimestampFast(ByteArrayRow.java:127)

 at com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java:6748)

 at com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:6067)

 at org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:250)

 at org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:250)

 at org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:250)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.processRowExport(BackupProcessor.java:1254)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.processTableRowsExportNormal(BackupProcessor.java:1051)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.processTableRowsExport(BackupProcessor.java:992)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.processTableExport(BackupProcessor.java:962)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.processTablesExport(BackupProcessor.java:930)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.processDatabaseExport(BackupProcessor.java:911)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.perfromBackup(BackupProcessor.java:316)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.access$000(BackupProcessor.java:49)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor$1.run(BackupProcessor.java:239)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor$1.run(BackupProcessor.java:232)

 at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.withDB(TeamCityDatabaseManager.java:776)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.runProcessWithDatabaseAndFiles(BackupProcessor.java:232)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.runProcess(BackupProcessor.java:194)

 at jetbrains.buildServer.serverSide.maintenance.AbstractMaintenanceProcess.run(AbstractMaintenanceProcess.java:154)

 at jetbrains.buildServer.serverSide.maintenance.MaintenanceProcessManagerImpl$ProcessProxy.run(MaintenanceProcessManagerImpl.java:160)

 at java.lang.Thread.run(Thread.java:744)

caused by: java.lang.ClassNotFoundException: Class 'com.mysql.jdbc.TimeUtil' was not found

 at jetbrains.buildServer.plugins.classLoaders.TeamCityClassLoader.doLoadClass(TeamCityClassLoader.java:83)

 at jetbrains.buildServer.plugins.classLoaders.TeamCityClassLoader.loadClass(TeamCityClassLoader.java:40)

 at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

 at com.mysql.jdbc.ResultSetImpl.fastTimestampCreate(ResultSetImpl.java:1056)

 at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1324)

 at com.mysql.jdbc.ByteArrayRow.getTimestampFast(ByteArrayRow.java:127)

 at com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java:6748)

 at com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:6067)

 at org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:250)

 at org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:250)

 at org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:250)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.processRowExport(BackupProcessor.java:1254)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.processTableRowsExportNormal(BackupProcessor.java:1051)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.processTableRowsExport(BackupProcessor.java:992)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.processTableExport(BackupProcessor.java:962)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.processTablesExport(BackupProcessor.java:930)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.processDatabaseExport(BackupProcessor.java:911)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.perfromBackup(BackupProcessor.java:316)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.access$000(BackupProcessor.java:49)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor$1.run(BackupProcessor.java:239)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor$1.run(BackupProcessor.java:232)

 at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.withDB(TeamCityDatabaseManager.java:776)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.runProcessWithDatabaseAndFiles(BackupProcessor.java:232)

 at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.runProcess(BackupProcessor.java:194)

 at jetbrains.buildServer.serverSide.maintenance.AbstractMaintenanceProcess.run(AbstractMaintenanceProcess.java:154)

 at jetbrains.buildServer.serverSide.maintenance.MaintenanceProcessManagerImpl$ProcessProxy.run(MaintenanceProcessManagerImpl.java:160)

 at java.lang.Thread.run(Thread.java:744)

Looks like the same problem with TimeUtil as was reported by build-agent (as a warning), so it is consistent now ut I don't really know what to do with it.

0
Comment actions Permalink

Please check your jdbc driver, specifically check if the driver jar contains com\mysql\jdbc\TimeUtil.class file.

0

Please sign in to leave a comment.