none
The search service is not able to connect to the machine that hosts the administration component

    Frage

  • Running Sharepoint 2013.  I removed the Search Service Application which was broken.  I set it up manually through Central Administration and Powershell but I get the same result when I go to manage the Search Service Application:

    System Status: 
    Administrative status The search service is not able to connect to the machine that hosts the administration component. Verify that the administration component 'cb7d26ed-8075-48ed-9f2f-39a44ecbf419' in search application 'Search Service Application 2' is in a good state and try again.
     
    Search Application Topology:
    Unable to retrieve topology component health states. This may be because the admin component is not up and running.

    I tried the following:

    - changed the app pool from SharePoint Web Services Default to SharePoint Web Services System

    - deleted and recreated Search Service Application

    - The service account does have access to the search databases

    - one account is used, domain\spadmin, has all necessary permissions that I can see

    Also, upon checking the Application Event Log on the Sharepoint server I see errors that indicate that Sharepoint is trying to access a deleted Search Database.  The database is not listed in SQL, Get-SPDatabase, or CA\UpgradeAndMigration\ReviewDatabaseDtatus. 

     

    A database error occurred. Source: .Net SqlClient Data Provider Code: 4060 occurred 0 time(s) Description:  Error ordinal: 1 Message: Cannot open database "Search_Service_Application_DB_deleted" requested by the login. The login failed.

    ________________________


    A database error occurred. Source: .Net SqlClient Data Provider Code: 18456 occurred 0 time(s) Description:  Error ordinal: 2 Message: Login failed for user 'domain\user'., Class: 14, Number: 18456, State: 1    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

    ________________________


    Could not access the Search database. A generic error occurred while trying to access the database to obtain the schema version info.

    Context: Application '127eeac5-2939-4fae-8dba-15feae0a7307'

    Details:
      (0x80131904)

    I'm fairly new to Sharepoint and at this point I'm ready to rebuild it.  No users yet, it's still in development, but I don't want to lose any of the site collections.  Any suggestions?

    Donnerstag, 8. August 2013 13:17

Alle Antworten

  • You can use this script to create search service application and start all services on local server.

    Before execute, change settings based on your environment - index location, service pool settings, and also database server name.

    Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
     
    #Settings
    $IndexLocation = "C:\Search"  #CREATE FOLDER FOR INDEX BEFORE RUN SCRIPT! (Location must be empty, will be deleted during the process!)
    $SearchAppPoolName = "Services Pool" #ADD YOUR SERVICES POOL NAME!
    $SearchAppPoolAccountName = "DOMAIN\SP_Services" #ADD YOUR SERVICES POOL ACCOUNT
    $SearchServiceName = "Search Service Application" 
    $SearchServiceProxyName = "Search Service Application Proxy"
     
    $DatabaseServer = "DatabaseServer" #CHANGE SERVER NAME TO YOU OWN
    $DatabaseName = "SearchServiceDB"
     
    Write-Host -ForegroundColor Yellow "Checking if Search Application Pool exists"
    $spAppPool = Get-SPServiceApplicationPool -Identity $SearchAppPoolName -ErrorAction SilentlyContinue
     
    if (!$spAppPool)
    {
        Write-Host -ForegroundColor Green "Creating Search Application Pool"
        $spAppPool = New-SPServiceApplicationPool -Name $SearchAppPoolName -Account $SearchAppPoolAccountName -Verbose
    }
    
    else
    {
        Write-Host -ForegroundColor Yellow "Search Application Pool $SearchAppPoolName is already exist, nothing to do"
    }
     
    Write-Host -ForegroundColor Yellow "Checking if Search Service Application exists"
    $ServiceApplication = Get-SPEnterpriseSearchServiceApplication -Identity $SearchServiceName -ErrorAction SilentlyContinue
    if (!$ServiceApplication)
    {
        Write-Host -ForegroundColor Green "Creating Search Service Application"
        $ServiceApplication = New-SPEnterpriseSearchServiceApplication -Name $SearchServiceName -ApplicationPool $spAppPool.Name -DatabaseServer  $DatabaseServer -DatabaseName $DatabaseName
    }
     
    Write-Host -ForegroundColor Yellow "Checking if Search Service Application Proxy exists"
    $Proxy = Get-SPEnterpriseSearchServiceApplicationProxy -Identity $SearchServiceProxyName -ErrorAction SilentlyContinue
    if (!$Proxy)
    {
        Write-Host -ForegroundColor Green "Creating Search Service Application Proxy"
        New-SPEnterpriseSearchServiceApplicationProxy -Name $SearchServiceProxyName -SearchApplication $SearchServiceName
    }
     
    $ServiceApplication=Get-SPEnterpriseSearchServiceApplication
    $searchInstance = Get-SPEnterpriseSearchServiceInstance -local
    if(-not($searchInstance.Status -eq "Online"))
    {
        Write-Host -ForegroundColor Green "Starting local service instance..." -NoNewline
        $searchInstance|Start-SPEnterpriseSearchServiceInstance
        while ($searchInstance.Status -ne "Online")
        {
            Write-Host -ForegroundColor Green "." -NoNewline
            Start-Sleep -Seconds 5
            $searchInstance = Get-SPEnterpriseSearchServiceInstance -local
        }
        Write-Host -ForegroundColor Yellow "Done!"
    } 
    $InitialSearchTopology = $ServiceApplication | Get-SPEnterpriseSearchTopology -Active 
    $SearchTopology = $ServiceApplication | New-SPEnterpriseSearchTopology
     
    New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $SearchTopology -SearchServiceInstance $searchInstance
    New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $SearchTopology -SearchServiceInstance $searchInstance
    New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $SearchTopology -SearchServiceInstance $searchInstance
    New-SPEnterpriseSearchCrawlComponent -SearchTopology $SearchTopology -SearchServiceInstance $searchInstance 
    New-SPEnterpriseSearchAdminComponent -SearchTopology $SearchTopology -SearchServiceInstance $searchInstance
     
    set-SPEnterpriseSearchAdministrationComponent -SearchApplication $ServiceApplication -SearchServiceInstance  $searchInstance
     
    Remove-Item -Recurse -Force -LiteralPath $IndexLocation -ErrorAction SilentlyContinue
    mkdir -Path $IndexLocation -Force 
     
    New-SPEnterpriseSearchIndexComponent -SearchTopology $SearchTopology -SearchServiceInstance $searchInstance -RootDirectory $IndexLocation 
     
    Write-Host -ForegroundColor Green "Activating new topology"
    $SearchTopology.Activate()
     
    Write-Host -ForegroundColor Yellow "Next call will provoke an error but after that the old topology can be deleted - just ignore it!"
    $InitialSearchTopology.Synchronize()
     
    Write-Host -ForegroundColor Yellow "Deleting old topology"
    Remove-SPEnterpriseSearchTopology -Identity $InitialSearchTopology -Confirm:$false
    Write-Host -ForegroundColor Green "Old topology deleted"
    Write-Host -ForegroundColor Green "Done - start a full crawl and you are good to go (search)."


    Best regards, Andrii

    Donnerstag, 8. August 2013 13:34
  • Thanks.  I ran the script and it's been sitting at "Creating Search Service Application" for over 30 minutes.  Checking Central Admininistration, I can see the Search Service Application has been created (no proxy though).  And in SQL, all databases have been created. 

    Errors in event log:

    The Execute method of job definition Microsoft.Office.Server.Search.Administration.CustomDictionaryDeploymentJobDefinition (ID ad105b9d-8e9a-44a5-bae1-a648a6833030) threw an exception. More information is included below.

    The search service is not able to connect to the machine that hosts the administration component. Verify that the administration component '90e381e4-47fe-4a37-81c9-963e69865d95' in search application 'Search Service Application' is in a good state and try again.

    • Als Antwort vorgeschlagen rfarris2000 Dienstag, 3. Juni 2014 13:21
    Donnerstag, 8. August 2013 17:40
  • Hi Nika,

    It is a single server farm installation, right ? Does your user has necessary rights on SQL server?

    Regards,

    Tapan

    Donnerstag, 8. August 2013 18:08
  • Single server - standalone installation.  I double-checked and the user does have the necessary rights in SQL.
    Donnerstag, 8. August 2013 18:19
  • For the heck of it, I added 'securityadmin' role to the user account in SQL and the Search Application Topology came up with checks marks on all expect for 'Crawler'.  Same error on System Status though.

    Donnerstag, 8. August 2013 18:25
  • Check firewall settings - and if it enabled - disable and try again.

    Best regards, Andrii

    Donnerstag, 8. August 2013 20:50
  • Disabled firewall - same results.
    Freitag, 9. August 2013 12:53
  • Make sure you've installed the NDP45-KB2759112-x64 prereq, even if it was initially installed rerun to see if this corrects the issue, you'll need to reboot after the install.

    MCITP-EA | "Never test how deep the water is with both feet"

    Samstag, 10. August 2013 14:01
  • I've had much better results with the search service if the following updates are installed BEFORE SHAREPOINT 2013 IS EVEN INSTALLED.

    http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=406

    If SharePoint is already installed, I don't have much luck resolving this error.


    Please mark my response as an answer if appropriate.
    Learn.SharePoint.com

    Sonntag, 11. August 2013 06:00
  • The updates were installed prior to installing SharePoint.  I'll rerun the KB2759112 update and see what happens. 
    Montag, 12. August 2013 13:21
  • let me rephrase - Run windows update on your OS until there are no more udpates, not even optional ones. then ensure the following updates are installed. After restarting, more updates will pop up as available. Keep installing and rebooting until there are no more updates to download and install.

    KB2472264, KB2554876, KB2708075, KB2765317

    This is all BEFORE you install SharePoint 2013

    Believe me, this works if you do it


    Please mark my response as an answer if appropriate.
    Learn.SharePoint.com



    Montag, 12. August 2013 16:26
  • Try this http://technet.microsoft.com/en-us/library/ee704553.aspx

    Let me know!


    AJ MCTS: SP 2010 Configuration MCSA: Windows 7 If you find this post useful kindly please mark it as an answer :) TY

    Dienstag, 13. August 2013 19:49
  • Hi Nika.

    First of all, have you tried running SharePoint Products Configuration Wizard 2013 and just go thru the steps "Do not disconnect this server from farm" and "Continue tho host the website" just to make sure your installation is in good state.

    Then I would like to ask you to run the following from SP Powershell to make sure the services is not facing some loopback auth check issues... If you haven't run it already.

    New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck"  -value "1" -PropertyType dword

    Restart the SharePoint Server after this and check if the Search Admin Component is more successfull.

    I know another one posted a PS script to create the Search Service already, but i will post one as well as I have successfully used many times.
    Note that you have to change the -account on the first line appropiately, as well the SharePoint_Search DB name if you would like another standard.

    $saAppPoolName = new-spserviceapplicationpool –name "Search Service Application" –account DOMAIN\USER
    $searchServerName = (Get-ChildItem env:computername).value
    $serviceAppName = "Search Service Application"
    $searchDBName = "SharePoint_Search"
    $saAppPool = Get-SPServiceApplicationPool $saAppPoolName
    Write-Host "Starting Search Service Instances..."
    Start-SPEnterpriseSearchServiceInstance $searchServerName
    Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $searchServerName
    Write-Host "Creating Search Service Application and Proxy..."
    $searchServiceApp = New-SPEnterpriseSearchServiceApplication -Name $serviceAppName -ApplicationPool $saAppPoolName -DatabaseName $searchDBName
    $searchProxy = New-SPEnterpriseSearchServiceApplicationProxy -Name "$serviceAppName Proxy" -SearchApplication $searchServiceApp
    Write-Host "Configuring Search Component Topology..."
    $clone = $searchServiceApp.ActiveTopology.Clone()
    $searchServiceInstance = Get-SPEnterpriseSearchServiceInstance
    New-SPEnterpriseSearchAdminComponent –SearchTopology $clone -SearchServiceInstance $searchServiceInstance
    New-SPEnterpriseSearchContentProcessingComponent –SearchTopology $clone -SearchServiceInstance $searchServiceInstance
    New-SPEnterpriseSearchAnalyticsProcessingComponent –SearchTopology $clone -SearchServiceInstance $searchServiceInstance 
    New-SPEnterpriseSearchCrawlComponent –SearchTopology $clone -SearchServiceInstance $searchServiceInstance 
    New-SPEnterpriseSearchIndexComponent –SearchTopology $clone -SearchServiceInstance $searchServiceInstance
    New-SPEnterpriseSearchQueryProcessingComponent –SearchTopology $clone -SearchServiceInstance $searchServiceInstance
    $clone.Activate()

    Best Regards.
    Philip
    Dienstag, 13. August 2013 22:00
  • Hi Philip,

    Thank you for all of your suggestions. I ran the Configuration Wizard, followed by the command from Powershell, restarted the server, and got the same errors.

    When I ran the script you provided, I get the following error after '$clone = $searchServiceApp.ActiveTopology.Clone()':

    Exception calling "Clone" with "0" argument(s): "The Operation is not allowed when you have a Standalone Installation."

    Also, all updates were already installed prior to installing SharePoint.

    Thx-

    Nika

    Freitag, 23. August 2013 15:53
  • Hi Nika.


    Ok, I must have missed that this was a standalone install.

    I guess you have re-runed the Search Component setup?
    If you still get the same error as mentioned at the end of this post, could you try running the following PS command:
    Get-SPEnterpriseSearchAdministrationComponent

    Identity of your search adm component, as your exception points to on a earlier post from you.
    90e381e4-47fe-4a37-81c9-963e69865d95

    Your earlier post:
    The search service is not able to connect to the machine that hosts the administration component. Verify that the administration Component '90e381e4-47fe-4a37-81c9-963e69865d95' in search application 'Search Service Application' is in a good state and try again.

    EDIT: I forgot that you need to apply ID of your current error message, since it of course would not be the same once you re-installed the service. :)
    My bad..
    You can also check in IIS - SharePoint Web Services for your search app id.
    It will contain the SearchService.svc.

    Best Regards.
    Philip

    • Bearbeitet Philip Kusel Mittwoch, 28. August 2013 14:30 rewrite of ID
    Mittwoch, 28. August 2013 14:26
  • Hi Philip,

    Thanks for getting back to me.  I ran Get-SPEnterpriseSearchAdministrationComponent and received only a “FALSE” value for “Initialized”. 

    I checked IIS-SharePoint Web Services, and noticed there were two entries that pointed to the same SearchService.svc.  I deleted both entries and also deleted the Search Service App once again to start from scratch.

    After deletion I noticed the same errors in the Event Logs pointing to Search apps and databases that have long been deleted:

    Could not access the Search database. A generic error occurred while trying to access the database to obtain the schema version info.

    Context: Application '127eeac5-2939-4fae-8dba-15feae0a7307-crawl-0' ___________________________________________________________________________

    Could not access the Search database. A generic error occurred while trying to access the database to obtain the schema version info.

    Context: Application '127eeac5-2939-4fae-8dba-15feae0a7307' ___________________________________________________________________________

    A database error occurred. Source: .Net SqlClient Data Provider Code: 4060 occurred 0 time(s) Description:  Error ordinal: 1 Message: Cannot open database "Search_Service_Application_DB_d5103090ada14e45a1d4c615f255d541" requested by the login. ___________________________________________________________________________

    I searched the registry and found several keys that point to these apps and databases located here:

    “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15.0\Search\Applications\127eeac5-2939-4fae-8dba-15feae0a7307\ResourceManager

    AND

    “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15.0\Search\Applications\127eeac5-2939-4fae-8dba-15feae0a7307-crawl-0\ResourceManager

    Do you think it's safe to remove these keys (both 127eeac5-2939-4fae-8dba-15feae0a7307 AND 127eeac5-2939-4fae-8dba-15feae0a7307-crawl-0)?

    Thanks,

    Nika

    Donnerstag, 29. August 2013 17:30
  • Hi,

    I have faced this same issue in our SharePoint 2013 environment, I have fixed this issue by following below steps

    Analysis: Execute below PS command in SharePoint Management Shell to verification of cause of this issue
    Get-SPTimerJob job-application-server-admin-service | fl

    It will return IsDisabled : True

    Solution: Execute below PS command in SharePoint Management Shell to fix this issue

    Enable-SPTimerJob job-application-server-admin-service

    Now it will return IsDisabled: False

    To verify it execute command

    Get-SPTimerJob job-application-server-admin-service | fl

    Restart SharePoint Timer Service
    IISRESET

    Reference : http://www.sharepointexcellence.com/2014/01/the-search-service-is-not-able-to_22.html


    Vivek Jagga - MCTS SharePoint 2010
    My Blog
    Follow Linkedin Group   


    Donnerstag, 23. Januar 2014 18:33
  • Thanks. You save me a lot of work. Elegant solution.
    Sonntag, 26. Januar 2014 13:24
  • Hi Nika, did you ever find a solution to this issue as I am facing a similar one.

    Cheers

    Rob

    Mittwoch, 7. Mai 2014 09:09
  • I can always get Search to provision using the GUI but PowerShell seems to fail with errors above.  I checked the timer job as suggested but it was already enabled.


    Dennis Bottjer | Follow Me: @dbottjer | Blog: Dennis Bottjer.com

    Montag, 3. November 2014 18:39
  • I just faced the same issue. The problem was the job-application-server-admin-service timer job.

    Running the PS command 'Get-SPTimerJob job-application-server-admin-service | fl' gave no result, and it seemed that the timer job itself was gone.

    Running 'stsadm -o installfeature -name SharedServices -force' added the timer jobs and everything started working ..

    • Als Antwort vorgeschlagen HN.S Freitag, 6. April 2018 08:31
    Freitag, 30. Januar 2015 11:09
  • This one finally fixed my issue! We spent 3 1/2 days going through the 50 different fixes for the error "Search service is not able to connect to the machine that hosts the administration component". I've deleted and rebuilt the app with Central Admin and via PowerShell, and always this error showed up. I'm not sure why or what broke Search - but this simple stsadmn command fixed it!  Thank you!
    Freitag, 13. Juli 2018 16:40