Unable to Provision Search Service App and Proxy

Greetings,

I am in the process of provisioning enterprise search service application.  I am doing this via PowerShell script.  I am confident in the PowerShell script.  I receive an exception during the call to New-EnterpriseSearchServiceApplication.  I receive the following exception:

New-SPEnterpriseSearchServiceApplication : A database exception occurred when creating Search Application: User does not have permission to perform this action.
At \\pac\data\PTS\FS01_STORE\Technology\Vendor\Microsoft\SharePoint_2013\scripts\Install\Provision-SearchServiceApplication.ps1:52 char:29
+         $searchServiceApp = New-SPEnterpriseSearchServiceApplication -Name $serv ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Offic...viceApplication:NewSearchServiceApplication) [New-SPEnterpriseSearchServiceApplication], ApplicationException
    + FullyQualifiedErrorId : Microsoft.Office.Server.Search.Cmdlet.NewSearchServiceApplication

However, the Search Service Application IS created and the (4) associated databases.  Obviously, since this happens, the script fails on the next call to create the proxy.

What would cause the service application and databases to be created but then indicate the user doesn't have permissions?

Thank you in advance for your help!

Bob

March 24th, 2015 8:51pm

Hi Bob,

For better check if it is related the permission issue throwed by New-SPEnterpriseSearchServiceApplication, you can check the ULS log see if there is more detailed relavent information to the permission issue.

Also you can try other account with higher permission to run the PowerShell code in a test environment, see if it could be reproduced or if it's a user account permission issue.

Here are two articles which may help on troubleshooting.

http://blog.appliedis.com/2015/03/13/search-service-application-stops-working-after-adding-a-user-to-administrators/

https://spsawyer.wordpress.com/tag/new-spenterprisesearchserviceapplication/

Thanks

Daniel Yang

Free Windows Admin Tool Kit Click here and download it now
March 26th, 2015 8:38am

BOB,are you able to create the search service application by CA?I assume that this issue is because of, If you fill in the same application pool name for both the Search Admin Web Service and the Search Query and Site Settings Web Service and this application pool doesn't already exist yet, you will see this error, because it tries to create the application pool with that name twice while provisioning the service app.please check the link below that provides more details and the solutions of the issue.

http://expertsharepoint.blogspot.de/2013/12/unable-to-create-new-search-service.html

March 26th, 2015 9:57am

Hi Bob,

For better check if it is related the permission issue throwed by New-SPEnterpriseSearchServiceApplication, you can check the ULS log see if there is more detailed relavent information to the permission issue.

Also you can try other account with higher permission to run the PowerShell code in a test environment, see if it could be reproduced or if it's a user account permission issue.

Here are two articles which may help on troubleshooting.

http://blog.appliedis.com/2015/03/13/search-service-application-stops-working-after-adding-a-user-to-administrators/

https://spsawyer.wordpress.com/tag/new-spenterprisesearchserviceapplication/

Thanks

Danie

Free Windows Admin Tool Kit Click here and download it now
March 26th, 2015 10:25pm

BOB,are you able to create the search service application by CA?I assume that this issue is because of, If you fill in the same application pool name for both the Search Admin Web Service and the Search Query and Site Settings Web Service and this application pool doesn't already exist yet, you will see this error, because it tries to create the application pool with that name twice while provisioning the service app.please check the link below that provides more details and the solutions of the issue.

http://expertsharepoint.blogspot.de/2013/12/unable-to-create-new-search-service.ht

March 26th, 2015 10:27pm

Hi Daniel,

I did finally get the Search Service Application provisioned.  It was a SQL permissions issue.

I noticed, in the service applications, the proxy is not indented below the search service app itself.  Why would this be different then the other service applications?

Thanks!

Bob

Free Windows Admin Tool Kit Click here and download it now
March 28th, 2015 3:05am

Hi Bob,

I create a Search service application proxy for my existing search service application with the below PowerShell, and it is indented below the search service app itself, plese check if it is the cmdlet New-SPEnterpriseSearchServiceApplicationProxy for creating proxy in your PowerShell code, or may re-create the proxy for search service application again.

$serviceAppName = "Search Service Application 2"
$searchServiceApp = Get-SPEnterpriseSearchServiceApplication -Identity $serviceAppName
$searchProxy = New-SPEnterpriseSearchServiceApplicationProxy -Name "$serviceAppName
 Proxy test" -SearchApplication $searchServiceApp

http://adicodes.com/powershell-script-create-sharepoint-search-service-application/

Thanks

Daniel Yang

March 31st, 2015 10:12pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics