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

Steven Hahn 35 Reputation points
2023-04-14T20:34:57.4566667+00:00

Screenshot 2023-04-14 131019

Running into this issue with SharePoint Subscription Edition. (Latest patches installed as of 4/14/2023) I had Search Services installed but was having issues with Indexes. So the best solution is to remove and re-run the script. But then I get this and the dreaded event 6842: Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance I've gone through all the articles I could find:
https://social.technet.microsoft.com/wiki/contents/articles/28772.sharepoint-server-the-search-service-is-not-able-to-connect-to-the-machine-that-hosts-the-administration-component.aspx

  • Installed the latest patches
  • Re-ran PSCONFIG to make sure there were not any issues
  • Changed to use the FARM account for the Application_Pool
  • Cleared the configuration CACHE on all servers in the farm
  • Changed the Application Pool to the SharePoint Web Services System pool
  • Removed all of Search via a script, through the GUI and both.. I even set this up in a lab with a front-end and a search-server:
  • Install Search via the GUI, everything works fine
  • Take snapshots of entire environment
  • Go to un-install search, and then add back via the GUI, and it breaks without any configuration changes
  • Restore everything back from snapshots, and it is working once again.
  • Ran through all the troubleshooting steps above in the TEST environment as well as my DEV environment, with the same results. If I run a script and not use the GUI to install - it will hang when trying to create and just sits like this forever: User's image

You can see the event logs as it keeps trying over and over every minute, then a 6398 error message, and repeats: User's image

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,221 questions
{count} vote

Accepted answer
  1. Benjamin Freitag 101 Reputation points
    2023-04-28T09:07:37.1666667+00:00

    Microsoft confirmed it's a known issue, it's now documented in the Known issues in this update

    Search service applications cannot be successfully created starting with the March 14, 2023 security update for SharePoint Server Subscription Edition (KB 5002355). The Search Service Application: Search Administration page in Central Administration will show the administrative status of newly created Search service applications as "The search service is not able to connect to the machine that hosts the administration component." Search service applications created before the March 14, 2023 security update is installed are unaffected and will continue to function normally. This issue will be fixed in a future update for SharePoint Server Subscription Edition.

    Let's wait and hope for the next CU in May.

    1 person found this answer helpful.

5 additional answers

Sort by: Most helpful
  1. Benjamin Freitag 101 Reputation points
    2023-05-10T14:32:33.9866667+00:00

    This issue is fixed in the May 2023 CU. The Search Service works now in our new SharePoint Farms.

    The SharePoint Products Configuration Wizard stucked on taks 9 of 10 at 10%, on both servers. I had to clear the farm-cache and run Psconfig.exe, as described here.

    1 person found this answer helpful.
    0 comments No comments

  2. Yanli Jiang - MSFT 21,446 Reputation points Microsoft Vendor
    2023-04-17T06:16:39.12+00:00

    Hi @Steven Hahn ,

    Check the steps that the Search Service Application is created correctly.

    Try rerunning the psconfiguration wizard.

    If the problem is still not resolved, please try the follow solutions:

    Solution # 1

    Simply change the application pool to use SharePoint Web Services System for search service applications and check.

    • Go IIS
    • In IIS > Expand server > Expand sites > Expand “SharePoint Web Services
    • Now check all the GUID 1 by 1 in content view unless you find searchadmin.svc and searchservice.svc
    • Right click GUID go to advance settings
    • Change the application to “SharePoint Web Services” > Click OK

    Solution # 2

    Enable the timer job and do IIS reset:

    • Run below PS command to enable the service.
    • Enable-SPTimerJob job-application-server-admin-service
    • Result ==> IsDisabled: False
    • Do Net Stop sptimerv4
    • Do Net start sptimerv4
    • Do iisreset

    Solution # 3

    Ensure the account has full control permissions on the Search service application and IIS account used by this service application

    • Open Central Admin > Select Security > Select “Configure service accounts”
    • Select the search service application
    • For “select account for this component” Select a account which has full permission

    For more information, please refer to: https://social.technet.microsoft.com/wiki/contents/articles/28772.sharepoint-server-the-search-service-is-not-able-to-connect-to-the-machine-that-hosts-the-administration-component.aspx


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Benjamin Freitag 101 Reputation points
    2023-04-21T15:34:11.9833333+00:00

    We just setup two new SharePoint Farms both with SharePoint Subscription Edition April 2023 CU (KB5002375) and ran into the same issue on both servers. This seems to be a show stopper. I also removed the entire Search Service Application and created it again, which didn't solve it. I used the GUI to create the Search Service Application. ULS shows these errors every minute, probably caused by the job-application-server-admin-service, same on both SharePoint Farms. Product: SharePoint Server Search, Level: Unexpected:

    failed to synchronize the admin component for application Search Service Application: System.Runtime.InteropServices.COMException (0x80070006): The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))    
     at Microsoft.Office.Server.Search.Administration.SearchApi.RunOnServer[T](CodeToRun`1 remoteCode, CodeToRun`1 localCode, Boolean useCurrentSecurityContext, Int32 versionIn)    
     at Microsoft.Office.Server.Search.Administration.SearchApi.AddApp(ComponentRole role, Boolean settingInRegistry, Int32 id, String localStoragePath, Boolean master, Guid partitionGuid)    
     at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.SynchronizeAdminComponent(SearchServiceApplication application)    
     at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()
    

    Product: SharePoint Server, Level: Critical:

    Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (afb7dd96-be3d-4576-b303-ea930958eeee).  Reason: One or more errors occurred.  Technical Support Details: System.AggregateException: One or more errors occurred. ---> System.Runtime.InteropServices.COMException: The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))    
     at Microsoft.Office.Server.Search.Administration.SearchApi.RunOnServer[T](CodeToRun`1 remoteCode, CodeToRun`1 localCode, Boolean useCurrentSecurityContext, Int32 versionIn)    
     at Microsoft.Office.Server.Search.Administration.SearchApi.AddApp(ComponentRole role, Boolean settingInRegistry, Int32 id, String localStoragePath, Boolean master, Guid partitionGuid)    
     at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.SynchronizeAdminComponent(SearchServiceApplication application)    
     at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()     -
     -- End of inner exception stack trace ---    
     at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()    
     at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)  ---> (Inner Exception #0) System.Runtime.InteropServices.COMException (0x80070006): The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))    
     at Microsoft.Office.Server.Search.Administration.SearchApi.RunOnServer[T](CodeToRun`1 remoteCode, CodeToRun`1 localCode, Boolean useCurrentSecurityContext, Int32 versionIn)    
     at Microsoft.Office.Server.Search.Administration.SearchApi.AddApp(ComponentRole role, Boolean settingInRegistry, Int32 id, String localStoragePath, Boolean master, Guid partitionGuid)    
     at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.SynchronizeAdminComponent(SearchServiceApplication application)    
     at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()<---
    

    Please help to solve this soon. Thanks.


  4. Yanli Jiang - MSFT 21,446 Reputation points Microsoft Vendor
    2023-05-04T06:37:41.51+00:00

    Hi @Steven Hahn ,

    Based on Bejamin's feedback, you can wait until the next update to fix this.

    https://support.microsoft.com/en-us/topic/description-of-the-security-update-for-sharepoint-server-subscription-edition-april-11-2023-kb5002375-1bbdc497-d120-4f43-a0d2-e9392d62dd1f#ID0EDJ

    This question is a broad question, I suggest you accept the answer so that more users who face this problem can know the news. Hope my answer brings you a direction.