Disconnected Agent

I am brand new to TeamCity. I'm trying to get it setup on our build server.

I downloaded and installed TC and I'm trying to setup an agent running under a different account than SYSTEM but I'm running into trouble.

I have a local user 'svnprojects' which we area already using with CruiseControl.NET.

This user has the 'log on as a service' priveledge and I also granted him (I think) rights to Start/Stop the TeamCity Build Agent Service.

However, in TC under Agents this agent is listed under Disconnected agents with the Status of "Disconnected (Agent has unregistered (will upgrade)), last communication date 04 Oct 10 16:20"

this is the only agent.

I don't know where to go from here.

[EDIT: 7 Oct 2010 11:51AM]

This is running on Windows 2008.

2 comments

I found the Builder log folder C:\BuildAgent\logs

and in the upgrade.log file there is the folowing:

Not sure what this means.

[2010-10-04 16:20:25,347]   INFO - r.agent.upgrade.UpgradeRunBase - =====================================================
[2010-10-04 16:20:25,470]   INFO - r.agent.upgrade.UpgradeRunBase - Start agent upgrade.
[2010-10-04 16:20:25,470]   INFO - r.agent.upgrade.UpgradeRunBase - Agent home folder: C:\BuildAgent
[2010-10-04 16:20:25,497]   INFO - r.agent.upgrade.UpgradeRunBase - Run command line (arguments separated with '|'): cmd.exe|/c|C:\BuildAgent\bin\service.stop.bat| (at C:\BuildAgent\bin)
[2010-10-04 16:20:26,444]   INFO - .agent.run.ProcessOutputLogger -  
[2010-10-04 16:20:26,444]   INFO - .agent.run.ProcessOutputLogger - C:\BuildAgent\bin>..\launcher\bin\TeamCityAgentService-windows-x86-32.exe -p ../conf/wrapper.conf  
[2010-10-04 16:20:26,452]   INFO - .agent.run.ProcessOutputLogger - wrapper  | OpenSCManager failed - Access is denied. (0x5)
[2010-10-04 16:20:26,455]  ERROR - r.agent.upgrade.UpgradeRunBase - Upgrade failed...
java.io.IOException: Failed to start process. Return code was 1 not equal to zero.
at jetbrains.buildServer.agent.upgrade.UpgradeRunBase.runCmdLine(UpgradeRunBase.java:96)
at jetbrains.buildServer.agent.upgrade.NTServiceUpgrade.exec(NTServiceUpgrade.java:38)
at jetbrains.buildServer.agent.upgrade.NTServiceUpgrade.beforeUpgrade(NTServiceUpgrade.java:23)
at jetbrains.buildServer.agent.upgrade.UpgradeRunBase.run(UpgradeRunBase.java:33)
at jetbrains.buildServer.agent.upgrade.UpgradeMode$2.run(UpgradeMode.java:26)
at jetbrains.buildServer.agent.upgrade.Upgrade2.main2(Upgrade2.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at jetbrains.buildServer.agent.ClazzLoader.call(ClazzLoader.java:59)
at jetbrains.buildServer.agent.ClazzLoader.callMain2(ClazzLoader.java:19)
at jetbrains.buildServer.agent.upgrade.Upgrade.main(Upgrade.java:16)
[2010-10-04 16:20:33,786]   INFO - r.agent.upgrade.UpgradeRunBase - Run command line (arguments separated with '|'): cmd.exe|/c|C:\BuildAgent\bin\service.start.bat| (at C:\BuildAgent\bin)
[2010-10-04 16:20:33,793]   INFO - .agent.run.ProcessOutputLogger -  
[2010-10-04 16:20:33,793]   INFO - .agent.run.ProcessOutputLogger - C:\BuildAgent\bin>..\launcher\bin\TeamCityAgentService-windows-x86-32.exe -t ../conf/wrapper.conf  
[2010-10-04 16:20:33,799]   INFO - .agent.run.ProcessOutputLogger - wrapper  | OpenSCManager failed - Access is denied. (0x5)
[2010-10-04 16:20:33,800]  ERROR - r.agent.upgrade.UpgradeRunBase - Failed to start agent after upgrade: java.io.IOException: Failed to start process. Return code was 1 not equal to zero.
java.io.IOException: Failed to start process. Return code was 1 not equal to zero.
at jetbrains.buildServer.agent.upgrade.UpgradeRunBase.runCmdLine(UpgradeRunBase.java:96)
at jetbrains.buildServer.agent.upgrade.NTServiceUpgrade.exec(NTServiceUpgrade.java:38)
at jetbrains.buildServer.agent.upgrade.NTServiceUpgrade.startAgain(NTServiceUpgrade.java:28)
at jetbrains.buildServer.agent.upgrade.UpgradeRunBase.run(UpgradeRunBase.java:46)
at jetbrains.buildServer.agent.upgrade.UpgradeMode$2.run(UpgradeMode.java:26)
at jetbrains.buildServer.agent.upgrade.Upgrade2.main2(Upgrade2.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at jetbrains.buildServer.agent.ClazzLoader.call(ClazzLoader.java:59)
at jetbrains.buildServer.agent.ClazzLoader.callMain2(ClazzLoader.java:19)
at jetbrains.buildServer.agent.upgrade.Upgrade.main(Upgrade.java:16)

0

Build agent windows service should have enough rights to upgrade itself. This requires all rights for all files under build agent home directory and rights to start/stop build agent service. Please give this user account more rights and try again.

0

Please sign in to leave a comment.