Thursday, December 6, 2012

Error Failed to Connect to the Configuration Database: An Exception of Type System.ArgumentNullException Was Thrown. Additional Exception Information: Value Cannot Be Null Parameter Name: Service.

So, here we are trying to expand the SharePoint 2010 farm a bit. The farm is comprised of one or more VM sitting in an elaborate VMware infrastructure and a few physical servers hosting the databases. So the VM hosting the application services for SharePoint 2010 is kinda slow, so, decided to add a new one and yank the slow one out, or perhaps even leave both of them in there, y'know how cool it is for us to have more servers doing stuff, good for my ego.

And after going through the harrowing experience of missing locally and missing in xxxx servers and yyyy servers, and other annoying language pack issues, the box was finally ready. So, I fired up the SharePoint 2010 Products Configuration Wizard of Oz, and got this along the way, just the very first steps really:

error failed to connect to the configuration database: an exception of type system.argumentnullexception was thrown. additional exception information: value cannot be null parameter name: service.

Familiar it seems. Of course the error is not familiar, but getting errors from SharePoint is like our thing. I mean if you don't get any you begin to wonder am I doing things right? Kidding.

So, how do we resolve this?
Create an alias on the server for the SQL client. For some reason this was just the solution.
And to do that:

SQL Alias is something which you may have to create when you’re moving your database server. I had a requirement to move from an old database server to new one  and as a part of the migration had to create SQL Alias. This is how you create it.

You will have to create SQL Alias on each web front and application server of SharePoint.

Click on Start > Run and Type cliconfg
Click on Ok
Now enable TCP/IP Protocol.
Select TCP/IP and Click on Enable

Click on Alias Tab
Click on Add
Select TCP/IP from Network Libraries
And enter the old database server name in Server Alias
And set the Server Name to New Database Server Name
Click Ok

An Exception of Type System.Reflection.TargetInvocationException was Thrown

From the stables of SharePoint 2007 error-laden blockbuster features, comes another mysterious and annoying error, *drum roll*special effects*camera upclose*camera drawback*more Star War effects*

An exception of type System.Reflection.TargetInvocationException was thrown. Additional exception information: Exception has been thrown by the target of an invocation.

Sounds like something from FRINGE.
This happens when you try to join a new server to a farm. And that is after you have battled the infamous installcheck which returned like 80 language packs problem, 120+ missing locally problem and the rest of the evil minions from SharePain hell.

So, what do we do? How do we resolve?

You won't believe this. It's your NTFS drive letter causing this. Crazy!
Just to be sure, open your ULS log file in the APPLICATION server and do a search for directory name you entered is invalid.

If this returns a series of results (best if you use Notepad++) then that is the problem. What to do is take a look at the drive letter convention in your machines, and ensure your new server is consistent with the drive letters. So, if your APPLICATION server has C, D, E, F drives, ensure your new machine is named the same way. When done, re-run the Configuration Wizard again, and you should be fine.

Wednesday, October 17, 2012

SHAREPOINT 2010 ERROR: "Cannot start service SPAdminV4 on computer '.'." error on SharePoint configuration wizard

It always repeats itself! Jeez!! Why!! Arrrrggghhhhhhh!!!
We can't run away from it. We can only hope 20 years up the line from now that SharePoint will stop giving us hair-tearing problems for no apparent known reason. I mean we are just on our own thinking everything is fine and we get that problem that almost makes you feel like you really don't know this thingy.

Let me let you in on the back story. I have this development server was just fine and good. Then I travelled on a vacation that was really long and sweet, and I basically returned with a little more flesh around my middle region. I mean, that means I had a groovy vacation. Ok, I'm sorry, I lied. It wasn't really a vacation, it was an official assignment that felts so good just like a vacation. I still remember the good times of it even now.

So, here I am, and then my boss says, "Hey James, um, please can you kindly send me the URL for the development server Central Admin?" So, just before I send it, I figured, um, let me just check it before sending it on, pretty normal cyclic redundancy check (crc) of every geek's brain, right? Well, it took forever, and it never came up, and after what feels like eternity, I get a pop-up asking me to setup central admin by running Configuration Wizard. I went like "What!" And then I checked some stuffs and I finally had to do the unthinkable, configure again. Well, it just went from fail, fail, to more fails and fails. Then I get this log entries and messages that's the title of this blog.

This entry is for those environments with the June 2012 CU for SharePoint 2012.  This patch causes CRL (Certificate Revocation List) checks to be enforced, which in turn affects some native functionality of SharePoint AdminV4 service. 
When running the SharePoint Product Configuration Wizard, the configuration will fail with the following error:

