What is causing the error in my CruiseControl.Net Project? - cruisecontrol.net

I'm a bit baffled by the results I'm seeing in my CruiseControl.Net build log. The build fails after a few minutes but I can't figure out what's causing it.
<cruisecontrol project="Bromley Live">
<request source="ITUSER-PC" buildCondition="ForceBuild">Build (ForceBuild) triggered from ITUSER-PC</request>
<parameters>
<parameter name="CCNetForceBuildReason" value="Debugging" />
<parameter name="$CCNetArtifactDirectory" value="C:\CCNet\Projects\Bromley Live\Artifacts" />
<parameter name="$CCNetBuildCondition" value="ForceBuild" />
<parameter name="$CCNetBuildDate" value="2011-06-02" />
<parameter name="$CCNetBuildTime" value="14:34:38" />
<parameter name="$CCNetFailureUsers" value="System.Collections.ArrayList" />
<parameter name="$CCNetIntegrationStatus" value="Unknown" />
<parameter name="$CCNetLabel" value="1.0.0.0" />
<parameter name="$CCNetLastIntegrationStatus" value="Failure" />
<parameter name="$CCNetListenerFile" value="C:\CCNet\Projects\Bromley Live\Artifacts\Bromley Live_ListenFile.xml" />
<parameter name="$CCNetModifyingUsers" value="System.Collections.ArrayList" />
<parameter name="$CCNetNumericLabel" value="0" />
<parameter name="$CCNetProject" value="Bromley Live" />
<parameter name="$CCNetProjectUrl" value="http://CIBuildServer/CruiseControl/server/local/project/Bromley Live/ViewProjectReport.aspx" />
<parameter name="$CCNetRequestSource" value="OCL-DEV-WEB" />
<parameter name="$CCNetUser" value="" />
<parameter name="$CCNetWorkingDirectory" value="C:\CCNet\Projects\Bromley Live\WorkingDirectory" />
</parameters>
<modifications />
<integrationProperties>
<CCNetArtifactDirectory>C:\CCNet\Projects\Bromley Live\Artifacts</CCNetArtifactDirectory>
<CCNetBuildCondition>ForceBuild</CCNetBuildCondition>
<CCNetBuildDate>2011-06-02</CCNetBuildDate>
<CCNetBuildTime>14:34:38</CCNetBuildTime>
<CCNetFailureUsers />
<CCNetIntegrationStatus>Failure</CCNetIntegrationStatus>
<CCNetLabel>1.0.0.0</CCNetLabel>
<CCNetLastIntegrationStatus>Failure</CCNetLastIntegrationStatus>
<CCNetListenerFile>C:\CCNet\Projects\Bromley Live\Artifacts\Bromley Live_ListenFile.xml</CCNetListenerFile>
<CCNetModifyingUsers />
<CCNetNumericLabel>0</CCNetNumericLabel>
<CCNetProject>Bromley Live</CCNetProject>
<CCNetProjectUrl>http://CIBuildServer/CruiseControl/server/local/project/Bromley Live/ViewProjectReport.aspx</CCNetProjectUrl>
<CCNetRequestSource>ITUSER-PC</CCNetRequestSource>
<CCNetWorkingDirectory>C:\CCNet\Projects\Bromley Live\WorkingDirectory</CCNetWorkingDirectory>
<LastIntegrationStatus>Failure</LastIntegrationStatus>
<LastSuccessfulIntegrationLabel>UNKNOWN</LastSuccessfulIntegrationLabel>
<LastModificationDate>01/06/2011 14:35:34</LastModificationDate>
<CCNetForceBuildReason>Debugging</CCNetForceBuildReason>
</integrationProperties>
<build date="2011-06-02 14:34:38" buildtime="00:00:56" error="true" buildcondition="ForceBuild">
<buildresults>
<message>The command completed successfully.</message>
</buildresults>
<buildresults>
<message>-------------------------------------------------------------------------------</message>
<message> ROBOCOPY :: Robust File Copy for Windows </message>
<message>-------------------------------------------------------------------------------</message>
<message> Started : Thu Jun 02 14:34:38 2011</message>
<message> Source : C:\CCNet\Projects\Bromley Live\WorkingDirectory\Website\</message>
<message> Dest : \\LiveServer\wwwroot$\Bromley\</message>
<message> Files : *.*</message>
<message> </message>
<message>Exc Files : Thumbs.db</message>
<message> *.scc</message>
<message> </message>
<message> Exc Dirs : .hg</message>
<message> </message>
<message> Options : *.* /NS /NC /NDL /S /E /COPY:DAT /NP /XO /XA:H /R:1000000 /W:30 </message>
<message>------------------------------------------------------------------------------</message>
<message> \\LiveServer\wwwroot$\Bromley\admin\legacy\selfAssessment\uploadVisitReport.asp</message>
<message> \\LiveServer\wwwroot$\Bromley\Bin\AjaxControlToolkit.pdb</message>
<message> C:\CCNet\Projects\Bromley Live\WorkingDirectory\Website\userControls\IconMenuTopControl.ascx</message>
<message> C:\CCNet\Projects\Bromley Live\WorkingDirectory\Website\userControls\IconMenuTopControl.ascx.vb</message>
<message>------------------------------------------------------------------------------</message>
<message> Total Copied Skipped Mismatch FAILED Extras</message>
<message> Dirs : 212 0 212 0 0 16</message>
<message> Files : 1804 45 1759 0 0 203</message>
<message> Bytes : 44.46 m 2.89 m 41.57 m 0 0 2.03 m</message>
<message> Times : 0:00:55 0:00:16 0:00:00 0:00:39</message>
<message> Speed : 185068 Bytes/sec.</message>
<message> Speed : 10.589 MegaBytes/min.</message>
<message> Ended : Thu Jun 02 14:35:34 2011</message>
</buildresults>
</build>
</cruisecontrol>

