TC 7.1.5 - agent can't connect to server, NoClassDefFoundError: org/apache/xerces/xni/parser/XMLParserConfiguration


I'm trying to setup TC 7.1.5 on Linux machine. I have server up and running, I can create projects and build configurations. But I don't have agent connected to my server. Agent is installed on the same machine as server.

Build agent log:

[2013-04-23 22:46:50,617]   INFO -    jetbrains.buildServer.AGENT - Build agent started
[2013-04-23 22:46:50,630]   INFO - buildServer.AGENT.registration - Registering on server http://localhost:8111, AgentDetails{Name='Default Agent', AgentId=null, BuildId=null, AgentOwnAddress='', AlternativeAddresses=[], Port=9090, Version='24400', PluginsVersion='NA', AvailableRunners=[], AvailableVcs=[], AuthorizationToken='7e18b2e9487d74bcd7e727dfed2ae017'}
[2013-04-23 22:46:50,759]   INFO - ctories.CleanupRegistryCleaner - Removing files from .old to meet free space requirements.
[2013-04-23 22:46:50,916]   WARN - buildServer.AGENT.registration - Call http://localhost:8111/RPC2 buildServer.registerAgent3: java.lang.NoClassDefFoundError: org/apache/xerces/xni/parser/XMLParserConfiguration
[2013-04-23 22:46:50,920]   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).


[2013-04-23 22:54:18,100]   WARN -   jetbrains.buildServer.XMLRPC - Exception while calling XML-RPC handler: jetbrains.buildServer.serverSide.impl.XmlRpcBasedServer.registerAgent3([<?xml version="1.0" encoding="UTF-8"?>
<agentDetails agentName="Default Agent" agentAddress="" agentPort="9090" authToken="7e18b2e9487d74bcd7e727dfed2ae017" osName="Linux, version 3.8.8-1-ARCH">
  <availableRunners />
  <availableVcs />
    <param name="env.HOME" value="/var/lib/teamcity" />
    <param name="env.JAVA_HOME" value="/usr/lib/jvm/java-7-openjdk/jre" />
    <param name="env.JRE_HOME" value="/usr/lib/jvm/java-7-openjdk/jre" />
    <param name="env.LANG" value="C" />
    <param name="env.LD_LIBRARY_PATH" value=":." />
    <param name="env.LOGNAME" value="teamcity" />
    <param name="env.NLSPATH" value="/usr/dt/lib/nls/msg/%L/" />
    <param name="env.OLDPWD" value="/" />
    <param name="env.PATH" value="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" />
    <param name="env.PWD" value="/opt/teamcity/buildAgent/bin" />
    <param name="env.SHLVL" value="1" />
    <param name="env.TEAMCITY_DATA_PATH" value="/teamcity/buildAgent" />
    <param name="env.USER" value="teamcity" />
    <param name="env.XFILESEARCHPATH" value="/usr/dt/app-defaults/%L/Dt" />
    <param name="env._" value="/usr/bin/nohup" />
    <param name="system.agent.home.dir" value="/opt/teamcity/buildAgent" />
    <param name="" value="Default Agent" />
    <param name="" value="/opt/teamcity/buildAgent/work" />
    <param name="system.file.encoding" value="ANSI_X3.4-1968" />
    <param name="system.file.separator" value="/" />
    <param name="system.os.arch" value="amd64" />
    <param name="" value="Linux" />
    <param name="system.os.version" value="3.8.8-1-ARCH" />
    <param name="system.path.separator" value=":" />
    <param name="system.teamcity.agent.cpuBenchmark" value="424" />
    <param name="" value="/opt/teamcity/buildAgent/temp/buildTmp" />
    <param name="" value="US" />
    <param name="system.user.home" value="/var/lib/teamcity" />
    <param name="system.user.language" value="en" />
    <param name="" value="teamcity" />
    <param name="system.user.timezone" value="Europe/Warsaw" />
    <param name="teamcity.agent.home.dir" value="/opt/teamcity/buildAgent" />
    <param name="teamcity.agent.jvm.specification" value="1.7" />
    <param name="teamcity.agent.jvm.version" value="1.7.0_21" />
    <param name="teamcity.agent.launcher.version" value="24400" />
    <param name="" value="Default Agent" />
    <param name="teamcity.agent.ownPort" value="9090" />
    <param name="" value="/opt/teamcity/buildAgent/tools" />
    <param name="" value="/opt/teamcity/buildAgent/work" />
    <param name="teamcity.serverUrl" value="http://localhost:8111" />
  <version agent="24400" plugins="NA" />

]), error: jetbrains.buildServer.CannotPingAgentException: Unable to ping agent Default Agent. Check firewall and/or try to specify 'ownAddress' in the agent configuration. Details: Agent 'Default Agent' cannot be accessed by any of the addresses: [], (port 9090) (enable debug to see whole stacktrace)

Any help will be appreciated.

1 comment
Comment actions Permalink


Please ensure your agent install is not corrupted. (e.g. redowload/reinstall).
Is there a full stacktrace int he teamcity-agent.log ? if not can you please enable agent debug logging and include the resultant log file?

What JDK do you use to ru Agent? Can youy try the latest 1.6 Oracle JDK?


Please sign in to leave a comment.