Teamcity 4.5 - agent plugin - infinite upgrades

I'm working on my first ever agent side "hello world" extension.  I've noticed that the documentation for Teamcity 4.x has removed the agent side extensions page.

This is my loose guide:

Somehow my agent plugin has triggered and endless cycle of server -> agent upgrades, and I'm not sure what i've done wrong.

I've attached both the source and the actual plugin i'm attempting to install.

The class looks like this:

package com.test;

import jetbrains.buildServer.agent.AgentLifeCycleAdapter;
import jetbrains.buildServer.agent.AgentRunningBuild;

public class AgentExtension extends AgentLifeCycleAdapter {

public void buildStarted(AgentRunningBuild runningBuild) {
     System.out.println("I just got an event");

And my build-agent-plugin.xml is as follows:

<?xml version="1.0" encoding="UTF-8"?>

<beans default-autowire="constructor">
  <bean id="buildAgentHelloWorld" />


I package this into a zip file which contains buildAgentPlugin.jar.

Finally, i copy to this to my teamcity installdir/webapps/ROOT/update/plugins, restart the server and then start the build agent.

The agent then goes into an endless cycle of updating iteslf.    Removing the from the installdir/webapps/ROOT/update/plugins makes the problem go away.

What step am I missing?    Are agent plugins supported in teamcity 4.5?

Ruel Loehr

On my end, I have taken and added it to teamcityinstall/webapps/ROOT/update/plugins


Your zip archive must have a root directory with lib subdirectory containing jar files, see more on this here:
The problem is agent does not handle incorrect zip archive gracefully.


Yeah!  I just found that thread and was preparing a post.     Thanks for the quick response.  I rebuilt my archive in the correct format and it at least deployed with out an error.
Now I'll see if i can actually get it to log a message.


Please sign in to leave a comment.