Robocopy does not return proper exit status codes (that is, 0 on success). To work around this, you have to use the successExitCodes attibute on your executable task. Setting it to "0,1,2" should work (you want the task to fail on other results). (Robocopy exit codes list as a reference.)

Related

Application Insights Multi-Step Availability Test Producing 411

I have created a WebTest via Fiddler which POST's to a public endpoint using the basic Authorization method. The call works fine in Fiddler/Postman however when I upload the following webtest as an Azure's Availablity test it fails, giving me a 411 error.
The Web Test:
<?xml version="1.0" encoding="utf-8"?>
<TestCase Name="FiddlerGeneratedWebTest" Id="" Owner="" Description="" Priority="0" Enabled="True" CssProjectStructure="" CssIteration="" DeploymentItemsEditable="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="" RequestCallbackClass="" TestCaseCallbackClass="">
<Items>
<Request Method="POST" Version="1.1" Url="https://myapp.scm.azurewebsites.net/api/triggeredwebjobs/mywebjob/run" ThinkTime="0" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8">
<Headers>
<Header Name="Authorization" Value="Basic JGRldi1sb2NhbGl0eS13ZWItam9iphYVJSN1o0QjlmUXBNZlhjcXJKSHd1RFpYNW1xWlE4MTNzRnRMMUpOc2JFNXVna3l2aWVhQ3pBNXJvYzg=" />
<Header Name="Content-Length" Value="0" />
</Headers>
<QueryStringParameters>
<QueryStringParameter Name="arguments" Value="health" UrlEncode="True" UseToGroupResults="False" />
</QueryStringParameters>
</Request>
</Items>
</TestCase>
The Error
Returned once the availability test fails:
> 1 primary requests, 0 dependant requests and 0 conditional rules failed
> Http Error (subtype '411 - LengthRequired') occured at 09/06/2018
> 05:49:45 (UTC) for Uri
> 'https://myapp.scm.azurewebsites.net/api/triggeredwebjobs/mywebjob/run?arguments=health',
> step #1 with the error '411 - LengthRequired'.
Any help would be greatly appreciated!

dotnet core nlog running on Linux logs only one entry

