Task configdb has failed with an unknown exception. (WSS v3.0)
I had a problem at work yesterday. We were trying to get WSS v3.0 installed onto a server, and it just wouldn't take. I finally got it working though, with no thanks to google, so I thought I'd blog it in case anyone else hits the same problem.
First, a server description. I was installing onto a server that was setup as such:
- Windows 2003.
- Running as a virtual machine in Virtual Server 2005 R2.
- Joined to a real domain (DEV).
- I was remoting in using a domain account that was a member of the local administrators group.
- When it failed that way, I started again by remoting in as the local administrator.
- WSS was being installed standalone, not as a farm (so it was basic install, not advanced).
The prerequisites were installed (Application Server Role - which means IIS 6.0 with ASP.net 2.0 enabled, .Net 3.0). Due to the beauty of undo disks in virtual server, when things went bad, I was able to roll back and try again without having gunk left around by uninstalls.
No matter what I did, WSS would install, but then the configuration wizard would fail setting everything up - it said there were 10 tasks to perform, and would die on task 2 every single time I tried. The log file shows this:
01/10/2007 12:46:47 8 ERR Task configdb has failed with an unknown exception
01/10/2007 12:46:47 8 ERR Exception: System.Data.SqlClient.SqlException: Cannot open database "SharePoint_AdminContent_f368d327-8470-450c-a76f-5a9aad430a19" requested by the login. The login failed.
Login failed for user 'LOCALMACHINE\Administrator'.
(I changed the computer name from it's real name to LOCALMACHINE to protect the guilty).
Along with this info int he log file it would be followed by a whole heap of stack trace information and stuff, none of which was helpful to me.
So to me it was looking like (assuming a lot of stuff based on reading the log file) it was trying to connect to the database so that it could create the stuff needed for the first time. It was using NTLM auth under the current user to connect to the DB, and for some reason that was failing.
A lot of research later (and knowing that undo disks would save me if I stuffed anything up), I dropped into a command shell and did this:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>psconfig -cmd configdb -create
You can specify things like the server name, database to use, user name and password, but leaving them unspecified uses localhost with the current user.
And it worked.
Restarting the configuration wizard let it continue on past that point, and when it was done I had a working sharepoint site.
Sounds simple, but it took me a few hours to figure out :) I'm happy to have got past the problem, but it's still annoying that I have absolutely no idea WHY this problem was happening. There must have been something special going on that stopped it from working within the configuration wizard - my best guess is that it was caused by remoting in rather than sitting in front of the console, but I can't prove it (since it's a VM I CAN'T sit at the console :)