Tuesday, May 8, 2007

Next, wrestling my router to the ground

Another step towards victory.

After getting SharePoint 2003 nice and cozy on my server, I decided to upgrade to the latest, greatest version, 3.0. Woe is me.

I ran the installation, and it hit a couple of minor glitches, but ended up working OK. hen I ran the configuration wizard. Uh oh. It was a 12 step process, and it crudded out on step 10 every time.

I looked at the logs: NullReferenceException. Every time. The logs also contained the trace of where the problems occurred, in great detail. Helpful? Maybe, but probably not so much.Plus, it's a huge file because the SharePoint setup logging is quite verbose.

03/2007 14:15:38 11 INF Retrieved the content service and content service instance, now enum the web applications to see if there is a match with template STS
05/03/2007 14:15:38 11 INF Site with uri http://myurlhere.com/ and port 80 and template STS could not be found
05/03/2007 14:15:38 11 INF The site http://myurlhere.com could not be found in the Web application SPWebApplication Name=MY URL HERE Parent=SPWebService.
05/03/2007 14:15:38 11 INF Site with uri http://cynicor.com/ and port 80 and template STS could not be found
05/03/2007 14:15:38 11 INF The site http://cynicor.com could not be found in the Web application SPWebApplication Name=Cynicor Parent=SPWebService.
05/03/2007 14:15:38 11 INF Cannot find a site matching template STS
05/03/2007 14:15:38 11 INF Leaving function SPEvaluatorModeProvisioning.TryGetIsSiteProvisioned
05/03/2007 14:15:38 11 INF Leaving function SPEvaluatorModeProvisioner.IsProvisioned
05/03/2007 14:15:38 11 INF The default site url is http://myserver/, port 80
05/03/2007 14:15:38 11 INF The owner account for the default site is mydomain\administrator
05/03/2007 14:15:43 11 INF The owner email for the default site is someone@example.com
05/03/2007 14:15:43 11 INF The db server for the default site is myserver\Microsoft##SSEE
05/03/2007 14:15:48 11 ERR Task evalprovision has failed with an unknown exception
05/03/2007 14:15:48 11 ERR Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.Administration.SPConfigurationDatabase.CreateSite(SPWebApplication application, SPContentDatabase database, String originalPath, Guid id, Pairing pairing, Uri redirectUri, Boolean useHostHeaderAsSiteName, Boolean bypassExistingSiteCheck) at Microsoft.SharePoint.Administration.SPConfigurationDatabase.CreateSite(SPWebApplication application, SPContentDatabase database, String path, Boolean useHostHeaderAsSiteName) at Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPContentDatabase database, String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail, String secondaryContactLogin, String secondaryContactName, String secondaryContactEmail, String quotaTemplate, String sscRootWebUrl, Boolean useHostHeaderAsSiteName) at Microsoft.SharePoint.Administration.SPSiteCollection.Add(String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail, String secondaryContactLogin, String secondaryContactName, String secondaryContactEmail, Boolean useHostHeaderAsSiteName) at Microsoft.SharePoint.Administration.SPSiteCollection.Add(String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail, String secondaryContactLogin, String secondaryContactName, String secondaryContactEmail) at Microsoft.SharePoint.Administration.SPSiteCollection.Add(String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail) at Microsoft.SharePoint.SPEvaluatorModeProvisioner.Provision() at Microsoft.SharePoint.PostSetupConfiguration.EvalModeProvisionTask.EvalProvision() at Microsoft.SharePoint.PostSetupConfiguration.EvalModeProvisionTask.Run() at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

What could be causing this? I had no idea, but staring at the log for a few minutes made a light go off: my router was failing me. It was obvious!

A couple of years ago, I got a Belkin router/wireless station. It worked decently, and had a nice Web interface that let me set up everything I needed. However, it wouldn't let me get to my own sites by name. If I went to www.cynicor.com from inside the firewall, it would redirect me to the router's administration page.

I finally figured out that there WAS no way to repair this problem. Any request coming from inside the network would go out to the router, who would figure out that it was coming from inside the network and redirect port 80 calls to the router. I asked Belkin what to do. They said "just set your Web site up to use a different port, or call it by IP address internally." The problem with configuring that is that I have multiple domains that live on my server, and calling by internal IP won't allow Windows Server 2003 to filter the requests by header.

I wrote back to Belkin and asked if I could change the admin port on the router. They said no, and I would need a router with port address translation to make this work. Instead, I bought a LinkSys router at Best Buy. The LinkSys router lets you change the administration port it uses, and it defaults to 8080. This solved my port 80 problem! Now to test SharePoint.

I ran the configuration utility again, and it worked like a champ. No more exceptions. I went to bed and slept like a baby.

When I got into work the next day, I wanted to look at the server a bit more, so I tried to use Remote Desktop to get in. Oops, I'd forgotten to open that port. On the Belkin, I foolishly set the server to be the DMZ, which allowed port 3389 (and everything else) to pass through. I had enabled remote administration on the router last night, so I was able to access the port settings from work, through port 8080. Two minutes, a couple of clicks, and I was RDCing again.

2 comments:

Dara said...

I know there's no direct codebase link, but honestly, sometimes you can really see a direct line from VAX VMS to NT-derived server code output. Damn.

mrs david feher said...

Hey Josh! Are you still writing a blog? Let me know!