I am running an aspnet core site on Linux using Kestrel. I have set up nlog to log to csv files. All is well in my Windows development environment, but when I run it on Linux I only get one entry in the log file. I turned on nlog tracing and found the following error in the output:
2016-09-09 07:22:46.2123 Error Error has been raised. Exception: System.IO.IOException: The file '/var/aspnetcore/CSWebSite/releases/20160909061254/logs/archives/own-log.20160908.csv' already exists.
at System.IO.UnixFileSystem.MoveFile(String sourceFullPath, String destFullPath)
at System.IO.File.Move(String sourceFileName, String destFileName)
at NLog.Targets.FileTarget.ArchiveByDate(String fileName, String pattern, LogEventInfo logEvent)
at NLog.Targets.FileTarget.ProcessLogEvent(LogEventInfo logEvent, String fileName, Byte[] bytesToWrite)
at NLog.Targets.FileTarget.FlushCurrentFileWrites(String currentFileName, LogEventInfo firstLogEvent, MemoryStream ms, List`1 pendingContinuations)
2016-09-09 07:22:46.2123 Error Error has been raised. Exception: System.IO.IOException: The file '/var/aspnetcore/CSWebSite/releases/20160909061254/logs/archives/all-log.20160907.csv' already exists.
at System.IO.UnixFileSystem.MoveFile(String sourceFullPath, String destFullPath)
at System.IO.File.Move(String sourceFileName, String destFileName)
at NLog.Targets.FileTarget.ArchiveByDate(String fileName, String pattern, LogEventInfo logEvent)
at NLog.Targets.FileTarget.ProcessLogEvent(LogEventInfo logEvent, String fileName, Byte[] bytesToWrite)
at NLog.Targets.FileTarget.FlushCurrentFileWrites(String currentFileName, LogEventInfo firstLogEvent, MemoryStream ms, List`1 pendingContinuations)
This is my nlog.config:
<?xml version="1.0" encoding="utf-8" ?>
<nlog
xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<extensions>
<!--enable NLog.Web for ASP.NET Core-->
<add assembly="NLog.Web.AspNetCore"/>
</extensions>
<targets>
<!-- https://github.com/nlog/nlog/wiki/File-target -->
<!-- http://stackoverflow.com/questions/34679727/use-nlog-in-asp-net-5-application -->
<target name="allfile" xsi:type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
<target name="allfile" xsi:type="File"
fileName="${basedir}/logs/all-logfile.csv"
archiveFileName="${basedir}/logs/archives/all-log.{#}.csv"
archiveEvery="Day"
archiveNumbering="Date"
archiveDateFormat="yyyyMMdd"
maxArchiveFiles="28"
concurrentWrites="true"
keepFileOpen="false"
encoding="utf-8">
<layout xsi:type="CSVLayout">
<column name="time" layout="${longdate}" />
<column name="logger" layout="${logger}" />
<column name="authtype" layout="${aspnet-user-authtype}" />
<column name="identity" layout="${aspnet-user-identity}" />
<column name="level" layout="${uppercase:${level}}" />
<column name="message" layout="${message} ${exception:format=ToString,StackTrace}" />
</layout>
</target>
</target>
<target name="ownfile" xsi:type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
<target name="ownfile" xsi:type="File"
fileName="${basedir}/logs/own-logfile.csv"
archiveFileName="${basedir}/logs/archives/own-log.{#}.csv"
archiveEvery="Day"
archiveNumbering="Date"
archiveDateFormat="yyyyMMdd"
maxArchiveFiles="28"
concurrentWrites="true"
keepFileOpen="false"
encoding="utf-8">
<layout xsi:type="CSVLayout">
<column name="time" layout="${longdate}" />
<column name="logger" layout="${logger}" />
<column name="authtype" layout="${aspnet-user-authtype}" />
<column name="identity" layout="${aspnet-user-identity}" />
<column name="level" layout="${uppercase:${level}}" />
<column name="message" layout="${message} ${exception:format=ToString,StackTrace}" />
</layout>
</target>
</target>
<target xsi:type="Null" name="blackhole" />
</targets>
<rules>
<!--All logs, including from Microsoft-->
<logger name="*" minlevel="Debug" writeTo="allfile" />
<!--Skip Microsoft logs and so log only own logs-->
<logger name="Microsoft.*" minlevel="Trace" writeTo="blackhole" final="true" />
<logger name="*" minlevel="Debug" writeTo="ownFile" />
</rules>
</nlog>
I have concurrent writes true and keepFileOpen false which seems necessary as kestrel forks multiple dotnet processes on Linux.
Is this a bug or is my configuration incorrect?

Can't embed image in as3 file while build with ant under linux(debian)

