Problem connecting to Fortress from CCNet

If you are having a problem using Fortress, post a message here.

Moderator: SourceGear

Post Reply
jbrinkman
Posts: 5
Joined: Sat Jan 31, 2009 1:18 pm

Problem connecting to Fortress from CCNet

Post by jbrinkman » Sat Jan 31, 2009 1:54 pm

In the process of upgrading our servers from Vault to Fortress 1.1.4 we broke our CCNet integration. In order to get things back up and running I have setup a new CCNet configuration on my local machine using CCNet 1.4.2 and the latest CCNetPlugin that I downloaded from SourceGear.

I have configured a project to read my CCNet project from Fortress

Code: Select all

	<project name="cc-config" queue="Q1" queuePriority="1">
		<category>Administration</category>
		<workingDirectory>d:\Program Files\CruiseControl.NET\server\config</workingDirectory>
		<artifactDirectory>D:\CCNet_Builds\cc-config\Artifacts</artifactDirectory>
		<triggers>
			<intervalTrigger seconds="30" />
		</triggers>
		<sourcecontrol type="fortressplugin" autoGetSource="true" >
			<username>CCNet</username>
			<password>*********</password>
			<host>source.dotnetnuke.com</host>
			<repository>CI_Config</repository>
			<folder>$/Config</folder>
			<useWorkingDirectory>true</useWorkingDirectory>
			<workingDirectory>d:\Program Files\CruiseControl.NET\server\config</workingDirectory>
		</sourcecontrol>
	</project>
Whenever this project runs I end up with the following lines in my CCNet log:

2009-01-31 14:07:41,923 [cc-config:INFO] Project: 'cc-config' is added to queue: 'Q1' in position 0.
2009-01-31 14:07:42,023 [cc-config:INFO] Project: 'cc-config' is first in queue: 'Q1' and shall start integration.
2009-01-31 14:07:42,023 [cc-config:DEBUG] In FortressVaultSourceControl.GetModifications()
2009-01-31 14:07:42,199 [cc-config:DEBUG] Refresh() successful.
2009-01-31 14:07:42,200 [cc-config:ERROR] INTERNAL ERROR: Object reference not set to an instance of an object.
----------
System.NullReferenceException: Object reference not set to an instance of an object.
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.FortressClient.GetCurrentFolderVersion(String repositoryFolderPath)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.FortressVaultSourceControl.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl sourceControl, IIntegrationResult lastBuild, IIntegrationResult thisBuild)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)
at ThoughtWorks.CruiseControl.Core.Project.Integrate(IntegrationRequest request)
at ThoughtWorks.CruiseControl.Core.ProjectIntegrator.Integrate()
at ThoughtWorks.CruiseControl.Core.ProjectIntegrator.Run()
----------

Until I can get past this error I am at a dead-end

shannon

Re: Problem connecting to Fortress from CCNet

Post by shannon » Mon Feb 02, 2009 9:44 am

