Καλώς ορίσατε στο dotNETZone.gr - Σύνδεση | Εγγραφή | Βοήθεια

Sharepoint SP2 Installation Peculiarities

By now everyone has heard that the Sharepoint Server Service Pack 2 activates a 180-days trial timeout. Fortunately, this really minor problem (no-one is affected for the next 6 months) can be fixed easily followind the steps described in KB 971620. Or you can wait for the hotfix, which will probably come before the trial expires.

Other problems though, are not so minor. I run in the following problem when installing SP2 on a machine. The installation of the binaries finished without any problems. Then I run the Configuration Wizard which run without any problems - until the final step. That's when it crashed due to a "PostSetupConfigurationTaskException". The wizard dialog box pointed me to a PSCDiagnostics_XXXX.log that contained the rather cryptic line:

Final step in the wizard failed with:
- An exception of type Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException was thrown.  Additional exception information: Failed to upgrade SharePoint Products and Technologies

Obviously. Then I looked at the Upgrade.log in the Logs directory of the 12 hive.

[AssemblyReferenceFixUp] [3.0.4.0] [ERROR] [5/4/2009 12:07:14 PM]: Application Web Config for this IIS site (772645167) could not be found at C:\inetpub\wwwroot\wss\VirtualDirectories\36043\web.config.
[SPIisWebSiteWssSequence] [ERROR] [5/4/2009 12:07:14 PM]: Action 3.0.4.0 of Microsoft.SharePoint.Upgrade.SPIisWebSiteWssSequence failed.
[SPIisWebSiteWssSequence] [ERROR] [5/4/2009 12:07:14 PM]: Object reference not set to an instance of an object.
[SPIisWebSiteWssSequence] [ERROR] [5/4/2009 12:07:14 PM]:    at Microsoft.SharePoint.Upgrade.AssemblyReferenceFixUp.Upgrade()
   at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()

That's more like it. The configuration wizard found a site collection without a corresponding web.config. Checking the virtual directory and the site collection I found that it was an orphaned site collection. The site collection still appeard in the list of site collections, even though most of the files in the virtual directory were missing. The content database appeared empty in the Content Databasaes page, even though it contained data for multiple sites. Why did this happened? I am not certain. Perhaps a site collection delete job failed to finish. Perhaps there was some other problem.

The real problem though was that the code in SPIisWebSiteWssSequence failed to handle the error condition. The code in AssemblyReferenceFixUp correctly detected the missing file and probably return a null value instead of a reference to the config file. The code in SPIisWebSiteWssSequence though didn't check for null so tried to use the web.config file and crashed.

And then the error information was lost.

Obviously, the two modules, AssemblyReferenceFixUp  and SPIisWebSiteWssSequence , use different logging mechanisms. One of them uses the PSCDiagnostics log while the other uses the Upgrade log. The wizard only checks the PSCDiagnostics log (or the mechanism that writes to it) so it doesn't know about the error logged in Upgrade.Log.
As a result, the error message was lost and I had to dive into several logs to find it.

There are many ways to avoid such bugs. One is of course to check for nulls. The other is to use the same logging mechanism in all modules of an application. That's where logging libraries like Microsoft's own Enterprise Library or the open source log4net can really help.

Have fun!

Έχουν δημοσιευτεί Δευτέρα, 1 Ιουνίου 2009 7:28 μμ από το μέλος Παναγιώτης Καναβός
Δημοσίευση στην κατηγορία: ,

Ενημέρωση για Σχόλια

Αν θα θέλατε να λαμβάνετε ένα e-mail όταν γίνονται ανανεώσεις στο περιεχόμενο αυτής της δημοσίευσης, παρακαλούμε γίνετε συνδρομητής εδώ

Παραμείνετε ενήμεροι στα τελευταία σχόλια με την χρήση του αγαπημένου σας RSS Aggregator και συνδρομή στη Τροφοδοσία RSS με σχόλια

Σχόλια:

Χωρίς Σχόλια

Ποιά είναι η άποψή σας για την παραπάνω δημοσίευση;

(απαιτούμενο)
απαιτούμενο
(απαιτούμενο)
ÅéóÜãåôå ôïí êùäéêü:
CAPTCHA Image