This page last changed on Apr 14, 2005 by orogers.
CCService is a Windows Service that can be used to launch the CCNet server.
If you used the CruiseControl.NET Installer to setup CCNet on your machine, the CCNet service should already be configured. Look in the Services section of the Control Panel on your machine. Otherwise, use these instructions to setup the service manually:
- Before starting to use CCService, make sure that everything is set up and configured correctly using the console executable ccnet.exe . It is considerably easier to debug configuration issues using the console version of CCNet than it is using CCService. The console version of CCNet writes its output directly to the console window, so it is much easier to see what the server is doing. CCService, by default, uses the Event Log and the ccnet.log instead.
- Once you have ascertained that the CCNet server is working, you need to start by configuring CCService. If you open the ccnet.service.exe.config file, you need to change the value of the ccnet.config setting to point to the location of your ccnet.config file.
- Now you are ready to install the service. Installing a Windows Service under .NET requires using installutil. Open up a command prompt, change to the CruiseControl.NET server directory, and run installutil ccservice.exe. If installutil is not in your path, you should be able to locate it in something like %SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322.
- At the username/password prompt, login using a valid user account. By default, the dialog tries to login as a local user account. If you are logging in as a domain user, the domain will have to be specified. (ie: firstname.lastname@example.org, pw: mypassword, and confirm)
- Note: Your user account may need to be granted the "Right to Login as a Service". This may be accomplished in two ways. The easiest method is to select a service that currently uses "Local System Account", and using a specific user account instead. If necessary, the permissions will be granted automatically. Another method is through the Administrative Tools -> Local Security Policy -> Local Policies -> User Rights Assignment -> Log on as a Service.
- Whatever user that you select needs to have the necessary permissions to access all resources required by CCNet (including network shares). The LocalSystem user may not have sufficient access.
- Check the EventLog to verify that CCNet output is written there. You may want to change the CruiseControlSwitch level to reduce the verbosity of the messages to prevent the EventLog from filling.
- Does CCService show up in the Services Management Console window? (in Adminstrative Tools under the Start menu)
- Does the service show as "Started" in the Services Management Console window? Is it set to start up automatically when you restart the machine?
- Are there any new messages in the ccnet.log file or in the Event Log?
- Does the CCService user have sufficient priviledges to access all resources required by the CCNet server. For example, if your source control system is stored on another server, does the user have permissions to access this server? (odds are that the LocalSystem user won't)
- If you are using Visual SourceSafe, does the user account have the SSDIR environment variable defined? If not, you should explicitly set the SsDir element in your ccnet.config file.
- Does the user account have registry access? Can it access the email system (if you are sending the build results by email? Can it run Visual Studio.NET if you are using the Visual Studio Task?
- Does your build user graphical elements of the .NET Framework? If so, you'll need to configure your service to have appropriate resources.
- Are any environment variables required by the build process accessible to the CCService user? If they are user level environment variables then you will need to ensure that they have been set up for the CCService user.
- If CCTray does not connect to the server, it may be that the CCService user does not have sufficient permissions to accept incoming tcp/http connections.
You can change the service name so that you can run multiple instances of CCService on the same machine.
You can uninstall CCService by using the Add/Remove Programs uninstaller (if you installed CCNet via the MSI installer); however this will completely uninstall CCNet. To only uninstall CCService, open a new VisualStudio.NET command prompt and run installutil ccservice.exe /u in the directory containing the CCNet server. If you have multiple instances of CCService installed, you can use the "/ServiceName" switch to specify which instance to uninstall.
- First, you need to create a copy of the server folder. Copy the folder contents to a new location.
- Second, navigate to the new folder and open the ccservice.exe.config file in a text editor. Edit the service.name element in the appSettings section. The default name is CCService, so you should change it to something different.
- You should also change the remoting configuration section for the new service instance. Specifically you should change the port for the new instance. If you don't change this then the new service will try and use the same port as the existing service.
- Finally, you need to install a second instance of the ccservice. When you run installutil include the option switch "/ServiceName=MyCCService* (replace MyCCService with the name of the service that you specified in the ccservice.exe.config above).
You can use this line with both (WinXP and Win2000)
Posted by email@example.com at Aug 18, 2004 14:22