Missing VCS Plugin on Agent

Hi everyone,
    Recently, Team City's internal database got corrupted, so I made a backup and reinstalled Team City (I've done this before). However, this time I decided to try version 6.0. So I tried to install that, but later on I realized that a restore is only possible between equal versions of Team City (by the way, this is a big problem, how am I gonna migrate my projects? ).
    Anyway, the thing is that I decided to install 5.1.5 again. I did it and made a restore using the mantainDB script. It prompted me to clear the config and system directories, which I did after backing them up. Then, the restore succeeded and I got the server back up. But all build configurations got Failure; in a closer look, the Build Agent was up and running, but If I looked at its Compatible Configurations, I saw that all my build configurations were deemed Incompatible, with a message which said:

    "Missing VCS plugins on Agent"

   Here's a screenshot:

tito.PNG
Never faced this before, what can I do? I don't want to lose my configuration...

11 comments

Darío,

Seems like agent was not upgated correctly.

Please stop the agent, delete it's "plugins" directory and start it again.

We have an issue filed on this.

0

Hi Yegor,
   I'm still having the same problem. When you tell me to stop the Agent, what do you mean exactly? Because I can Disable and Unathourize it. I tried disabling it, removing the whole folder (not only its contents) and enabling it again, all this from the Web GUI. Nothing happened. By the way, I saw a "Reboot Agent Machine" command, but when I tried to run it, I got this error, dunno if it's related to this issue:

RPC Handler Object "remote-api" not found and no default handler registered

   I'm gonna try making a clean install in some other machine and copying its plugin folder contents. I'll keep you posted.

0

Darío,

By stopping I meant stopping agent process on the machine where it is running.

If the issue persists, please attach agent all logs covering the moment of agent start and connection to the server.

0

I tried killing the process called "TeamCityAgentService-windows-x86-32.exe", deleting the whole "plugins" folder and rebooting Windows. By the way, my OS is Windows 7. Still the same, I go to the Agent's compatible configurations and it still looks like the screenshot. The plugins folder was created again, but it's empty.

1) Did I do what you wanted me to do?
2) Can I restart the Agent without rebooting my OS? How?

0

Darío,

> 1) Did I do what you wanted me to do?

If killing the process also killed the two agent's java.exe then yes, this is aproximately what I havd in mind.

2) Can I restart the Agent without rebooting my OS? How?

If you run the agent as a service - from the Services app.


What about the agent logs?

0

Hi Yegor,
   Sorry for the delay, something urgent came up at work and I had to postpone solving the Team City issue. As I understood, build agents log stuff unconditionally, unlike the other Team City processes/services. So I only fired up the build agent today, went to <agent home>/logs, zipped that folder and attached it to this post.
   Once again, sorry for the delay.

Best regards,
Darío



Attachment(s):
BuildAgentLogs.zip
0

Darío,

From the log I see that agent upgrade process was probably killed while unpacking the agent plugins and so part of agent plugins is missing.

Also, I do not see any traces of starting agent with "plugins" directory removed: agent was restarted several times, but all the time "C:\BuildAgent\plugins" directory had content.

0

You're right, it wasn't empty. So this time I:

1) Deleted the log files in $(AGENTHOME)/logs
2) Stopped the Agent service
3) Deleted all files inside $(AGENTHOME)/plugins
4) Started the Agent service

When I started the service, it showed up as Running (in Windows' Task Manager) for a few seconds and then it stoppped by itself. So it appears as disconnected in the Web UI, and it says "Agent has unregistered (will upgrade) " under "Inactivity Reason". I attached the new logs.



Attachment(s):
BuildAgentLogs.zip
0

http://devnet.jetbrains.net/people/dario_ramosDarío,

What you describe ("it showed up as Running (in Windows' Task Manager) for a few seconds and then it stoppped by itself.") looks like normal agent functioning during upgrade.
Agent should reconnect after a minute or several (depending on the disk performance). Please do not stop/start any agent-related processed during that time.
If this does not happen, it probably makes sence to see the logs (upgrade.log and teamcoty-agent.log) for any erorrs.

In your logs I see:
[2010-12-02 12:42:31,918]   WARN - buildServer.agent.LauncherUtil - java.io.IOException: Failed to copy C:\BuildAgent\update\lib\agent-api.jar to C:\BuildAgent\lib\agent-api.jar. Access is denied

Seems like there is another process that is using the files (you can use Proces Explorer to figure that out) or there is a permission issue.

0

Hi Yegor,
   I finally got it working just now. The only process I suspected of accessing Team City stuff was the JetBrains Team City Tray Notifier, which was set to run on startup. I noticed that whenever I rebooted Windows, the Tray Notifer _always_ tried to connect to Team City before the server was up, and the connection attempt failed. So I:

1) Unchecked the Tray Notifier's "Run on Startup" option
2) Rebooted
3) Uninstalled the Agent
4) Installed the Agent (using the MS Windows Installer), as a service and under SYSTEM account as usual
5) Waited...
6) Tadaaa! The agent connected and started working correctly

   I'm not sure if the fix was turning off the tray notifier, reinstalling or both. Just in case, I'll attach the logs.



Attachment(s):
BuildAgentLogs.zip
0

Darío,

Tray notifier is probably not related, so it was reinstall which helped. I'm glad it works now.

0

Please sign in to leave a comment.