Problems with CruiseControl.NET

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
TimK
Posts: 33
Joined: Mon Jan 16, 2006 7:59 am

Problems with CruiseControl.NET

Post by TimK » Mon Jan 16, 2006 8:02 am

I've been trying to use CC.NET with Vault but keep getting this error


BUILD EXCEPTION
Error Message: ThoughtWorks.CruiseControl.Core.CruiseControlException: Source control operation failed: . Process command: c:\program files\sourcegear\vault client\vault.exe history $ -excludeactions label -rowlimit 0 -begindate 2006-01-15T22:48:40 -enddate 2006-01-15T22:49:59 -host vaultpub.sourcegear.com -user guest -password guest -repository Build_Tool_Integration at ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.Execute(ProcessInfo processInfo) at ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.GetModifications(ProcessInfo info, DateTime from, DateTime to) at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Vault.GetModifications(IIntegrationResult from, IIntegrationResult to) at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl sourceControl, IIntegrationResult lastBuild, IIntegrationResult thisBuild) at ThoughtWorks.CruiseControl.Core.IntegrationRunner.RunIntegration(BuildCondition buildCondition)
Project: Vault2
Date of build: 15/01/2006 22:49:59
Running time: 00:00:09
Build condition: Modifications Detected



<cruisecontrol project="Vault2">
<modifications />
<build date="15/01/2006 22:49:59" buildtime="00:00:09" buildcondition="IfModificationExists" />
<exception><![CDATA[ThoughtWorks.CruiseControl.Core.CruiseControlException: Source control operation failed: . Process command: c:\program files\sourcegear\vault client\vault.exe history $ -excludeactions label -rowlimit 0 -begindate 2006-01-15T22:48:40 -enddate 2006-01-15T22:49:59 -host vaultpub.sourcegear.com -user guest -password guest -repository Build_Tool_Integration
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.Execute(ProcessInfo processInfo)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.GetModifications(ProcessInfo info, DateTime from, DateTime to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Vault.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl sourceControl, IIntegrationResult lastBuild, IIntegrationResult thisBuild)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.RunIntegration(BuildCondition buildCondition)]]></exception>
</cruisecontrol>


Please can anyone help with this issue.
Thanks,
Tim

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Post by ian_sg » Mon Jan 16, 2006 9:04 am

Tim,

To narrow the possibilities, can you answer these questions for me?

What version of Vault are you running?
What version/build of CC.NET are you running?
What does your vault server log show when one of these errors occur? (%windir%\temp\sgvault\sgvault.log)
Ian Olsen
SourceGear

TimK
Posts: 33
Joined: Mon Jan 16, 2006 7:59 am

Post by TimK » Mon Jan 16, 2006 9:15 am

Ian,

Vault - 3.1.6
CC.Net - 1.0.0.1251
Server log - I'm connecting to your vaultpub.sourcegear.com so would the log files be on your server?

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Post by ian_sg » Mon Jan 16, 2006 9:48 am

Ah, I didn't notice that!

We use code from vaultpub in our own builds and haven't had any trouble. I also don't see any errors in the logs on that server today.

The problem is that there's no actual error message here, simply "operation failed." CC.NET invokes the command-line client, can you try running the command that it runs to see if we get better error information? I've tried running it myself here, and can't get it to fail. This is the command:

Code: Select all

"c:\program files\sourcegear\vault client\vault.exe" history $ -excludeactions label -rowlimit 0 -begindate 2006-01-15T22:48:40 -enddate 2006-01-15T22:49:59 -host vaultpub.sourcegear.com -user guest -password guest -repository Build_Tool_Integration
If possible, we'll get the most accurate reproduction if you run it from your CC.NET machine.
Ian Olsen
SourceGear

TimK
Posts: 33
Joined: Mon Jan 16, 2006 7:59 am

Post by TimK » Mon Jan 16, 2006 10:13 am

I ran the command line and got the following error

<vault>
<error>
Proxy Authentication failed.
</error>
<exception>
System.Exception: Proxy Authentication failed.
at VaultCmdLineClient.VaultCmdLineClient.Login(Boolean bAllowAuto, Boolean bSaveSession)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommandHistory(String strReposPath)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)
</exception>
<result success="no" />
</vault>

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Post by ian_sg » Mon Jan 16, 2006 10:37 am

You've got an http proxy that requires authentication between you and vaultpub.sourcegear.com.

While Vault's command-line client can handle this, CC.NET currently cannot. You would have to script the retrieval of this code outside of CruiseControl.NET, using the vault command-line client directly. If you want to go this route, you'll want to look at the proxyserver, proxyport, proxyuser, proxypassword, and proxydomain options. (You can type vault help history at a command line for more on those options.)
Ian Olsen
SourceGear

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Post by ian_sg » Mon Jan 16, 2006 10:54 am

I've added this issue to CruiseControl.NET's bug-tracker (http://jira.public.thoughtworks.org/browse/CCNET-638) for inclusion in a future release.
Ian Olsen
SourceGear

TimK
Posts: 33
Joined: Mon Jan 16, 2006 7:59 am

Post by TimK » Mon Jan 16, 2006 11:15 am

OK, I've changed the location to my local vault server to avoid the proxy issues and get the following

FROM CC.NET CLIENT

BUILD EXCEPTION
Error Message: ThoughtWorks.CruiseControl.Core.CruiseControlException: Source control operation failed: . Process command: c:\program files\sourcegear\vault client\vault.exe history $ -excludeactions label -rowlimit 0 -begindate 2006-01-16T17:01:48 -enddate 2006-01-16T17:02:55 -host XXXXXX -user xxxxx -password xxxxx -repository xxxx
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.Execute(ProcessInfo processInfo) at ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.GetModifications(ProcessInfo info, DateTime from, DateTime to) at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Vault.GetModifications(IIntegrationResult from, IIntegrationResult to) at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl sourceControl, IIntegrationResult lastBuild, IIntegrationResult thisBuild) at ThoughtWorks.CruiseControl.Core.IntegrationRunner.RunIntegration(BuildCondition buildCondition)
Project: xxxxxx_Local
Date of build: 16/01/2006 17:02:55
Running time: 00:00:11
Build condition: Modifications Detected


