Disconnected Agent and upgrade log errors

I've installed 4.5.5 on a new Windows Server.  The TeamCity Build Agent Service and TeamCity Web Server services are both running and I can access the TeamCity web site fine.  However in the Agents tab my Agent always displays as "disconnected".

When I look at the logs for the buildAgent, I can see some errors which seem to relate to upgrading (refer attached).

How should I go about debugging this to get the Agent to connect?



Attachment(s):
upgrade.log.zip
14 comments
Comment actions Permalink

just to add some more context to this discussion...

I also just noticed that there are no files present in the following folder:

    > C:\TeamCity\buildAgent

I presume that there should (at least) be a bunch of .bat files in there?  How to get them?

0
Comment actions Permalink

Hi!

There may have been a problem during your installation.

You may check/get files directly from the setup archive or start again a new installation.

Regards,

Olivier.

0
Comment actions Permalink

Thanks Olivier for attempting to provide an answer to my question - a question which seems to get asked on this forum quite a bit!

>> There may have been a problem during your installation.

Yep, I guess there may have been - or maybe not... who knows!?  Looking at the random dump of log files in the \TeamCity\logs folder it will certainly be difficult to tell for sure.  There are so many log files in there and so many of them report verbose technical information - some of which contains a variety of warnings and/or errors.

>> You may check/get files directly from the setup archive or start again a new installation.

This is just the sort of answer that I see given all to often to these types of questions on this forum.  Can I please ask where I might find this "setup archive"?

0
Comment actions Permalink

In the upgrade log I see this error on attempt to delete an exe file:
C:\TeamCity\buildAgent\launcher\bin\TeamCityAgentService-windows-x86-32.exe (The process cannot access the file because it is being used by another process)
This clearly indicates that this file is used by some other instance of the agent (most likely you have more than one agent running on the same installation directory).

I would recommend to stop all agent services on your PC, check that there are no java processes running (except server process if TeamCity is installed on the same PC). Then start agent again and wait till it upgrades. If there will be failures in the upgrade.log again, try to reinstall agent.

0
Comment actions Permalink

Pavel, thank you for taking the time to provide input into this question.  For your information I have completely uninstalled both the server and the agent twice now, with the results being the same both times.  I must say that the nature of the install and logging processes of this application are very fragmented and quite "technical".

I shall re-attempt to reinstall from a clean machine and see what occurs.   

0
Comment actions Permalink

Hi Darren,

Sorry not to have been explicit enough.

I've already experienced some problem with missing files after an TeamCity installation, with empty folder.
I solved it getting files (bat and binaries) directly from the TeamCity installation file (opened with 7Zip).

Regards,

Olivier.

0
Comment actions Permalink

Because, I do not actually know how do you install agent and server, I will describe what happens when agent starts. Initially installed agent is just a wrapper, it does not have some necessary components and when it starts it goes to the server for updates. If server does not work, agent will wait. When agent downloads updates it initiates upgrade procedure (if there are no running builds on this agent).

Upgrade procedure among other things requires upgrade of the windows service (if agent is installed as service on Windows). At this point windows service is stopped (and is shown as stopped in the services console), but there is an upgrade process which still works. This is required to change the service and may cause some confusions. Sometimes users see that service is stopped and start it again, this eventually lead to errors similar to those you've seen in the upgrade.log. Can this be your case?

0
Comment actions Permalink

Hrmm... it downloads updates you say?  Maybe that's the issue... that the downloader cannot authenticate with our
proxy to reach out to the web?  How would you set proxy settings for it if this is the case?

0
Comment actions Permalink

As I understand it, the agent does not need to go out to the web to upgrade, only to your TeamCity server (which may be the same machine), so it is unlikely a proxy is the problem.  I am having a similar issue as this (see my thread http://www.jetbrains.net/devnet/message/5248317#5248317 - hopefully someone will have a clear solution ;-)

0
Comment actions Permalink

Updates are downloaded from the TeamCity server, not from the web. If the problem is still unclear even after the agent reinstallation please send agent and server logs to teamcity-feedback[at]jetbrains.com, we will take a look on them.

0
Comment actions Permalink

Thanks Pavel, I just did a complete reinstall and had the same result (Disconnected Agent).  The zipped up logs are headed your way now via email.

0
Comment actions Permalink

Scratch that... the Agent just started up!  Go figure

0
Comment actions Permalink

How much time passed till the agent appeared?

0
Comment actions Permalink

It must have been more than 2 minutes but less than 15 minutes.

0

Please sign in to leave a comment.