SharePoint 2013: Not able to connect to search service to retrieve valid settings
Not able to connect to search service to retrieve valid settings
In SharePoint 2013 there are some changes in how search work. Result sources replace scopes and federated locations. Other changes in search can be found overhere on Technet.
In a result source you can restrict queries to a subset of content by using a query transform. You can use the query builder interface for building such a results source. In SharePoint 2013, site collection administrators, site owners, and site designers can also create and configure result sources to meet their specific requirements.
This article describes how I ran into an issue with building a new results source in the query builder in Central Administration.
When you try to create a new result source from Central Administration in your Search Service Application you get an error:
Error: Not able to connect to search service to retrieve valid settings
Steps to Reproduce
1. Navigate to Central Administration
2. Go to Application Management > Manage service applications and select your Search Service Application
3. Go to Queries and Results > Results Sources
4. Click on the New Result Source button
Basicly the cause of this error is that the account which you use to access the Query Builder is not authorized to do this.
To see the cause you can open the ULS logs of SharePoint 2013, with a tool like ULS Viewer. When you find the right correlation you get an event of the level Unexpected:
Exception in Query Builder OnLoad: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Attempted to perform an unauthorized operation. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
at SyncInvokeGetRankingModels(Object , Object , Object )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object inputs, Object& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)).
Btw, if you having trouble filter your log on the following fields and corresponding values, Product – SharePoint Server Search & Category – Query.
Add the account with Full Control permissions to the Administrators for Search Service Application. You can do this via the interface in Central Administration or via Powershell. On TechNet this described in detail, Assign or remove administrators to a service application (SharePoint 2013).
Majorbacon – Error: "Not able to connect to search service to retrieve valid settings" or Why won’t my query builder work?
Technet – Assign or remove administrators to a service application (SharePoint 2013)
Technet – Understanding result sources for search in SharePoint Server 2013
Technet – What’s new in search in SharePoint Server 2013