修改SharePoint 2013中Search Topology时遇到的一些问题以及一些Tips

这次操作在笔者的场中涉及到5台服务器, CA, APP2, APP3, APP4, APP5.

原本只有CA运行着Search Service Applicaiton, 现在想让APP2-5运行这项服务, 让CA不掺活到Search中.

 

1. 用脚本修改了topology, 想要停掉CA上的search service. 报错, Error Stopping.

2. 排查, 发现原来自己创建了两个Search service application, 服务都运行在CA上. 于是删掉另一个SSA就是进行下去的必要步骤.

3. 界面上删另一个SSA却出了问题, hang在那里一个多小时也没有结束. 查看SharePoint ULS log, 说是pending一个timer job.

4. 打开"Check job status”页面, 发现有个名为"...RemoveAllNode…"的job 一直存在, 点击run now也没反应. 同时, 还有个看起来挺平常的job, 也卡在CA上.

5. 手动删掉"...RemoveAllNode…"这个job, 然后重启CA.

6. 这次我选择不在界面上操作, 而是用Powershell删掉这个问题SSA. 脚本如下:

Add-PSSnapin Microsoft.SharePoint.Powershell
$spapp = Get-SPServiceApplication -Name "SSA_eDiscovery"
Remove-SPServiceApplication $spapp -RemoveData 

 

7. 成功了. 但是还有些事情要做. CA上还运行着三个服务:

  • Search Host Controller Service - This service manages the search topology components. The service is automatically started on all servers that run search topology components.
  • Search Query and Site Settings Service - This service load balances queries within the search topology. It also detects farm-level changes to the search service and puts these in the Search Admin database. The service is automatically started on all servers that run the query processing component.
  • SharePoint Server Search - This service crawls content for the search index. This service is automatically started on all servers that run search topology components. The service cannot be stopped or started from the Services on Server page.

手动将没有运行任何search component的服务器上的Search Host Controller ServiceSearch Query and Site Settings Service 这两个服务停掉.

 

8. 用下面的脚本停掉SharePoint Server Search服务.

$CA = Get-SPEnterpriseSearchServiceInstance -Identity "SP2013-CA"
Stop-SPEnterpriseSearchServiceInstance -Identity $CA 

 

清理完毕.

 

另外, 笔者还做了一个其他的操作, 也顺带记在这里吧, 就不再另开一篇了. 笔者想要修改一下正常的SSA的里面的IndexPartition的RootDirectory属性, 所以得新建SearchIndexComponent, 然后替换掉老的component.

笔者在已经干净的CA上执行powershell命令, 遇到报错.

PS C:\Windows\system32> New-SPEnterpriseSearchIndexComponent -SearchTopology $clone -IndexPartition 0 -SearchServiceInstance $APP3 -RootDirectory "E:\SearchIndexStore"

New-SPEnterpriseSearchIndexComponent : Cannot bind parameter 'RootDirectory' to the target. Exception setting "RootDirectory": "Could not find a
part of the path 'E:\SearchIndexStore'."
At line:1 char:123
+ ... -RootDirectory "E:\SearchIndexStore"
+                    ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (:) [New-SPEnterpriseSearchIndexComponent], ParameterBindingException
    + FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.Office.Server.Search.Cmdlet.NewSearchIndexComponent
 

 

笔者改到Index Server上运行同样的命令就可以成功, 所以, 以后要修改RootDirectory属性, 脚本需要到Index Server上去运行才成呀, 要不然其他机器无法检测到index server上的本地文件夹. 这一点SharePoint 2013做得还是有点傻(April 2013 CU).

 

另外需要注意的一点是, 在修改topology的时候, 应该把crawl都停掉, schedule都去掉, 尤其是continues crawl. 笔者在配置的时候遇到很多hang呀, 什么的奇奇怪怪的问题. 把crawl都停掉, 才顺利了些.

posted on 2013-08-26 17:00  中道学友  阅读(867)  评论(0编辑  收藏  举报

导航

技术追求准确,态度积极向上