Andrew Davidson's Blog

Bugs? There are no bugs here - only hidden features...

Problems starting the User Profile Synchronisation Service on Servers prepared from VMware templates

At a recent installation engagement a colleague and I were (un)fortunate to come across provisioned servers in a VMware environment. We installed SharePoint 2010 quite happily and were configuring until we came to the User Profile Service. No matter what we appeared to try the service would refuse to start. After much hunting around we found out that the User Profile service relies on the Microsoft Distributed Transaction Co-Ordinator to work.

Each servers’ MSDTC has its own unique ID so that the two different end of a conversation know who is who. Now with a VMware prepared server those two ID’s are the same. No amount of preparing the server alters this.

How do we find out that we have duplicate ID’s?

First, download a copy of DTCPING from MS. Currently here:

Now run a copy of DTCPing on SERVER A and run up another copy on SERVER B

Initiate a ping from A to B

If you have a duplicate ID there will be an error message in the ping results saying so.

How do we correct the problem?

On each server in the conversation run the following commands from an Administrator-elevated command prompt

msdtc –uninstall

Now reboot both servers


msdtc –install

Retest the ping and you should now have unique ids

Starting the Document Conversion and Load Balancer Service and Document Conversion Launcher Service on SharePoint 2010 using PowerShell

During my training in SharePoint I’ve been tasked with scripting an install of SharePoint. I know that there are other installers out there, but I wanted to learn as much as I could about installing it the ‘hard’ way. I had most of my 2 server farm installed and working without touching the GUI once. (Well OK, just once – but I haven’t worked my way around that yet!)

In all of the Installer routines I found on the internet there wasn’t one that documented starting the pair of Document Conversion… services. So I had a try myself. Starting the first service, the Document Conversions Load Balancer Service wasn’t too hard. I simply issued*

Start-SPServiceInstance -Identity (Get-SPServiceInstance | where 
{$_.TypeName -eq "Document Conversions Load Balancer Service" -and $_.Parent.Name -eq “{servername}”})

* I know there is probably a simpler way of doing this but I'm new to this

Easy. So I thought it would be great to just start the other service in the same kind of way. So I tried. Great! The service started, but when I checked the settings I discovered that the Load Balancer property wasn’t set.

So, how do I set that property? Well I had a hunt around the internet and couldn’t find much, but I did find another soul out there with a similar problem, so similar in fact he inspired me to find my answer. His post showed me that you can access the properties from the command line. I just had to find them.

I started this process by creating a ServiceInstance variable I could interrogate.

$launcher = Get-SPServiceInstance | ? {$_.typename –eq "Document Conversions Launcher Service"}

Then to interrogate the properties

$launcher | get-member -membertype property

Which returns this lovely list:

   TypeName: Microsoft.Office.Server.Conversions.LauncherServiceInstance

Name                        MemberType Definition
----                        ---------- ----------
CanUpgrade                  Property   System.Boolean CanUpgrade {get;}
Description                 Property   System.String Description {get;}
DisplayName                 Property   System.String DisplayName {get;}
Farm                        Property   Microsoft.SharePoint.Administration.S...
Hidden                      Property   System.Boolean Hidden {get;}
Id                          Property   System.Guid Id {get;set;}
Instance                    Property   System.String Instance {get;set;}
IsBackwardsCompatible       Property   Microsoft.SharePoint.TriState IsBackw...
LoadBalancerServerId        Property   System.Guid LoadBalancerServerId {get...
ManageLink                  Property   Microsoft.SharePoint.Administration.S...
Name                        Property   System.String Name {get;set;}
NeedsUpgrade                Property   System.Boolean NeedsUpgrade {get;set;}
NeedsUpgradeIncludeChildren Property   System.Boolean NeedsUpgradeIncludeChi...
Parent                      Property   Microsoft.SharePoint.Administration.S...
Port                        Property   System.Int32 Port {get;set;}
Properties                  Property   System.Collections.Hashtable Properti...
ProvisionLink               Property   Microsoft.SharePoint.Administration.S...
Roles                       Property   System.Collections.Generic.ICollectio...
Server                      Property   Microsoft.SharePoint.Administration.S...
Service                     Property   Microsoft.SharePoint.Administration.S...
SingleServer                Property   System.Boolean SingleServer {get;set;}
Status                      Property   Microsoft.SharePoint.Administration.S...
SystemService               Property   System.Boolean SystemService {get;}
TypeName                    Property   System.String TypeName {get;}
UnprovisionLink             Property   Microsoft.SharePoint.Administration.S...
UpgradeContext              Property   Microsoft.SharePoint.Upgrade.SPUpgrad...
UpgradedPersistedProperties Property   System.Collections.Hashtable Upgraded...
Version                     Property   System.Int64 Version {get;}

And here we have it!

LoadBalancerServerId        Property   System.Guid LoadBalancerServerId {get...

Ok, but it wants a System.Guid? Since the property wanted a server name I presumed it wanted the Guid of the server. After a bit more searching it turns out we can find a server Guid from the Get-SPServer commandlet.

$svrguid = (Get-SPServer | ? {$_.address -eq "{server name}"}).id

Now we have the Guid we can just set the property in the ServiceInstance variable and update the configuration

$launcher.LoadBalancerServerId = $svrguid

And finally we can start the service.

Start-SPServiceInstance -Identity (Get-SPServiceInstance | where 
{$_.TypeName -eq "Document Conversions Launcher Service" -and $_.Parent.Name -eq “{server name}”})

Viola! Both services are now configured and running.


As postscript, whilst I was working on this I kept getting the following error when I issued the update() command:

Exception calling "Update" with "0" argument(s): "An update conflict has occurred, and you must re-try this action. The object LauncherServiceInstance was updated by domain\adminuser, in the w3wp (3484) process, on machine SP2010.  View the tracing log for more information about the conflict."

This was simply me making changes to the service outside PowerShell without creating a new copy of the $launcher ServiceInstance variable. Once I re-created the $launcher variable it all worked fine.