Try downloading the 1.1.3 version (you can get it here: http://www.sourcegear.com/fortress/downloads2.html ). Restart CCNet, do you get the same error?

shannon

Re: Problem connecting to Fortress from CCNet

Post by shannon » Mon Feb 02, 2009 10:22 am

Is there a Cc-config.fortressState file in the server directory? The contents should look something like this:

<?xml version="1.0" encoding="utf-16"?>
<ArrayOfFortressState xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<FortressState>
<Project>cc-config</Project>
<Folder>$/Config</Folder>
<FolderVersion>1</FolderVersion>
<LastSuccessfulFolderVersion>1</LastSuccessfulFolderVersion>
</FortressState>
</ArrayOfFortressState>

This is a file we create. If it isn't there, try creating it, just give it the contents above, and then restart CC.Net again.

jbrinkman
Posts: 5
Joined: Sat Jan 31, 2009 1:18 pm

Re: Problem connecting to Fortress from CCNet

Post by jbrinkman » Mon Feb 02, 2009 11:09 am

I am in the middle of testing 1.1.3. Once I pointed the config to my local 1.1.3 install, it seemed to login and download config file without problem

2009-02-02 12:03:46,773 [cc-config:INFO] Project: 'cc-config' is added to queue: 'Q1' in position 0.
2009-02-02 12:03:46,877 [cc-config:INFO] Project: 'cc-config' is first in queue: 'Q1' and shall start integration.
2009-02-02 12:03:47,378 [cc-config:DEBUG] In FortressVaultSourceControl.GetModifications()
2009-02-02 12:03:47,380 [cc-config:DEBUG] In FortressVaultSourceControl.LoadState()
2009-02-02 12:03:47,625 [cc-config:DEBUG] Successfully loaded state. Last integrated folder version was 1. Last successfully integrated folder version was 1.
2009-02-02 12:04:10,492 [cc-config:INFO] Succesfully logged into Fortress server joedesktop
2009-02-02 12:04:10,836 [cc-config:DEBUG] Refresh() successful.
2009-02-02 12:04:10,839 [cc-config:DEBUG] Current folder version is 2. Last integrated folder version was 1.
2009-02-02 12:04:10,839 [cc-config:DEBUG] Querying server for modifications between versions 1 and 2.
2009-02-02 12:04:11,201 [cc-config:DEBUG] Parsing Fortress history.
2009-02-02 12:04:11,202 [cc-config:DEBUG] Done parsing Fortress history.
2009-02-02 12:04:11,213 [cc-config:DEBUG] Successfully saved state for project cc-config. Last integrated folder version was 2. Last successfully integrated folder version was 1.
2009-02-02 12:04:11,214 [cc-config:INFO] 1 modification detected.
2009-02-02 12:04:11,215 [cc-config:INFO] Building: IntervalTrigger triggered a build (IfModificationExists)
2009-02-02 12:04:11,222 [cc-config:DEBUG] In FortressVaultSourceControl.GetSource()
2009-02-02 12:04:11,229 [cc-config:INFO] Getting source from Fortress
2009-02-02 12:04:11,699 [cc-config:INFO] Fetched $/Config/ccnet.config
2009-02-02 12:04:11,716 [cc-config:DEBUG] In FortressVaultSourceControl.LabelSourceControl()
2009-02-02 12:04:11,720 [cc-config:DEBUG] Successfully saved state for project cc-config. Last integrated folder version was 2. Last successfully integrated folder version was 2.
2009-02-02 12:04:11,760 [cc-config:INFO] Integration complete: Success - 2/2/2009 12:04:11 PM
2009-02-02 12:04:36,680 [18164:INFO] Config file modification detected for D:\Program Files\CruiseControl.NET\server\config\ccnet.config
2009-02-02 12:04:36,681 [18164:INFO] Configuration changed: Restarting CruiseControl.NET Server
2009-02-02 12:04:36,681 [18164:INFO] Reading configuration file "D:\Program Files\CruiseControl.NET\server\config\ccnet.config".

The FortressState file did not exist before but is there now.

shannon

Re: Problem connecting to Fortress from CCNet

Post by shannon » Mon Feb 02, 2009 11:13 am

Ok, good. You can either stick with 1.1.3 for now or go back to 1.1.4. I think now that the state file exists, 1.1.4 shouldn't give you any problems. I'll look into why it was failing to create the state file though.

jbrinkman
Posts: 5
Joined: Sat Jan 31, 2009 1:18 pm

Re: Problem connecting to Fortress from CCNet

Post by jbrinkman » Mon Feb 02, 2009 11:23 am

Shifting back to 1.1.4 causes the error to immediately return. My testing on 1.1.3 was done on a local version of the server. Also, our production server is running 1.1.4, how would I go about reverting it to 1.1.3?

shannon

Re: Problem connecting to Fortress from CCNet

Post by shannon » Mon Feb 02, 2009 11:36 am

That's interesting. Just replace the 1.1.4 dlls in the server directory with the 1.1.3 version and restart CC.Net.

jbrinkman
Posts: 5
Joined: Sat Jan 31, 2009 1:18 pm

Re: Problem connecting to Fortress from CCNet

Post by jbrinkman » Mon Feb 02, 2009 11:59 am

OK. I misunderstood your earlier statements and installed 1.1.3 FORTRESS SERVER. I didn't realize you were talking about the CCNet plugin. I'll try that with our 1.1.4 server and see if that helps.

shannon

Re: Problem connecting to Fortress from CCNet

Post by shannon » Mon Feb 02, 2009 12:29 pm

Oh, I'm sorry, I should have been more clear on that.

jbrinkman
Posts: 5
Joined: Sat Jan 31, 2009 1:18 pm

Re: Problem connecting to Fortress from CCNet

Post by jbrinkman » Mon Feb 02, 2009 1:56 pm

OK. Went back through and uninstalled/reinstalled CCNet. Installed 1.1.3 plugin and had issues. After some thought decided to give permissions to the folders to the AppPool account under which CCNet was running. This seemed to resolve the problem. Upgraded to 1.1.4 and it is now working as well. Clearly the plugin could use some better error handling rather than a simple NullReferenceException which doesn't really tell anyone what the real problem might be. What is more confusing is that state files were created just fine. New folders were created just fine, but checking out a file would cause the permission issue above.

shannon

Re: Problem connecting to Fortress from CCNet

Post by shannon » Mon Feb 02, 2009 2:09 pm

Perhaps CC.Net already had permissions to the server folder (that's where it puts state files and logs, after all), but not correct permissions to the lower folders where we were putting the real files. Sorry for the trouble, but I'm glad you've got it worked out now.

Post Reply