Wednesday, March 23, 2011

User Profile Replication Engine gets stuck Invalid URI: A port was expected because of there is a colon (':') present but the port could not be parsed.

For the past 4 weeks I have had a ticket open with Microsoft about the user profile replication engine getting stuck on a particular user. The following errors were logged in the event log:


System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Invalid URI: A port was expected because of there is a colon (':') present but the port could not be parsed.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Microsoft.KNG.ReplicationEngine.Helper.UserProfileWebService.UserProfileService.GetUserProfileByIndex(Int32 index)
   at Microsoft.KNG.ReplicationEngine.Helper.ReplicationEngineManagerFull.ReplicateProfile()22/03/2011 10:07

This continued to get logged in the event log until an entry was logged about event log flooding.

OK so the scenario.

I wanted to replicate all user profiles in Farm A in SSP 1, to Farm B in SSP 2.

After running a full profile replication, the list of replicated profiles stopped at the same user every time and the above errors were logged.

I eventually tried incrementing the 'StartingProfileIndex' by 1 number and kicking off the replication again, this was then successful for all remaining users.

So then I knew I had an issue with ProfileIndex numbers between 1740 and 1743 (the next sucessful profile).

If you check in C:\Program Files\Microsoft\SPAdminToolkit\ and look for Err_Full_Profile_Index_Pull_xxxxxxx this is a log file and will give you the number of the problem profile

I looked at the SSP database, and expanded the table 'dbo.UserProfile_Full', I then did a select for all records.

The column we are interested in is called 'RecordID', so naturually I looked for the RecordID that wouldn't replicate.

There is a red herring here, because the username next to each number did not correspond to the view in the replication engine. Because the replication engine labels the first user as 0, it then labels the 2nd user with the 'RecordID' of the first user, and so on so forth.

So for my faulty user, I need to find the 'RecordID' then look at the next 'RecordID' in the table, and that is the problem profile.

I then checked with the user that their profile didn't have anything too important in it, they weren't using any My Links etc and had no files in their My Site.

I then went ahead and deleted their profile from the 'View User Profiles' in the SSP Admin site.

I then did a full profile import, to get her a fresh user profile in the SSP database.

After doing this, the replication engine did a successful full import of all user profiles - problem solved!

I hope this saves someone some time, as I spent many hours on the phone to MS about this and they were extremely unhelpful.


1 comment: