Failed to perform checkout on agent using Mercurial due to no match found error

Hi,

Teamcity is failing to checkout on agent machines. It works fine for the local machine checkout but failed when done from teamcity. Also If i try to use checkout directory mode to Automatically on server it works fine on server. Just failing on agent machines. I checked all permissions for user and they are correct. Also tried doing a clean checkout.
Following is the error message:-

[17:29:36]Skip checking for changes - changes are already collected
[17:29:37]Publishing internal artifacts
[17:29:37]Clearing temporary directory: Z:\BuildAgent\temp\buildTmp
[17:29:37]Checkout directory: Z:\hgbuilds\Business
[17:29:37]Updating sources: agent side checkout (14m:20s)
[17:29:37][Updating sources] Will perform clean checkout. Reason: Agent doesn't have any version of the project sources
[17:29:37][Updating sources] Cleaning Z:\hgbuilds\Business
[17:31:28][Updating sources] VCS Root: Test_New (12m:29s)
[17:31:28][VCS Root: NextGen_New] revision: 325c2edbaa4e
[17:31:28][VCS Root: NextGen_New] Update repository Z:\hgbuilds\Business
[17:31:28][VCS Root: NextGen_New] Start cloning from https://hg.test.co.uk/test
[17:39:59][VCS Root: NextGen_New] Repository successfully cloned
[17:40:01][VCS Root: NextGen_New] Process subrepos of https://hg.test.co.uk/test
[17:40:01][VCS Root: NextGen_New] Process subrepoConfig at path UI/UI.ITour/UI.ITour.Web/Shared (url: https://hg.test.co.uk/shared/)
[17:40:01][VCS Root: NextGen_New] Updating working dir Z:\hgbuilds\Business to revision 325c2edbaa4e
[17:43:58][Updating sources] Failed to perform checkout on agent: '"c:\program files\mercurial\hg.exe" --config ui.interactive=False update --config auth.tc.prefix=* --config auth.tc.username=test --config auth.tc.password=****** --config "auth.tc.schemes=http https" -C -r 325c2edbaa4e' command failed.
[17:43:58]Publishing internal artifacts
[17:43:58]Build failed to start. Artifacts will not be published for this build
[17:43:58]Build finished


Also found the following in the wrapper log:-

at java.lang.Thread.run(Unknown Source) 
INFO   | jvm 1    | 2014/01/14 09:24:08 | [2014-01-14 09:24:08,639]   WARN -            
jetbrains.buildServer.VCS - '"c:\program files\mercurial\hg.exe" --config     ui.interactive=False update --config auth.tc.prefix=* --config auth.tc.username=test --config auth.tc.password=****** --config "auth.tc.schemes=http https" -C -r 325c2edbaa4e' command failed. 
INFO   | jvm 1    | 2014/01/14 09:24:08 | stderr: 
INFO   | jvm 1    | 2014/01/14 09:24:08 | abort: data/UI/UI.Common/UI.Common.test/ErrorValidationMessage.cs.i@c59e1b7714b4: no match found! 
I checked in data directory under .hg and that folder is not there as well. It works fine if I do a checkout on local machine but keeps failing on teamcity.



Need urgent help as Every thing is come to a halt due to this issue.
Many Thanks
12 comments
Comment actions Permalink

Hi,

pleast attach a teamcity-vcs.log from the agent. What do you mean by the wrapper?

0
Comment actions Permalink

please find a copy of teamcity-vcs.log from the agent attached. Wrapper means the Wrapper.log file generated by teamcity on agent.



Attachment(s):
teamcity-vcs.log.zip
0
Comment actions Permalink

Please run the command

hg.exe --config ui.interactive=False update --config auth.tc.prefix=* --config auth.tc.username=testuser --config auth.tc.password=<main repository password> --config "auth.tc.schemes=http https" -C -r fd2c7e62d112

inside Z:\hgbuilds\Travel directory on the agent. Does it succeed?

0
Comment actions Permalink

Before I did a clone which worked fine. Now as per your advice executed the command and got the same error:-

Z:\hgbuilds\Travel>hg.exe --config ui.interactive=False update --config
auth.tc.prefix=* --config auth.tc.username=test --config auth.tc.password="password" --config "auth.tc.schemes=http https" -C -r fd2c7e62d112
abort: data/test.UI/test.UI.Common/test.UI.Common.ViewModels.HtmlExtension
s/HtmlExtensions/MandatoryFieldLabelExtensions.cs.i@111801c227e0: no match found
!

0
Comment actions Permalink

Are you able to update the main repository to the fd2c7e62d112 revision on your machine? If so, then something is wrong with the agent. Maybe it's an old version of mercurial?

0
Comment actions Permalink

build server has mercurial 2.4.2 installed whereas all agent machines have mercurial 2.5.2 installed. All developers are using totoise hg and no problem with this on all development machines. Now the thing is nothing updated regarding version wise and just suddenly agents starts complaining. Just dont figure out Why? Can you please guide What should I do version wise. Should I downgrade all versions on agents to 2.4.2?

0
Comment actions Permalink

So update to the revision above works fine locally?

Please do the following on the agent machine:

1. clone https://hg.tserver.co.uk/nextgen somewhere closer to the file system root, e.g. into c:\1. And then run hg update -C -r 851c546880d9. Does it succeed? Mercurial has some limitations on the maximum file path length. It doesn't seem like you've reached the limit, but let's check, just in case.

2. update mercurial to the latest version on a single agent and check if it makes any difference.

If nothing of this helps I'd say something is wrong on your mercurial server. Maybe credentials for the subrepository which contains data/tserver.UI/tserver.UI.Common/tserver.UI.Common.ViewModels.HtmlExtensions/HtmlExtensions/MandatoryFieldLabelExtensions.cs are different from the credentials of the main repository? Are you able to clone this subrepository alone from the agent machine using the credentials of the main repository?

0
Comment actions Permalink

Yes tried step 1 to clone close to c drive for maximum length check and it worked fine. Also updated the agent version and that doesnt make any difference. Yes and I am also able to clone this subrepository alone from the agent machine using the credentials of the main repository.

VCS checkout mode set to server in teamcity settings is working fine. Problem is coming when VCS mode is set to Automatically on agent. So something is wrong with .hg files on mercurial server. Any idea why? Why other developers are not having same problem when done on their machines. As I cant do anything on mercurial as whole team is using it. I want to solve this issue with teramcity without disturbing the whole team. :(

0
Comment actions Permalink

Sounds like the changing a directory to c:\1 helps. Does changing a checkout directory for the failing build configuration helps?

0
Comment actions Permalink

yes, tried changing the checkout directory but it also fails.

0
Comment actions Permalink

TeamCity doesn't do anything exotic to checkout sources on the agent machine, it runs hg pull -U <repository url> for the main repository, then for each subrepo and then runs 'hg update <revision in build>'. All the commands a written into teamcity-vcs.log. If you replay them and mercurial fails I'd say this is some problem in mercurial or in build agent environment.

0
Comment actions Permalink

yes you are right. Definitly something gone wrong with mercurial. As we have 6 build agents and all give same result.
Thanks alot Dmitry Neverov for your continous support.

0

Please sign in to leave a comment.