5

I am trying to create a new project to cruise control. To do that, I added this to my ccnet.config file

<project name="MyProj"
         description="MyProjproject">

  <triggers/>

  <sourcecontrol type="git">
    <repository>GitAddr</repository>
    <branch>releaseName</branch>
    <autoGetSource>true</autoGetSource>
    <fetchSubmodules>true</fetchSubmodules>
    <executable>C:\Program Files (x86)\Git\cmd\git.exe</executable>
    <tagOnSuccess>false</tagOnSuccess>
    <commitBuildModifications>false</commitBuildModifications>
    <commitUntrackedFiles>false</commitUntrackedFiles>
    <tagCommitMessage>Unation Web Build {0}</tagCommitMessage>
    <tagNameFormat>Unation-Web-Build-{0}</tagNameFormat>
    <committerName>Oscar Albrecht</committerName>
    <committerEMail>oalbrecht@unation.com</committerEMail>
    <workingDirectory>d:\GIT\Sources\WEB</workingDirectory>
    <timeout>60000</timeout>
  </sourcecontrol>

  <tasks>
      <exec>
        <!-- if you want the task to fail, ping an unknown server -->
        <executable>ping.exe</executable>
        <buildArgs>localhost</buildArgs>
        <buildTimeoutSeconds>15</buildTimeoutSeconds>
        <description>Pinging a server</description>
      </exec>
  </tasks>

  <publishers>
    <xmllogger />
    <artifactcleanup cleanUpMethod="KeepLastXBuilds"
                     cleanUpValue="50" />
  </publishers>

</project>

But I get a

ThoughtWorks.CruiseControl.Core.CruiseControlException: Source control operation has timed out.
   at ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.Execute(ProcessInfo processInfo)
   at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Git.GitFetch(IIntegrationResult result)
   at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Git.CreateUpateLocalRepository(IIntegrationResult result)
   at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Git.GetModifications(IIntegrationResult from, IIntegrationResult to)
   at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModificationsWithLogging(ISourceControl sc, IIntegrationResult from, IIntegrationResult to)
   at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl sourceControl, IIntegrationResult lastBuild, IIntegrationResult thisBuild)
   at ThoughtWorks.CruiseControl.Core.IntegrationRunner.GetModifications(IIntegrationResult from, IIntegrationResult to)
   at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)

I am able to use git extensions and git bash to pull the files, but CruiseControl gives me this error. It is very strange and frustrating, because for a while it worked, I could even create a msbuild file to compile it and so on, but it stopped working without changes and now I am stuck.

What could happen?

Edit: I increased the timeout to 2 hours. I started the build and I also started in a second machine the pull. I could complete 3 pulls and the info I get in the ccnet is still "git fetch origin". It seems it is locked. Is there any way to check the console output for the operations?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
JSBach
  • 4,679
  • 8
  • 51
  • 98
  • How long does it take to timeout? Are we talking instant, or longer than your `60000`? If you use manually do a `git pull` on the build machine, how long does that take/does it work? – Pondidum Jun 04 '13 at 15:54
  • It depends. Some seconds, if it is "all up-to-date", which is the case at the moment. To download all files it might take more than a minute, maybe 5. – JSBach Jun 04 '13 at 15:59
  • @Pondidum I tried to increase the timeout property, edited the question with more info. – JSBach Jun 04 '13 at 17:42
  • If you run `ccnet.exe` rather than `ccnet.service.exe` you should see a console output. You might also need to change the logging level in `ccnet.exe.config` to `Debug`. – Pondidum Jun 04 '13 at 18:43
  • Ok, I just fixed it by changing the service log on account to the one I am using when logging to GIT using the git extensions. Unfortunately I didn't know about this console :( – JSBach Jun 04 '13 at 19:32
  • This might be relevant: http://stackoverflow.com/questions/13482145/git-ssh-hanging-when-called-from-mvc-webapi/13549635#13549635 – mvp Jun 05 '13 at 02:30

2 Answers2

3

It might be account issues. You need to change the CC service account.. Git is based on ssh and ssh tied to user account.

Michael Sync
  • 4,834
  • 10
  • 40
  • 58
0

It is the account issue. I had a similar problem and resolved it by restarting the service CruiseControl.NET Server from services.msc.