COMMAND PROMPT

c:\program files\sourcegear\vault client\vault.exe history $ -excludeactions label -rowlimit 0 -begindate 2006-01-16T17:01:48 -enddate 2006-01-16T17:02:55 -host xxxxxx -user xxxxxx -password xxxxx -repository xxxxx
<vault>
<history />
<result success="yes" />
</vault>

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Post by ian_sg » Mon Jan 16, 2006 11:22 am

The fact that it works "normally" but fails when run by CC.NET makes me think it may be a permissions issue. Are you running CC.NET as a service, and if so under what account?

It may also help to turn the CC.NET's logging to the maximum verbosity, in search of the elusive actual error message.
Ian Olsen
SourceGear

TimK
Posts: 33
Joined: Mon Jan 16, 2006 7:59 am

Post by TimK » Mon Jan 16, 2006 11:55 am

Heres and interesting thing.

If I run the CC.net service as a local account it does not work. But if I run it as a local account and tick the box "Allow service to interact with desktop" it works.

However, when I do this I get a commandline box popup and if I close it everything stops working.

Any thoughts?

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Post by ian_sg » Mon Jan 16, 2006 1:09 pm

The local system account may not have all the necessary permissions required by CC.NET. I think we're out of Vault-specific territory at this point.
I can tell you that in our own use, CC.NET is running as a local administrative account (but not the local system account), and we've had no trouble.
Ian Olsen
SourceGear

punitw
Posts: 1
Joined: Tue Jan 16, 2007 11:38 pm

Post by punitw » Tue Jan 16, 2007 11:43 pm

I am totally new to Cruise Control.
I have installed Cruise Control for DotNet.
I am using 1.4.0 version of Torroise SVN.
My ccnet.config file is like this

<cruisecontrol>
<project name="Supplier Review Exchange">
<workingDirectory>C:\CcnetSRE\VKE\Code</workingDirectory>
<artifactDirectory>C:\CcnetSRE\VKE</artifactDirectory>
<modificationDelaySeconds>2</modificationDelaySeconds>
<sourcecontrol type="svn">
<trunkUrl>http://path/Code</trunkUrl>
<workingDirectory>c:\CcnetSRE</workingDirectory>
<executable>C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe</executable>
<username>username</username>
<password>password</password>
<autoGetSource>true</autoGetSource>
</sourcecontrol>
<state type="state" directory="C:\CcnetSRE" />
</project>
</cruisecontrol>

When I am running server I am getting the following exception


2007-01-17 11:02:50,476 [Supplier Review Exchange:ERROR] Exception: Unable to load the output from svn:
----------
ThoughtWorks.CruiseControl.Core.CruiseControlException: Unable to load the output from svn: ---> System.Xml.XmlException: Root element is missing.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.LoadXml(String xml)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.SvnHistoryParser.ReadSvnLogIntoXmlNode(TextReader svnLog)
--- End of inner exception stack trace ---
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.SvnHistoryParser.ReadSvnLogIntoXmlNode(TextReader svnLog)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.SvnHistoryParser.Parse(TextReader svnLog, DateTime from, DateTime to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.ParseModifications(TextReader reader, DateTime from, DateTime to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.ParseModifications(ProcessResult result, DateTime from, DateTime to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Svn.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl sourceControl, IIntegrationResult lastBuild, IIntegrationResult thisBuild)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)
at ThoughtWorks.CruiseControl.Core.Project.Integrate(IntegrationRequest request)
at ThoughtWorks.CruiseControl.Core.ProjectIntegrator.Integrate()

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Post by ian_sg » Wed Jan 17, 2007 8:50 am

Looks like you're using CruiseControl.NET with Subversion. We're not the vendor for either of these. :)

Your best bet for support would be the ccnet-user mailing list. Info on that is here: http://confluence.public.thoughtworks.o ... ling+Lists
Ian Olsen
SourceGear

apimenov
Posts: 2
Joined: Wed Dec 14, 2005 12:35 pm
Contact:

Post by apimenov » Mon Jan 29, 2007 7:26 pm

You might also take a look at our Parabuild at http://www.viewtier.com/products/parabuild.htm . It works with Vault out of the box.

AlexP

tomclark
Posts: 4
Joined: Thu Feb 19, 2009 6:56 am

Re: Problems with CruiseControl.NET

Post by tomclark » Mon Apr 12, 2010 6:59 am

Hi,

Just to comment and say that I experienced this problem too. It was because the repository path I was trying to check out had spaces in it. Once I quoted the string in ccnet.config, it was fine:

Code: Select all

    <sourcecontrol type="vault" autoGetSource="true">
      <executable>D:\apps (x86)\SourceGear\Fortress Client\vault.exe</executable>
      <username>build_user</username>
      <password>build_pass</password>
      <host>host.domain.com</host>
      <repository>Initial Repository</repository>
      <folder>"$/Build Scripts"</folder>
      <ssl>false</ssl>
      <timeout units="minutes">10</timeout>
      <useWorkingDirectory>false</useWorkingDirectory>
      <workingDirectory>D:\Build_Scripts</workingDirectory>
    </sourcecontrol>
I guess the plugin could put quotes around the repository name as well as the folder path.

I'm getting other build errors now, but unfortunately that seems to be down to bad coding...

Hope that helps someone else.

Regards,

Tom

Post Reply