我正在设置CruiseControl.NET,并在Webdashboard上收到以下错误消息:No connection could be made because the target machine actively refused it 127.0.0.1:21234
它正在寻找的网址是:tcp://localhost:21234/CruiseManager.rem
但是,IIS中的ccnet网站的tcp端口设置为82。
因此,我使用以下网址导航到Webdashboard http://127.0.0.1:82/ccnet/ViewFarmReport.aspx
我尝试将IIS中的Tcp端口更改为21234,并且在Webdashboard上收到以下错误消息:Tcp channel protocol violation: expecting preamble.
我也尝试使用以下命令打开端口:netsh firewall add portopening TCP 21234 CCNET
当我尝试启动CCNET服务时,收到以下消息The CruiseControl.NET Server service started then stopped. Some services stop automatically if they have no work to do....
有人可以帮我解决这个问题吗?
编辑-添加配置文件
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<cb:define PublishDir="C:\Deploy\Portal2.0Build"/>
<project name="Portal2.0">
<workingDirectory>C:\PortalCruiseControl\Working</workingDirectory>
<artifactDirectory>C:\PortalCruiseControl\Artifacts</artifactDirectory>
<webURL>http://192.168.17.59:82/ccnet</webURL>
<triggers>
<intervalTrigger name="continuous" seconds="10"
buildCondition="IfModificationExists"/>
</triggers>
<sourcecontrol type="svn">
<trunkUrl>https://portal2003.local:8443/svn/portalv2.0/trunk</trunkUrl>
<executable>C:\Program Files (x86)\VisualSVN Server\bin\svn.exe</executable>
<username>ccnet</username>
<password>***</password>
<cleanCopy>true</cleanCopy>
</sourcecontrol>
<tasks>
<msbuild>
<executable>
C:\WINDOWS\microsoft.net\Framework64\v3.5\MSBuild.exe
</executable>
<projectFile>Portal2.0.sln</projectFile>
<buildArgs>
/target:build;publish /p:Configuration=Release /p:MSBuildExtensionsPath=C:\Progra~2\MSBuild /p:MSBuildEmitSolution=1 /p:publishdir=C:\Deploy\Portal2.0Build /verbosity:diag
</buildArgs>
<logger>
C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MSBuild.dll
</logger>
</msbuild>
</tasks>
<labeller type="assemblyVersionLabeller">
<major>2</major>
<minor>0</minor>
<incrementOnFailure>false</incrementOnFailure>
</labeller>
<publishers>
<statistics />
<xmllogger />
<package>
<name>ZipFilePublish</name>
<compression>9</compression>
<always>false</always>
<flatten>false</flatten>
<baseDirectory>$(PublishDir)</baseDirectory>
<dynamicValues>
<replacementValue property="name">
<format>C:\Deploy\Builds\PortalBuild{0}.zip</format>
<parameters>
<namedValue name="$CCNetLabel" value="Default" />
</parameters>
</replacementValue>
</dynamicValues>
<files>
<file>*.*</file>
<file>**\*</file>
</files>
</package>
<email from="bla" mailhost="bla" port="25" userName="bla"
password="bla" includeDetails="TRUE" useSSL="FALSE">
<users>
<user name="User1" group="Portal" address=""/>
</users>
<groups>
<group name="Portal">
<notifications>
<notificationType>change</notificationType>
</notifications>
</group>
</groups>
</email>
</publishers>
</project>
最佳答案
第一条错误消息可能是由于CCNET服务未运行所致,因此Web仪表板无法与其连接。修复ccnet.config后,它应立即消失,以便服务开始运行。
第二个问题(“路径中的非法字符”;您似乎已经找出缺少的节点部分)是由msbuild/executable element引起的。 CC.NET似乎不喜欢空格,尤其是它的值中不包含换行符。更换:
<executable>
C:\WINDOWS\microsoft.net\Framework64\v3.5\MSBuild.exe
</executable>
和:
<executable>C:\WINDOWS\microsoft.net\Framework64\v3.5\MSBuild.exe</executable>
应该解决问题。
另一个提示:当您对ccnet.config文件的有效性存在疑问时,请尝试使用CCValidator.exe(位于CruiseControl.NET\server文件夹中)。它通常会很好地指出配置文件中有问题的部分(尽管“路径中的非法字符”问题不是这种情况-我必须注释掉配置的特定部分才能找到有问题的节点)。