Sorry, forgot to include our ccnet version: 1.4.4.192
On Jul 21, 9:06 am, Matt <[email protected]> wrote: > Hi all, > > We use ccnet in conjunction with svn to build our project. Both the > svn server and the ccnet server reside on the same VM, which we > shutdown every day at 2am for backup. > > Every now and then we get the following exception: > > ThoughtWorks.CruiseControl.Core.CruiseControlException: Unable to load > the output from svn: <?xml version="1.0"?> <log> ---> > System.Xml.XmlException: Unerwartetes Dateiende. Die folgenden > Elemente wurden nicht geschlossen: log. Zeile 3, Position 1. bei > System.Xml.XmlTextReaderImpl.Throw(Exception e) bei > System.Xml.XmlTextReaderImpl.Throw(String res, String arg) bei > System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String arg) > bei System.Xml.XmlTextReaderImpl.ThrowUnclosedElements() bei > System.Xml.XmlTextReaderImpl.ParseElementContent() bei > System.Xml.XmlTextReaderImpl.Read() bei > System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) bei > System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) bei > System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean > preserveWhitespace) bei System.Xml.XmlDocument.Load(XmlReader reader) > bei System.Xml.XmlDocument.LoadXml(String xml) bei > ThoughtWorks.CruiseControl.Core.Sourcecontrol.SvnHistoryParser.ReadSvnLogIntoXmlNode(TextReader > svnLog) in C:\projects\ccnet\project\core\sourcecontrol > \SvnHistoryParser.cs:Zeile 55. --- Ende der internen > Ausnahmestapelüberwachung --- bei > ThoughtWorks.CruiseControl.Core.Sourcecontrol.SvnHistoryParser.ReadSvnLogIntoXmlNode(TextReader > svnLog) in C:\projects\ccnet\project\core\sourcecontrol > \SvnHistoryParser.cs:Zeile 59. bei > ThoughtWorks.CruiseControl.Core.Sourcecontrol.SvnHistoryParser.Parse(TextReader > svnLog, DateTime from, DateTime to) in C:\projects\ccnet\project\core > \sourcecontrol\SvnHistoryParser.cs:Zeile 29. bei > ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.ParseModifications(TextReader > reader, DateTime from, DateTime to) in C:\projects\ccnet\project\core > \sourcecontrol\ProcessSourceControl.cs:Zeile 73. bei > ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.ParseModifications(ProcessResult > result, DateTime from, DateTime to) in C:\projects\ccnet\project\core > \sourcecontrol\ProcessSourceControl.cs:Zeile 68. bei > ThoughtWorks.CruiseControl.Core.Sourcecontrol.Svn.GetModifications(IIntegrationResult > from, IIntegrationResult to) in C:\projects\ccnet\project\core > \sourcecontrol\Svn.cs:Zeile 138. bei > ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModificationsWithLogging(ISourceControl > sc, IIntegrationResult from, IIntegrationResult to) in C:\projects > \ccnet\project\core\sourcecontrol\QuietPeriod.cs:Zeile 71. bei > ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl > sourceControl, IIntegrationResult lastBuild, IIntegrationResult > thisBuild) in C:\projects\ccnet\project\core\sourcecontrol > \QuietPeriod.cs:Zeile 35. bei > ThoughtWorks.CruiseControl.Core.IntegrationRunner.GetModifications(IIntegrationResult > from, IIntegrationResult to) in C:\projects\ccnet\project\core > \IntegrationRunner.cs:Zeile 113. bei > ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest > request) in C:\projects\ccnet\project\core\IntegrationRunner.cs:Zeile > 36. > > Ideal behaviour for us would be that ccnet terminates gracefully, logs > the error, but on restart of the VM resumes normal operation. As it > stands I have to manually restart the project when this happens. > > Also: we had problems when svn was terminated (also due to the > restart) - this caused ccnet to also stop the project builds, > requiring manual intervention once again. > > ThoughtWorks.CruiseControl.Core.CruiseControlException: Source control > operation failed: svn: Caught signal . Process command: C:\Programme > \VisualSVN\bin\svn.exe cleanup c:\build\workspace bei > ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.Execute(ProcessInfo > processInfo) bei > ThoughtWorks.CruiseControl.Core.Sourcecontrol.Svn.GetModifications(IIntegrationResult > from, IIntegrationResult to) bei > ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl > sourceControl, IIntegrationResult lastBuild, IIntegrationResult > thisBuild) bei > ThoughtWorks.CruiseControl.Core.IntegrationRunner.GetModifications(IIntegrationResult > from, IIntegrationResult to) bei > ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest > request) > > I hacked the Execute(ProcessInfo processInfo) methods in project\core > \sourcecontrol\ProcessSourceControl.cs to work around this last error; > for us, it's an improvement :) > > protected ProcessResult Execute(ProcessInfo processInfo) > { > processInfo.TimeOut = Timeout.Millis; > ProcessResult result = executor.Execute(processInfo); > > if (result.TimedOut) > { > //throw new CruiseControlException("Source control > operation has timed out."); > Log.Warning("Source control operation has timed > out."); > } > else if (result.Failed) > { > > Log.Warning(string.Format("Source control operation > failed: {0}. Process command: {1} {2}", > > result.StandardError, processInfo.FileName, processInfo.Arguments)); > //throw new > CruiseControlException(string.Format("Source control operation failed: > {0}. Process command: {1} {2}", > // > result.StandardError, processInfo.FileName, processInfo.Arguments)); > } > else if (result.HasErrorOutput) > { > Log.Warning(string.Format("Source control > wrote output to stderr: > {0}", result.StandardError)); > } > return result; > } > > Soooo my question is, how can I keep our ccnet build project running > gracefully, even if svn is temporarily unavailable, the machine is > restarted, etc. > > Cheers! > > Matt
