Using build agent from a WAR distribution

Hi,

I just upgraded from 3.1.2 to 4.0.1. I've just downloaded the WAR distribution as I'm running TeamCity in a existing Tomcat.
As with previous version, I'm a little bit troubled when it comes to the buildagent.
I'd like just to run a buildagent along with the TeamCity server itself. I can't find the agent bin in the WAR distrib but only in the regular distrib only.

Is there a way to get an agent strating with the server or does it has to be a separate launch? Does the agent binaries exist in the WAR distrib?

cheers
-nodje

5 comments
Comment actions Permalink

I've downloaded the buildAgent from the server itself (- not so easy on a remotely administered Linux server).

I've setup buildAgent.properties: actually just changed the port to the one I use.

Now I can start it, but it wouldn't be recognized by the server.

logs says:

[2008-12-30 11:14:38,487]   WARN - buildServer.AGENT.registration - Call http://localhost:8090/RPC2 buildServer.registerAgent2: org.apache.xmlrpc.XmlRpcClientException: Server returned incorrect status code: 404 /RPC2
[2008-12-30 11:14:38,487]   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).



 


thanks in advance

0
Comment actions Permalink

HI,

I'm still not able to start a buildAgent with the new 4.0.1 distrib.

Here's the complete buildAgent log:

[2009-01-06 08:51:35,537]   INFO -    jetbrains.buildServer.AGENT - Calculating plugins signature for possible upgrade
[2009-01-06 08:51:36,790]   INFO -    jetbrains.buildServer.AGENT - Build Agent version: 8171, plugins signature: 90598086
[2009-01-06 08:51:36,791]   WARN -    jetbrains.buildServer.AGENT - Calculating CPU benchmark index...
[2009-01-06 08:51:44,430]   WARN -    jetbrains.buildServer.AGENT - CPU benchmark index is set to 411
[2009-01-06 08:51:44,509]   INFO - erver.agent.ant.AntBuildRunner - Ant Runner Extensions: jetbrains.buildServer.agent.ant.CompilerAntExtension,jetbrains.buildServer.agent.ant.EchoAntExtension,jetbrains.buildServer.agent.ant.JUnitFirstTestsToRunExtension,jetbrains.buildServer.testng.TestNGTaskExtension,jetbrains.buildServer.testng.TestNGFirstTestsToRunExtension,jetbrains.buildServer.coverage.AntCoverageAdapter,
[2009-01-06 08:51:44,803]   INFO - ies.BackgroundDirectoryCleaner - Move directory /opt/local/TeamCity/buildAgent/temp/cache to /opt/local/TeamCity/buildAgent/temp/.old/cache_0 for cleaning
[2009-01-06 08:51:44,820]   INFO -    jetbrains.buildServer.AGENT - Start build agent
[2009-01-06 08:51:44,828]   WARN -    jetbrains.buildServer.AGENT - Starting agent Web server on port 9090
[2009-01-06 08:51:44,837]   INFO -    jetbrains.buildServer.AGENT - Agent Web server started
[2009-01-06 08:51:44,843]   INFO - agent.impl.AgentPortFileWriter - Writing agent runtime file to /opt/local/TeamCity/buildAgent/logs/buildAgent.port
[2009-01-06 08:51:44,843]   INFO - agent.impl.AgentPortFileWriter - Launcher version is 8171
[2009-01-06 08:51:44,844]   INFO - agent.impl.AgentPortFileWriter - Writing agent runtime file to /opt/local/TeamCity/buildAgent/logs/buildAgent.port :DONE!
[2009-01-06 08:51:44,846]   INFO -    jetbrains.buildServer.AGENT - Build agent started
[2009-01-06 08:51:44,874]   INFO - er.agent.DotNetBuildRunnerBase - MSBuild runner can works only under Windows
[2009-01-06 08:51:44,874]   INFO - er.agent.DotNetBuildRunnerBase - NAnt runner can works only under Windows
[2009-01-06 08:51:44,874]   INFO - er.agent.DotNetBuildRunnerBase - rcodedup runner can works only under Windows
[2009-01-06 08:51:44,874]   INFO - er.agent.DotNetBuildRunnerBase - sln2003 runner can works only under Windows
[2009-01-06 08:51:44,874]   INFO - er.agent.DotNetBuildRunnerBase - sln2005 runner can works only under Windows
[2009-01-06 08:51:44,874]   INFO - er.agent.DotNetBuildRunnerBase - sln2008 runner can works only under Windows
[2009-01-06 08:51:44,875]   INFO - buildServer.AGENT.registration - Registering on server: [name: Default agent, ownAddress: 192.168.1.8, ownPort: 9090, buildId: <not running build>, availableRunners: [Ant, Duplicator, Inspection, Ipr, Maven2, rake-runner, simpleRunner]]
[2009-01-06 08:51:44,993]   WARN - buildServer.AGENT.registration - Call http://localhost:8111/RPC2 buildServer.registerAgent2: java.net.ConnectException: Connection refused
[2009-01-06 08:51:44,993]   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).
[2009-01-06 08:51:47,995]   INFO - er.agent.DotNetBuildRunnerBase - MSBuild runner can works only under Windows
[2009-01-06 08:51:47,995]   INFO - er.agent.DotNetBuildRunnerBase - NAnt runner can works only under Windows
[2009-01-06 08:51:47,995]   INFO - er.agent.DotNetBuildRunnerBase - rcodedup runner can works only under Windows
[2009-01-06 08:51:47,995]   INFO - er.agent.DotNetBuildRunnerBase - sln2003 runner can works only under Windows
[2009-01-06 08:51:47,995]   INFO - er.agent.DotNetBuildRunnerBase - sln2005 runner can works only under Windows
[2009-01-06 08:51:47,996]   INFO - er.agent.DotNetBuildRunnerBase - sln2008 runner can works only under Windows
[2009-01-06 08:51:49,803]   INFO - t.impl.directories.FileRemover - Deleting files from /opt/local/TeamCity/buildAgent/temp/.old...



 


then the 'xx runner can works only under Windows' logs forever.

thanks in advance for any help.
-nodje

0
Comment actions Permalink

Do the agent and server installed on the same PC? If not then this address used by agent is incorrect: http://localhost:8111/RPC2
You can change server address in the buildAgent.properties file.

BTW you could choose to install agent via Java web start by launching browser on the agent PC and pointing it to the agents tab. In this case the server address would be discovered automatically.

--
Pavel Sher

0
Comment actions Permalink

The client is running on the Ubuntu box of the server, so http://localhost:8111/RPC2 should be valid.

I can't really open a browser on this server since I administer it with a remote ssh connection.

I've tried javaws http://localhost/TeamCity/update/buildAgent.jnlp but this needs a graphical environment as well.

All in all I don't see what has changed. It used to work fine with the previous 3.1.2 but not anymore.

Is the port 8111 the default, can it be changed?

the Java Web Start agent works fine on a different Windows machine, but I need to get the client running on the same machine as the one of the server.

To be able to get my project running under windows, I have to use the Maven included with TeamCity, which I don't know how to control really.
How can I specify memory configuration for Maven in a global way? (other than in each project's JVM command line parameters).
Env variable MAVEN_OPTS doesn't seem to be taken into account.


thanks

0
Comment actions Permalink

What URL do you use to connect to your TeamCity server from a browser? Does the server is listening on 8111 port? Agent got connection refused error, this may indicate that there is no server running at the address localhost:8111.

0

Please sign in to leave a comment.