TC7 (20939) : upgrade : VCS problem : mercurial : Test Connection Succeeds... but build checks fail (http auth)

Have been using EAP 7 for a couple of months, this is the 2nd upgrade.

Upgraded to build 20939 today and now get errors when builds are trying to check mercurial for changes (VCS problem: FOO           Edit this VCS root>>). If I edit the VCS Root and click Test Connection it succeeds. How do I go about debugging this issue?

Have tried re-saving the vcs root. I deleted and recreated the vcs root on one project and get the same result.

TeamCity hosted on Windows2k8, mercurial repo, using Active Directory credentials for authentication.

  • teamcity service is running as Local System
  • buildagent running as AD account (for builds that deploy to other machines)


The initial install hung up (abort/retry/ignore) when it was unable to remove the service (service marked for deletion). I had to reboot the box to get the install to run to completion.

Have started looking at logs (have not had to do this much before) and the username/password are not being included in the hg commands even though they are defined in the VCS root.

newest errors:

[2012-01-11 17:12:39,578]   WARN [cutor 4 {id=29}] -      jetbrains.buildServer.VCS - Error while loading changes for root mercurial: https://mycompany.com/myproject {instance id=29, parent id=8}, cause: 'cmd /c hg pull https://mycompany.com/MyProject' command failed.
stderr: abort: http authorization required



older errors:

[2012-01-10 16:38:02,791]   INFO [TeamCity Agent ] -      jetbrains.buildServer.VCS - Patch applied for agent=computer {id=1, host=127.0.0.1:9090}, buildType=Project :: MVC3 {id=bt12}, root=mercurial: https://mycompany/myproject {instance id=12, parent id=1}, version=3775:7fc0ae5029e6

[2012-01-11 10:30:36,277]   INFO [_Server_StartUp] -      jetbrains.buildServer.VCS - Server-wide hg path is not set, will use path from the VCS root settings

5 comments
Comment actions Permalink

I now have both the teamcity and buildagent services running under my AD account. I don't remember what account the teamcity service was using before the upgrade (is that logged somewhere?).

If the vcs root is configured with an 'https://' and has user/password why don't I see the credentials in the log message (see above post)?

My user directory contains mercurial.ini / ssl cert (and was working pre-upgrade).

0
Comment actions Permalink

I gave up trying to debug this issue. Uninstalled, deleted all files and re-installed 20939. Same problem!

I did find a workaround... I encoded the user:password into the "pull changes from:" connection string and it works. Ugh.

I even created a new config param (spec password) to paramaterize the connection string as to not expose the AD account password.

Tried searching TeamCity YouTrack... but didn't see this one.

Ugh... very painful to recreate from scratch.

/jhd

0
Comment actions Permalink

Hi John,

could you please check repository cloned by teamcity. Does it contain username and password in its hgrc file, when username and password are set in their fields in VCS root settings and not in the url? You can find all repositories cloned by TeamCity in the .BuildServer/system/caches/mercurial and there is a map file with mapping between repository url and the repository directory. In our setup we have several VCS roots with username and passwords set in their fields and everything works fine.

0
Comment actions Permalink

Thanks reply. This was working for months for me as well but was broke as part of upgrating to build 20939.

The map file is cluttered with seemingly unused entries... I'm debugging this on a single root/build config. I see 9 entries in the map to this repo.

There are 13 directories under ...caches/mercurial: 9 are empty and 4 contain repos. Should be 3 repos (one repo is there twice).

The hgrc files contain a [paths] section with a 'default' entry (https://user:password@server/repo ), and nothing else.

I do not understand how I can start over... with a vcs root... remove it, the map entry, cache/repo... and how this relates to teamcity && buildagent.

/jhd

0
Comment actions Permalink

> The map file is cluttered with seemingly unused entries... I'm debugging this on a single root/build config. I see 9 entries in the map to this repo.

Thanks, I created an issue for that: http://youtrack.jetbrains.net/issue/TW-19984 .

> The hgrc files contain a [paths] section with a 'default' entry (https://user:password@server/repo ), and nothing else.

If TeamCity still cannot clone repository without password in the url, please enable debug-vcs loggin preset and provide teamcity-vcs.log.

0

Please sign in to leave a comment.