Failed to create the configuration database.
An exception of type System.InvalidOperationException was thrown.  Additional exception information: Cannot start service SPAdminV4 on computer '.'.

In order to bypass the CRL Check for SPAdminV4 service start-up, the following steps need to be completed on each SharePoint server.
·         Add a new computer policy which alters the options for retrieving certificate validation on a network
·         Add host file entries into the local computer host file

To do this:

  • Click on Start-Run
  • Type in "gpedit.msc" and click "OK"
  • Expand Computer Configuration --> Windows Settings --> Security Settings --> Public Key Policies
  • In the Public Key Policy window displayed on the right pane, double-click "Certificate Path Validation Settings"

  • Click on the "Network Retrieval" tab
  • Check the box "Define these policy settings"
  • Uncheck "Automatically update certificates in the Microsoft Root Certificate Program (recommended)" and "Allow issuer certificate (AIA) retrieval during path validation (recommended"
  • Click on "OK"

·         Close out of gpedit.msc console.

·         Click on Start --> Run
·         Type in "C:\Windows\System32\Drivers\Etc" and click "OK"
·         Double-click the file "Hosts"
·         Select "Notepad" as the program to open the file
·         Insert the following lines into the hosts file

Save file and exit notepad (you may encounter a little problem here saving the host file depending on your system's security hardness, a good way if you cant save the host file back to the ETC folder is to copy it out from the secure path to your desktop, modify it as it is and copy it back to overwrite the original). If you have gone this far in SharePoint, that shouldn't be a problem to you, it's pretty simple to workaround.
Problem solved.

Wednesday, September 26, 2012

“The install in progress conflicts with a previously installed Microsoft Office 2010 Server product”

SharePoint 2010 is fun. SharePoint 2010 is easy. I mean, for example, years back working with Windows operating system installation was a arduous task. Deep blue screen, white lettered alphabets, few instructions, shortcut keys to answer either YES, NO, CANCEL, PRESS ANY KEY TO CONTINUE, and the corrupt dll files all plagued us till Win2k3. And then came Vista with the easiest ungeeky method of installation, and same for Win2k8. In the SharePoint side of things, it started off as easy in WSS until MOSS 2007 came into the picture and it was all a picture of Hiroshima and Nagasaki all afresh. Now we breathe some air of relief with SharePoint 2010 configurations made easy in one simple Wizard screen. If we thought it was over, we were all probably not very right.

This is one of the reasons I believe that there will never really be a renegade robot or software that will take over the world, Sarah Connor can go about a normal life.

With SharePoint 2010, installing, uninstalling, reinstalling, re-uninstalling is just so tempting at the slightest thought of problem. But you will get bitten a few times. Language Packs is one. Office Web Access is another. These guys can ruin your 5 minutes eternal coffee time.
Here is one example, see the screenshot:

I just yanked off an installation because someone in the team downloaded a custom code, and installed it in my dev environment. This killed my Central Admin one time. Every other site was working except my CA. SharePoint 2010 is tempting. I figured rather than looking for the problem, yank it off and reinstall after a proper backup. So, I uninstalled. I began re-installing and just after the product key page I got this.

This particular problem is caused by Language Pack. I had installed a French language pack because half my users are French speaking. So you can imagine.

1. Stop the installation.
2. Go to Control Panel --> Programs and Features
3. Identify the language pack for SharePoint
4. Uninstall
5. Reboot

Now you can proceed to install your SharePoint.

Friday, September 21, 2012

An Unhandled Exception '' Occurred in OWSTIMER.EXE

I have this really slow and annoying SharePoint 2010 development server, bumped Visual Studio 2010 into it. Great idea it seemed then. Well, it still seems still in my eyes. Then, I had some application services not starting and just getting lost in limbo for like forever. So, I re-installed the SharePoint 2010. Them one of my content databases refused to mount because of schema difference. So, I decided to install the March 2012 cumulative update ( which took eternity, and even so now is still in eternity, and intermittently between these two eternities I have gotten this error like forever (see screenshot):

If this error was coming up perhaps when running some of my custom codes, and this debug suggestion comes up, then no problems, I can proceed and debug. Visual Studio is trying to help us out with an unhandled exception by asking about launching debug.  That’s all well and good but I didn’t write the SharePoint code or the cumulative update code and so I have no plans to change it. So for as often as it pops up, is the same number of times you tell it to get da hell outta da way... :) :)
However, one way to work with this is to disable the JIT (Just-In-time Debugger) by following a few simple Registry Key changes: