Thursday, January 7, 2016

SharePoint Search Service 2013 Error

There are some common SharePoint Search Service Application erros which you might encountered when you are wokring with the service.
Administrative status     Paused for:Index reset
Administrative status     Paused for:External request, Index reset
Administrative status     Paused for:External request
You may find these erros when you navigate to
Central Administration and Manage service applications
image_thumb1
then Search Service Application
image_thumb4
you can find service error details in the Search Service Application: Search Administration page

Common Resolution for Those problems

If you see those erros first you can do a quick workround and see whether its resolved.
  • Stop following services in all nodes in the farm. (actually this is needed for notes which search components are running , but if you couldnt find those do it for all servers)
  • You can goto servics by type services.msc in run window (Windows + R) Stop “SharePoint Timer Service”
    Stop “SharePoint Search Host Controller”
    image_thumb11
  • Most of the time restating these services will resolve the problem but if it index problem it is better to delete the corrupted index.
  • Go to each node and locate the following path
C:\Program Files\Microsoft Office Servers\15.0\Data\Office Server\Applications\Search\Nodes\<HEX ID>\IndexComponent<N>\storage\data\
Delete all files and folders inside the data folder.
then restart the all services (SharePoint Timer Service,SharePoint Search Host Controller) again.
  • Then check the problem of the search service by using following powershell scripts.
REF : https://technet.microsoft.com/en-us/library/dn745901(v=office.15).aspx
$ssa = Get-SPEnterpriseSearchServiceApplication –Identity <ID>
using the following command you can check whether search service is paused.
$ssa.IsPaused() -ne 0
If it is returning true try to restart the the search service using following powershell script.
$ssa.ForceResume(True)
If it is returning false try to execute following scripts to find out the actual reason for not running.
-----------
($ssa.IsPaused() -band 0x01) -ne 0
Cause: A change in the number of crawl components or crawl databases is in progress.
Action: Wait until the topology change completes.
-----------
($ssa.IsPaused() -band 0x02) -ne 0
Cause: A backup or restore procedure is in progress.
Action: Wait until the backup or restore completes.  After the procedure completes, run the command $ssa.ForceResume(0x02) to verify. For more information
-------------
($ssa.IsPaused() -band 0x04) -ne 0
Cause: A backup of the Volume Shadow Copy Service (VSS) is in progress.
Action: Wait until the backup completes.  After the VSS backup completes, run the command $ssa.ForceResume(0x02) to verify.
--------------- 
($ssa.IsPaused() -band 0x08) -ne 0
Cause: One or more servers in the search topology that host query components are offline.
Action: Wait until the servers are available again.
---------------
($ssa.IsPaused() -band 0x20) -ne 0
Cause: One or more crawl databases in the search topology are being rebalanced.
Action: Wait until the operation completes.
----------------
($ssa.IsPaused() -band 0x40) -ne 0
Cause: One or more link databases in the search topology are being rebalanced.
Action: Wait until the operation completes.
-----------------
($ssa.IsPaused() -band 0x80) -ne 0
Cause: An administrator has manually paused the Search service application.
Action: If you know the reason, you can resume the Search service application. Run the command $ssa.resume() to resume the Search service application.
If you don’t know the reason, find out why someone has manually paused the Search service application.
-----------------
($ssa.IsPaused() -band 0x100) -ne 0
Cause: The search index is being deleted.
Action: Wait until the search index is deleted.
------------------
($ssa.IsPaused() -band 0x200) -ne 0
The search index is being repartitioned.
Wait until the operation completes.

Monday, December 21, 2015

Share Point 2013 is really slow in Production Farm after some times

We had a problem in the Share Point farm and It came really slow suddenly. It's just 44KB and it took around 13s to load.


So when dinging the problem it has took quite a time to figure out App Fabric Caching Service is not running which is related to Distributed Cache Service.


When i run the service server performance was make to normal.

Tuesday, December 15, 2015

Reporting server web part not working in SharePoint 2013

These was situation in my server farm , reporting server web part is not worked. Literally I can add the reporting server web part to the server but when I give the report path report is showing but when I click Apply Button nothing is showing in the page.



While playing with the web part I found that If I unchecked the Asynchronous Rendering report will be loaded in the web part. 

But after that none of operations are working (as an example , Expand , Apply new filter) because we disabled the Ajax request from the web part.
By digging through found that we have put “SPWebpartManager” tag in the header section in the master page which actually should be in the body; when the time of custom master page creation.
<WebPartPages:SPWebPartManager runat="Server"/>
We could have found this one more easily if we change the master page to default.
Lesson Learnt
If some web parts are miss behave , change the Master Page to the default and check whether still issue is there.

(We know this but always forgetting to to it at the first place)

Thursday, November 12, 2015

Request failed. The method "GetItems" of the type "List" with id is blocked by the administrator on the server. SharePoint 2013

I have encountered this issue with my SharePoint 2013 server farm. Code was working fine with the development machine but once it deployed to Share Point 2013 production environment; found this error on Chrome console.

function somefunc()
{
    listItems = '' ;
    
   var context = SP.ClientContext.get_current();
   var web = context.get_web(); 
   var currentList = web.get_lists().getById(_spPageContextInfo.pageListId);
   var query = new SP.CamlQuery();
   listItems = currentList.getItems();
   context.load(listItems);
   context.executeQueryAsync(onQuerySucceeded, onQueryFailed);
}

Message was straight forward so I thought it is a permission issue. When I logged using my credentials It was fine and worked but when I logged out and view as a Anonymous user it didn’t work.


Then I tried to give permission to EveryOne to  the list , web even for the site collection and it didn’t work either.


then I found out it’s a property in web application which handles the Anonymous calls to the Web Application and it’s the


Microsoft.SharePoint.Administration.SPClientCallableSettings class.


Using a simple PowerShell you can remove these properties and make it work.



$webappllication = Get-SPWebApplication "http://sp2013"
$webappllication .ClientCallableSettings.AnonymousRestrictedTypes.Remove([microsoft.sharepoint.splist], "GetItems")
$webappllication .Update()
I ran this script in the App server and it worked.