在创建Synchronization Connection的时候, Client端对timeout有三种限制.
1. 在编辑connection页面, 点击populate按钮的时候, sharepoint会去遍历域内所有的domain和OU. 这里有一个限制值A.
2. 在点击了OK之后, sharepoint会去执行入forefront identity manager, 创建并编辑management agent. 这些请求会发送给Domain controller, 如果AD那边的OU的结构很大, 信息很多, 是有可能超时的. 针对这一点, 有一个限制值B.
3. 第三个限制值是DirectoryConnection.Timeout的限制, 该值默认为30秒, 让我们给它起个代号叫C.
解决方案
==========
可以使用下面的PowerShell命令来得到以上的三个限制值:
//A
$upaAppProxy = Get-SPServiceApplicationProxy | ? {$_.name -like 'User Profile Service Proxy'}
$upaAppProxy.ImportConnAsyncTimeout //default value is 60
//B
$upaApp = Get-SPServiceApplication | ? {$_.name -like 'User Profile Service'}
$upaApp. FIMWebClientTimeOut //default value is 300000
//C
$upaAppProxy = Get-SPServiceApplicationProxy | ? {$_.name -like 'User Profile Service Proxy'}
$upaAppProxy.LdapConnectionTimeout //default value is 60
可以使用下面的PowserShell命令来对其进行修改:
//A
$upaAppProxy = Get-SPServiceApplicationProxy | ? {$_.name -like 'User Profile Service Proxy'}
$upaAppProxy.ImportConnAsyncTimeout = 180 //This value is in seconds, 3 minutes.
$upaAppProxy.Update()
//B
$upaApp = Get-SPServiceApplication | ? {$_.name -like 'User Profile Service'}
$upaApp. FIMWebClientTimeOut = 600000 //This value is in milliseconds, 10 minutes.
$upaApp.Update()
//C
$upaAppProxy = Get-SPServiceApplicationProxy | ? {$_.name -like 'User Profile Service Proxy'}
$upaAppProxy.LdapConnectionTimeout = 180 //This value is in seconds, 3 minutes.
$upaAppProxy.Update()
如果延长了时间, 依然会超时, 请尝试下面的步骤
1. 在SharePoint Server上, Start -> Run -> secpol.msc
2. Security Settings -> Local Policies -> Security Options -> Network security: LDAP client signing requirements
3. 右键单击 -> 选择 Property –> 在Local Security Setting 选项卡, 设置值为None -> 点击OK
4. Start -> Run -> cmd -> gpupdate /force
注意:
要确保你在connection的配置页面指定的账户拥有特定权限
Farm Admin 或 User Profile Service Application 的管理员
在AD上拥有Replicating Directory Changes权限.
还有, 如果你的domain环境过于复杂, 请确保在forest name的选项中填写了正确的值.
在文章开头描述的第2步中, 请求发送给Domain controller, 如果AD那边的OU的结构很大, 信息很多, 即使修改了限制值B, 却依然超时的情况下, 应该尝试修改WCF默认的超时值.
步骤如下:
打开C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebClients\Profile\client.config 文件
找到所有的timeout属性, 一股脑的加倍, 默认都是00:00:20, 全部修改为00:00:40. 需要修改的原始文件片段摘抄如下.
<bindings>
<customBinding>
<binding name="ProfileServiceHttpsBinding"
receiveTimeout="00:00:20"
sendTimeout="00:00:20"
openTimeout="00:00:20"
closeTimeout="00:00:20">
<security
authenticationMode="IssuedTokenOverTransport" />
<binaryMessageEncoding>
<readerQuotas
maxStringContentLength="1048576"
maxArrayLength="2097152"/>
</binaryMessageEncoding>
<httpsTransport
maxReceivedMessageSize="2162688"
authenticationScheme="Anonymous"
useDefaultWebProxy="false" />
</binding>
<binding name="ProfileServiceHttpBinding"
receiveTimeout="00:00:20"
sendTimeout="00:00:20"
openTimeout="00:00:20"
closeTimeout="00:00:20">
<security
authenticationMode="IssuedTokenOverTransport"
allowInsecureTransport="true" />
<binaryMessageEncoding>
<readerQuotas
maxStringContentLength="1048576"
maxArrayLength="2097152" />
</binaryMessageEncoding>
<httpTransport
authenticationScheme="Anonymous"
maxReceivedMessageSize="2162688"
useDefaultWebProxy="false" />
</binding>
<binding name="ProfileDBCacheServiceHttpsBinding"
receiveTimeout="00:00:20"
sendTimeout="00:00:20"
openTimeout="00:00:20"
closeTimeout="00:00:20">
<security
authenticationMode="IssuedTokenOverTransport" />
<binaryMessageEncoding>
<readerQuotas
maxStringContentLength="1048576"
maxArrayLength="2147483647"/>
</binaryMessageEncoding>
<httpsTransport
authenticationScheme="Anonymous"
transferMode="StreamedResponse"
allowCookies="false"
bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="2097152"
maxReceivedMessageSize="2147483647"
useDefaultWebProxy="false" />
</binding>
<binding name="ProfileDBCacheServiceHttpBinding"
receiveTimeout="00:00:20"
sendTimeout="00:00:20"
openTimeout="00:00:20"
closeTimeout="00:00:20">
<security
authenticationMode="IssuedTokenOverTransport"
allowInsecureTransport="true" />
<binaryMessageEncoding>
<readerQuotas
maxStringContentLength="1048576"
maxArrayLength="2147483647"/>
</binaryMessageEncoding>
<httpTransport
authenticationScheme="Anonymous"
transferMode="StreamedResponse"
allowCookies="false"
bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="2097152"
maxReceivedMessageSize="2147483647"
useDefaultWebProxy="false" />
</binding>
</customBinding>
</bindings>
笔者的环境是SharePoint 2010 CU2(August CU, 14.0.5123.5000), 居然有报错但connection依然创建成功并正常工作的情况. SharePoint 2010产品还有待改进呀.
资料来源
===========
http://www.ultimatewindowssecurity.com/wiki/WindowsSecuritySettings/Network-security-LDAP-client-signing-requirements
http://technet.microsoft.com/en-us/library/cc738915(WS.10).aspx
Configure Profile Sync Service
http://technet.microsoft.com/en-us/library/ee721049.aspx
User Profile Administration
http://technet.microsoft.com/en-us/library/ee721050.aspx
Configure needed permissions in Active Directory:
http://support.microsoft.com/kb/303972
Configure Active Directory group memberships
http://support.microsoft.com/kb/331951
Profile Post by Tanuj Bansal http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/398f3553-5de7-456b-b935-4e22cee26b2f
WCF Timeouts on small memory'd SharePoint 2010 machine
http://blogs.architectingconnectedsystems.com/blogs/cjg/archive/2010/03/17/WCF-Timeouts-on-small-memory_2700_d-SharePoint-2010-machine.aspx
运维网声明
1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网 享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com