• SharePoint 2010 中如何配置同步配置文件


    一、操作步骤

    请按微软的官方文档步骤进行操作:
    http://technet.microsoft.com/zh-cn/library/ee721049(v=office.14).aspx

    二、问题及解决

    这里主要说明一下自己在配置过程中遇到的问题及解决办法。

    1. Forefront Identity Manager Service及Forefront Identity Manager Synchronization Service服务不能启动
    事件查看器中提示如下错误信息:

    .Net SqlClient Data Provider: System.Data.SqlClient.SqlException: 找不到存储过程 'RegisterService'

    问题原因可能是未启动“用户配置文件同步服务”。所以解决办法为:
    启动:系统设置 > 管理服务器上的服务 > 用户配置文件同步服务。

    2. 完全同步失败
    增量同步过程是完整的,而且有合理的进度显示,按最终配置文件数量没有变化。若选择“启动配置文件同步”页面中选择“启动完全同步”,仍会执行增量同步。若在“监控 > 复查作业定义”页面中直接启动“User Profile Service Application - 用户配置文件到 SharePoint 完全同步”,则会失败。在系统事件查看器中可看到错误信息(Event ID是5553)。

    failure trying to synch site bb516597-a09d-4711-a801-d8049bf31374 for ContentDB ef233675-5f26-4d95-ac5f-3bb30cb56246 WebApp 033fe5c2-3659-4f41-80ce-f76dfac9b822.  异常消息为 不能在具有唯一索引 'CX_UserMemberships_RecordId_MemberGroupId_SID' 的对象 'dbo.UserMemberships' 中插入重复键的行。
    语句已终止。。

    对如上问题,微软的官方解决办法为:
    stsadm -o sync -listolddatabases n
    stsadm -o sync -deleteolddatabases n
    n为天数。细节参看:http://support.microsoft.com/kb/2771190 。

    但在执行stsadm -o sync -deleteolddatabases时会出错,在日志中显示如下信息:

    WcfSendRequest: RemoteAddress: 'http://SPServer:32843/b52a7581db5540a399695f2b91414818/ProfilePropertyService.svc' Channel: 'Microsoft.Office.Server.UserProfiles.IProfilePropertyService' Action: 'http://Microsoft.Office.Server.UserProfiles/GetProfileProperties' MessageId: 'urn:uuid:02bde9f9-0f66-47ab-96b8-d038585e0273'     
    Exception occured while connecting to WCF endpoint: System.ServiceModel.Security.SecurityAccessDeniedException: 访问被拒绝

    经尝试,发现必须用对ProfileService服务有执行权限的用户登录系统才能执行成功。另外,在用非Administrator的账号打开cmd或PowerShell时注意“以管理员身份运行”,否则会提示“拒绝访问”。

    3. ”用户配置文件同步服务“不能启动

    删除如上旧数据库后,在”应用程序管理 > 服务器上的服务“页可发现“用户配置文件同步服务”变为停止状态。在尝试启动时会失败,在系统事件查看器中可发现如下错误(Event ID为1004):

    未能检测产品 {90140000-104C-0000-1000-0000000FF1CE},功能 PeopleILM,组件 {1C12B6E6-898C-4D58-9774-AAAFBDFE273C}。资源 C:\Program Files\Microsoft Office Servers\14.0\Service\Microsoft.ResourceManagement.Service.exe 不存在。

    原因是NETWORK SERVICE账号缺少对如下路径的足够的权限:
    C:\Program Files\Microsoft Office Servers\14.0\Service\
    尝试对NETWORK SERVICE增加对如上路径的读取和执行权限后,用户配置文件同步服务被成功启动。

    若在启动用户配置文件同步服务时卡在“正在启动”状态,可用如下方式解除:

    1. 在SharePoint PowerShell中执行如下命令:

    Get-SPServiceInstance | Where-Object {$_.Service -Like 'ProfileSynchronizationService*'} | Format-Table -Property TypeName, Id, Service -AutoSize

    然后执行:

    Stop-SPServiceInstance {Id}

    其中,{Id}是前一命令中获取到的Id属性值。然后再重新启动启动用户配置文件同步服务。

    如果在停止时又卡在了“正在停止”状态,可按如下步骤解决:

    1)执行如下命令:

    stsadm -o enumservices > c:\services.txt

    2)在如上输出文件中根据关键字“FIMSynchronizationService”找到相应内容,并根据这些内容拼成如下命令,并执行:

    stsadm -o provisionservice  -action stop -servicetype "Microsoft.Office.Server.Administration.ProfileSynchronizationService, Microsoft.Office.Server.UserProfiles, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" -servicename FIMSynchronizationService

    完成后可发现此服务已停止。

    参见: http://www.sharepointdiary.com/2012/09/user-profile-synchronization-service-stuck-at-starting.html http://social.msdn.microsoft.com/Forums/sharepoint/en-US/6d1b123a-391b-4e9e-946d-c23027192e62/user-profile-service-synchronization-service-stuck-in-stopping-state?forum=sharepointadminprevious

    4. 无法连接到http://ServerName:5725/ResourceManagementService/MEX

    现象:”用户配置文件同步服务“启动后迅速结束。在作业历史记录中显示“已成功”。

    排查:在事件管理器中可发现如下的提示信息(事件ID 6398):

    ID 为 f01580a9-d1d3-4262-a3b9-3bf386b9b239 的作业定义 Microsoft.Office.Server.UserProfiles.UserProfileImportJob 的 Execute 方法引发异常。下面包含详细信息。
    无法连接到 http://ServerName:5725/ResourceManagementService/MEX。TCP 错误代码 10061: 由于目标计算机积极拒绝,无法连接。 192.168.4.20:5725。 

    解决:
    1)检查Forefront Identity Manager Service 及 Synchronization Service是否启动。若未启动,则启动后再试。
    2)更多可能原因参见:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/fab026a5-64c4-41d3-b52f-5a75bddb65c5/userprofile-sync-problemcould-not-connect-to-httpserver5725resourcemanagementservicemex

    5. 保存用户配置文件时出错,因为ANSI_NULLS选项设置不正确

    现象:”用户配置文件同步服务“启动后按正常速度完整地执行完成,并在作业历史记录中显示“已成功”。但打开SharePoint用户的配置信息页面发现配置信息未同步。

    排查:在事件管理器中可发现如下的提示信息(事件ID 5188):

    保存用户“e4a3a09c-9a2d-40ae-b471-a7fdcec29972”的用户配置文件时出错。异常为: System.Data.SqlClient.SqlException: DELETE 失败,因为下列 SET 选项的设置不正确: 'ANSI_NULLS'。请确保 SET 选项正确无误,可以用于 计算列上的索引视图和/或索引和/或筛选的索引和/或查询通知和/或 XML 数据类型方法和/或空间索引操作。

    解决:在仔细研究SQL Server选项设置逻辑后对ANSI_NULLS选项进行了调整,但没有任何效果(错误信息保持不便)。后来考虑到可能是因为创建过一个读取配置文件表(UserProfile_Full和UserProfileValue)并使用了WITH SCHEMABINDING选项的视图,于是从此视图中删除了WITH SCHEMABINDING选项。再次尝试后问题解决。

    6. 配置文件完全同步失败
    在”管理配置文件服务 > 启动配置文件同步“页面中执行”启动完全同步“时失败,查看系统事件查看器,提示信息为(Event ID: 6050):

    管理代理“MOSSAD-AutonaviAD”在执行运行配置文件“DS_FULLIMPORT”时失败,因为遇到了连接性问题。
    PS:如上文字的英语版本是:failed on run profile ”DS_FULLIMPORT“ because of connectivity issues.

    经查找原因是同步账号没有对AD服务器的目录复制权限(”Replicate Directory Changes” Permission)。(此信息看通过”同步服务管理器“查看——C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\UIShell\miisclient.exe。)

    7. HostId is not registered (EventID:3)

    .Net SqlClient Data Provider: System.Data.SqlClient.SqlException: HostId is not registered 在 Microsoft.ResourceManagement.Utilities.ExceptionManager.ThrowException(Exception exception) 在 Microsoft.ResourceManagement.Data.Exception.DataAccessExceptionManager.ThrowException(SqlException innerException) 

    解决办法参见:
    http://cc.bingj.com/cache.aspx?q=sharepoint+System.Data.SqlClient.SqlException%3a+HostId+is+not+registered+&d=4968737233831220&mkt=en-US&setlang=en-US&w=0GuarP1SFePThXCLy9rd-gAaVkhwT5hX

    http://underthehood.ironworks.com/2010/07/error-message-when-you-try-to-start-user-profile-synchronization-in-sharepoint-2010-an-update-confli.html

    8. RegQueryValueEx of Server failed (EventID:6324)

    ERR: MMS(23480): libutils.cpp(10513): RegQueryValueEx of Server failed with 2 BAIL: MMS(23480): libutils.cpp(10515): 0x80070002 (系统找不到指定的文件。) 

    解决办法:重建UPS后解决。
    9. 找不到必需的属性“externalHostName” (EventID: 3)

    System.Configuration: System.Configuration.ConfigurationErrorsException: 找不到必需的属性“externalHostName”。 (C:\Program Files\Microsoft Office Servers\15.0\Service\Microsoft.ResourceManagement.Service.exe.Config line 29) 

    解决办法:修改一些权限相关配置后重启服务器,并重建UPS。

    关于此问题,此帖子:http://social.technet.microsoft.com/Forums/en-US/identitylifecyclemanager/thread/2ea8a1e9-c2a9-4105-964c-239412b6716b 有更全面的分析可供参考。其中要点如下:
    1) You need to be able to resolve SRV records via DNS for the remote forest. Thus - make sure you have the remote DNS zone on a local DNS server. If you can not get it replicated - install DNS on the IIFP/MIIS server and put in forwards (zone filtered) to the various forest. You should get the DC IP's when you do a nslookup for <thedomain.name>.
    2) If you are passing firewalls, check the firewalls ports 53,88,389,464 (accroding to the MIIS_Ports and Permission doc - available on the MIIS site).
    3) Make sure you can telnet throught the firewall to each port "telnet <server IP> <port>". Once this works try to telnet to the forest name FQDN "telnet <forest.name.blah> <port>. If that all works you connecivity is sorted.
    4) Make sure youhave directory replication access on the account accessing the forests (again according to the MIIS Port and Permission doc).
    5) If this all works, try to increase the TIMEOUT period on the management agent run profiles.

    务必注意此情况:如果确定同步账号对AD具有目录复制权限,且提示信息与此条所述相同(Event ID: 6050),则可尝试如下方法
    1)Start FIM SSM (C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\UIShell\miisclient.exe)
    2)Go to Management Agents screen, right click on MOSSAD-[SYNCHRONIZATION CONNECTION NAME] and select Properties
    3)Go to Configure Directory Partitions and uncheck the directory partition that you didn't define in SP2010
    4)Click OK to close Properties window
    5)Again, right click on MOSSAD-[SYNCHRONIZATION CONNECTION NAME] and select Configure Run Properties...
    6)On DS_FULLSYNC, DS_DELTASYNC, DS_FULLIMPORT, DS_DELTAIMPORT, delete step for the directory partition you removed on bullet 3. NOTE! You must only remove the step for the directory partition you removed earlier on bullet 3. I.e., if the removed directory partition was 3rd on the list, you should delete 3rd Step.
    7)Click OK Re-run profile synchronization from Central Admin

    10. 创建同步连接失败:“MOSS MA not found”

    问题现象:在 User Profile Service Application “同步”组下进入“配置同步连接”,在创建连接时可能会报错:“MOSS MA not found”。

    解决办法:启动“Forefront Identity Manager Service”。

    注意:【连接名称】不能用中文,否则会报错:“Unable to process Create message”。(参见:Donaldxu的博客文章。)

    11. 创建用户配置文件服务应用程序(User Profile Service Application)失败

    问题现象:有时在删除并重新创建用户配置文件服务应用程序(User Profile Service Application)时,会出现问题。出现此情况的原因是在删除已存在的用户配置文件服务时,证书未被删除。

    解决办法:删除如下3个位置的ForefrontIdentityManager证书(certificates):

    • 1.Personal
    • 2.Trusted Root Certification Authorities
    • 3.Trusted People 

    若停止或删除Web应用程序失败,可使用如下命令:

    Get-SPServiceApplication
    
    Remove-SPServiceApplication -Identity {Id} -RemoveData
  • 相关阅读:
    现在实习生做什么好找工作?
    MSsql数据库修改数据类型Float到decimal的问题处理
    首记,一种新的企业信息化平台开发方案——AgileEAS.NET框架
    在Winform中使用DataGirdView时的添加和删除操作
    如何通过AgileEAS.NET快速搭建属于你的企业应用(一)——解决方案的建立
    浅谈企业自主信息化开发模式
    AgileEAS开发中关于实体类和DataTable的取舍——用linq+orm来缩短你的开发周期
    如何通过AgileEAS.NET快速搭建属于你的企业应用(二)——智能版本升级和多数据库访问的分布式部署
    整站黑白页
    布局管理器
  • 原文地址:https://www.cnblogs.com/jancco/p/2806838.html
Copyright © 2020-2023  润新知