I embedded a png in as3, it's all fine on windows, either use FB4.6 or Ant. But while build with Ant under linux(debian), I got this Error. Image path is /var/lib/jenkins/workspace/q5/dev_Flash/code/Copper/src/assets/c001_up.png. Project name is /var/lib/jenkins/workspace/q5/dev_Flash/code/Copper.
[mxmlc] /var/lib/jenkins/workspace/q5/dev_Flash/code/Copper/src/com/copper/ui/skin/DefaultAssets.as(10): col: 3: Error: unable to resolve 'assets/c001_up.png' for transcoding
[mxmlc]
[mxmlc] [Embed(source = "assets/c001_up.png")]
[mxmlc] ^
[mxmlc]
[mxmlc] /var/lib/jenkins/workspace/q5/dev_Flash/code/Copper/src/com/copper/ui/skin/DefaultAssets.as(10): col: 3: Error: Unable to transcode assets/c001_up.png.
as3 file like this
package com.copper.ui.skin {
/**
*
* #author marzwu
*
*/
public class DefaultAssets extends Assets {
[Embed(source = "assets/c001_up.png")]
private var Button_Up:Class;
My ant file is:
<?xml version="1.0" encoding="UTF-8"?>
Q5客户端构建
<!-- 配置属性 -->
<property file="build.properties" />
<property environment="env" />
<property name="FLEX_HOME" value="${env.FLEX_HOME}" />
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
<target name="compile">
<echo message="${basedir}/../src" />
<compc output="../bin/copper.swc" debug="false" incremental="true">
<!-- 指定Comman项目的源码目录 -->
<source-path path-element="${basedir}/../src" />
<!-- 指定编译的文件列表 -->
<include-sources dir="${basedir}/../src">
<include name="**/*.as" />
</include-sources>
<!-- 将Flex SDK 作为外部库进行引用 -->
<compiler.external-library-path dir="${FLEX_HOME}/frameworks">
<include name="**/*.swc" />
</compiler.external-library-path>
<!-- 添加项目中的SWC包,请注意这里是外部 -->
<compiler.external-library-path dir="../libs">
<include name="**/*.swc" />
</compiler.external-library-path>
<define name="CONFIG::Debug" value="true" />
<define name="CONFIG::Release" value="false" />
<jvmarg value="-Xmx2048m"/>
<jvmarg value="-Xms512m"/>
<jvmarg value="-XX:MaxPermSize=512m"/>
</compc>
<!-- 删除缓存文件 -->
<delete>
<fileset dir="../bin" includes="*.cache" />
</delete>
<echo message="complier Flex Library Project finished!" />
</target>
<target name="deploy">
<antcall target="compile" />
<!--antcall target="copy_to_bin" /-->
<echo>前往查看结果:http://10.0.1.69/q5d/</echo>
<echo message="执行发布" />
</target>
I use jenkins to build my as3 project. It's bother me for many day. Appreciate for your helping.
Oops, compiler can't resolve the path, because I did not notice the "u" between "c001_up.png" is an upper case letter. Windows are not sensitive of letter case, but linux are. My fault, thank you for your time.

CC Validator throws error for dashboard.config file - No loaded type is marked up with a Reflector Type attribute

Think I have messed up the config file for the dashboard.
Error -
No loaded type is marked up with a Reflector Type attribute that matches the XML node(dashboard).
Error comes up when I validate the dashboard.config file in the CC Validator.
This is my dashboard.config file
<?xml version="1.0" encoding="utf-8"?>
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<dashboard>
<remoteServices>
<servers>
<!-- Update this list to include all the servers you want to connect to. NB - each server name must be unique -->
<server name="local" url="tcp://localhost:21234/CruiseManager.rem" allowForceBuild="true" allowStartStopBuild="true" backwardsCompatible="false" />
</servers>
</remoteServices>
<plugins>
<farmPlugins>
<farmReportFarmPlugin categories="false" />
<cctrayDownloadPlugin />
<administrationPlugin password="" />
</farmPlugins>
<serverPlugins>
<serverReportServerPlugin />
</serverPlugins>
<projectPlugins>
<projectReportProjectPlugin />
<viewProjectStatusPlugin />
<latestBuildReportProjectPlugin />
<viewAllBuildsProjectPlugin />
</projectPlugins>
<buildPlugins>
<buildReportBuildPlugin>
<xslFileNames>
<xslFile>xsl\header.xsl</xslFile>
<xslFile>xsl\modifications.xsl</xslFile>
</xslFileNames>
</buildReportBuildPlugin>
<buildLogBuildPlugin />
</buildPlugins>
<securityPlugins>
<simpleSecurity />
</securityPlugins>
</plugins>
</dashboard>
</cruisecontrol>
Can anyone please help me on this, and also some tips on how to resolve similar issues would be helpful.
Your dashboard.config file looks a little strange, i dont think it should contain the cruisecontrol node.
I think it should be:
<?xml version="1.0" encoding="utf-8"?>
<dashboard>
<remoteServices>
<servers>
<!-- Update this list to include all the servers you want to connect to. NB - each server name must be unique -->
<server name="local" url="tcp://localhost:21234/CruiseManager.rem" allowForceBuild="true" allowStartStopBuild="true" backwardsCompatible="false" />
</servers>
</remoteServices>
<plugins>
<farmPlugins>
<farmReportFarmPlugin categories="false" />
<cctrayDownloadPlugin />
<administrationPlugin password="" />
</farmPlugins>
<serverPlugins>
<serverReportServerPlugin />
</serverPlugins>
<projectPlugins>
<projectReportProjectPlugin />
<viewProjectStatusPlugin />
<latestBuildReportProjectPlugin />
<viewAllBuildsProjectPlugin />
</projectPlugins>
<buildPlugins>
<buildReportBuildPlugin>
<xslFileNames>
<xslFile>xsl\header.xsl</xslFile>
<xslFile>xsl\modifications.xsl</xslFile>
</xslFileNames>
</buildReportBuildPlugin>
<buildLogBuildPlugin />
</buildPlugins>
<securityPlugins>
<simpleSecurity />
</securityPlugins>
</plugins>
</dashboard>

XmlDocuments Element ignored in Content Type?

I have a content type defined in Elements.xml and I want to add an Event Receiver. My Elements.xml looks like this:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Parent ContentType: Announcement (0x0104) -->
<ContentType ID="0x0104008a424de98660457481eb7d8ddb5161ee"
Name="News Posting"
Group="News"
Description="$Resources:NewsCTypeDescription"
Inherits="TRUE"
Version="1"
Sealed="TRUE"
>
<FieldRefs>
<FieldRef ID="{7EBC5918-CB79-440A-8DF3-480C6951C4EB}" Name="NewsExcerpt"/>
</FieldRefs>
<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/events">
<spe:Receivers xmlns:spe="http://schemas.microsoft.com/sharepoint/events">
<Receiver>
<Name>ItemAdded</Name>
<Type>ItemAdded</Type>
<Class>MyAssembly.NewsItemEventReceiver</Class>
<Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
<SequenceNumber>10000</SequenceNumber>
<Synchronization>Synchronous</Synchronization>
<Data />
<Filter />
</Receiver>
</spe:Receivers>
</XmlDocument>
</XmlDocuments>
</ContentType>
</Elements>
The weird thing is that the Event Receiver never executes. I've checked the Schema with SharePoint Manager 2010, and it seems that the XmlDocuments element is ignored completely?
Here's the content type SchemaXml according to SharePoint Manager:
<?xml version="1.0" encoding="utf-16"?>
<ContentType ID="0x0104008A424DE98660457481EB7D8DDB5161EE" Name="News Posting" Group="News" Description="A News Posting" Sealed="TRUE" Version="1">
<Folder TargetName="_cts/News Posting" />
<Fields>
<Field ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}" Name="ContentType" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="ContentType" Group="_Hidden" Type="Computed" DisplayName="Content Type" Sealed="TRUE" Sortable="FALSE" RenderXMLUsingPattern="TRUE" PITarget="MicrosoftWindowsSharePointServices" PIAttribute="ContentTypeID" Customization="">
<FieldRefs>
<FieldRef ID="{03e45e84-1992-4d42-9116-26f756012634}" Name="ContentTypeId" />
</FieldRefs>
<DisplayPattern>
<MapToContentType>
<Column Name="ContentTypeId" />
</MapToContentType>
</DisplayPattern>
</Field>
<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title" Group="_Hidden" Type="Text" DisplayName="Title" Required="TRUE" FromBaseType="TRUE" Customization="" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
<Field ID="{7662cd2c-f069-4dba-9e35-082cf976e170}" Name="Body" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Body" Group="_Hidden" Type="Note" RichText="TRUE" RichTextMode="FullHtml" IsolateStyles="TRUE" DisplayName="Body" Sortable="FALSE" NumLines="15" Customization="" />
<Field ID="{6a09e75b-8d17-4698-94a8-371eda1af1ac}" Name="Expires" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Expires" Group="_Hidden" Type="DateTime" DisplayName="Expires" Format="DateOnly" Customization="" />
<Field ID="{7EBC5918-CB79-440A-8DF3-480C6951C4EB}" Group="News" Name="NewsExcerpt" DisplayName="Excerpt of the Article" Description="165 Characters maximum" MaxLength="165" Type="Text" Customization="" />
</Field>
</Fields>
<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<Display>ListForm</Display>
<Edit>ListForm</Edit>
<New>ListForm</New>
</FormTemplates>
</XmlDocument>
</XmlDocuments>
</ContentType>
I have tried adding a FormTemplates XmlDocument as well, just to see if that works, but even this is ignored (I've changed the ListForm to ListForm2, but the SchemaXml is unchanged.
I've deleted the entire Web Application and Content Database to make sure there was nothing stale/stuck, but the result is still the same.
Is XmlDocuments depreciated in SharePoint 2010? What are the alternatives?
You should add your event receiver as a feature, maybe even as a part of the same feature that installs the content type. We always do it this way and it works perfectly

Resources