9

I am setting up CruiseControl.NET and I get the following error message on the webdashboard:

No connection could be made because the target machine actively refused it 127.0.0.1:21234

The Url it is looking for is: tcp://localhost:21234/CruiseManager.rem
However the ccnet website in IIS has its tcp port set to 82.
So I use the following Url to navigate to the webdashboard http://127.0.0.1:82/ccnet/ViewFarmReport.aspx

I tried changing the Tcp port in IIS to 21234 and I get the following error message on the webdashboard:

Tcp channel protocol violation: expecting preamble.

I have also tried opening the port with the following command:

netsh firewall add portopening TCP 21234 CCNET

When I try and start the CCNET service I get the following message

The CruiseControl.NET Server service started then stopped. Some services stop automatically if they have no work to do....

Can anyone help me with this problem please?

EDIT - Adding config file

<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>  

shane87
  • 3,090
  • 12
  • 51
  • 65

7 Answers7

17

The first error message is probably caused by CCNET service not running because of which the web dashboard can't connect to it. It should go away as soon as you fix the ccnet.config so that service starts running.

The second problem ("Ilegal characters in path"; you seem to have already figured out the missing nodes part) is caused by msbuild/executable element. It seems that CC.NET doesn't like whitespace and especially new line characters inside it's value. Replacing:

<executable>                                                      
    C:\WINDOWS\microsoft.net\Framework64\v3.5\MSBuild.exe
</executable> 

with:

<executable>C:\WINDOWS\microsoft.net\Framework64\v3.5\MSBuild.exe</executable> 

should fix the problem.

Another hint: when you're having problems with the validity of your ccnet.config file, try using CCValidator.exe (it's in your CruiseControl.NET\server folder). It usually points out the problematic part of the config file quite nicely (although that wasn't the case with "Illegal characters in path" problem - I had to comment out specific parts of the config to find the offending node).

Damir Arh
  • 17,637
  • 2
  • 45
  • 83
  • 1
    Removing the quotes ("") from the paths inside the tags fixed it for me. Thank you for putting me on the right track towards the location of the error! – Ruslan Nov 26 '12 at 16:34
0

In my case I misprinted project configuration file name in ccnet.config instead of timescheduler.config it were timesheduler. When I fixed file name I was able to run ccnet service.

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">     
    <cb:include href="definitions.xml" xmlns:cb="urn:ccnet.config.builder"/> 
    <cb:include href="projects/timescheduler.config" xmlns:cb="urn:ccnet.config.builder"/>
</cruisecontrol>
Madman
  • 3,171
  • 2
  • 32
  • 44
0

The first message you receive (connection actively refused) makes me think of a firewall which is blocking the port you're using.

The second problem could be anything. It could for instance be an error in your XML configuration (ccnet.config) file. Can you find any pointers in the Windows Eventlog ?

Frederik Gheysels
  • 56,135
  • 11
  • 101
  • 154
  • I found an error in my ccnet.config file however I do not know how to fix it. - [CCNet Server:ERROR] Exception: Unable to instantiate CruiseControl projects from configuration document. Configuration document is likely missing Xml nodes required for properly populating CruiseControl co nfiguration. Missing Xml node (packageList) for required member (ThoughtWorks.CruiseControl.Core.Publishers.Packa gePublisher.PackageList) - I tried adding a package list node but im still getting errors then. any help? – shane87 Mar 30 '11 at 11:08
0

Regarding the 2nd problem: did you try to run the CC.NET server from the command line?
If you've got an error in your XML configuration, this will give you a more meaningful error message. Which account are you using to run the Windows service?

Frank Schmitt
  • 30,195
  • 12
  • 73
  • 107
  • I ran CC.NET from command line and got the following error:[CCNet Server:ERROR] Exception: Unable to instantiate CruiseControl projects from configuration document. Configuration document is likely missing Xml nodes required for properly populating CruiseControl co nfiguration. Missing Xml node (packageList) for required member (ThoughtWorks.CruiseControl.Core.Publishers.Packa gePublisher.PackageList). – shane87 Mar 30 '11 at 10:47
0

Have you checked your ccnet's dashboard.config file? It has the following line in it:

<server name="local" url="tcp://localhost:21234/CruiseManager.rem" ... />

Try changing the port on that to 82 and then restarting the website (you should be just able to add a space to the web.config file and save and IIS will restart the website).

Pondidum
  • 11,457
  • 8
  • 50
  • 69
  • after switching to port 82 here i get the "Tcp channel protocol violation: expecting preamble." error again. there seems to be a problem in my ccnet.config file though as i get the following error when running cc.net from command line Exception: Unable to instantiate CruiseControl projects from configuration document. Configuration document is likely missing Xml nodes required for properly populating CruiseControl co nfiguration. Missing Xml node (packageList) for required member (ThoughtWorks.CruiseControl.Core.Publishers.Packa gePublisher.PackageList) – shane87 Mar 30 '11 at 10:55
0

Sounds like you're confusing two different functions:

tcp://localhost:21234

This is the default remoting port for clients like CCTray. This is not used for the IIS web site (dashboard).

Configuration document is likely missing Xml nodes required for properly populating CruiseControl co nfiguration. Missing Xml node (packageList) for required member (ThoughtWorks.CruiseControl.Core.Publishers.Package Publisher.PackageList)

Your example config is missing required packageList node.

si618
  • 16,580
  • 12
  • 67
  • 84
  • I have added the packageList node and now get the following error: Internal validation failed for project'project1': Ilegal characters in path – shane87 Mar 30 '11 at 12:57
  • Just a guess: Perhaps CC.Net doesn't like the brackets ('(', ')') in your paths. Try using the short paths (C:\Progra~1\...) instead. – Frank Schmitt Mar 30 '11 at 14:22
0

A misleading error message. The port really is 21234, not 82. I got the same errors. The fix was to start ccnet.exe from the desktop shortcut to discover that the real problem was illegal code in my ccnet.config file.

After fixing the ccnet.config file, the problem moved on. When attempting to build, the system would not let the subversion client modify the read-only marker files in the checked out repo.

user1040323
  • 481
  • 4
  • 11