none
Unable to change service account for the Distributed Cache

    Question

  • I am unable to change the service account for the App Fabric Distributed Cache.

    I am following the instructions in the Change Service Account section here: 

    http://technet.microsoft.com/en-us/library/jj219613.aspx#changesvcacct

    When I get to the part where I deploy my changes (with this line of PowerShell script: $cacheService.ProcessIdentity.Deploy()), I get the following error:

    Exception calling "Deploy" with "0" arguments(s):  "This operation uses the SharePoint Administration service (spadminV4), which could not be contacted. If the service is stopped or disabled, start it and try the operation again."

    I have a 3 server farm with an app server and a web server.

    • The distributed cache is running on the web server but not on the app server. The app server runs search and Microsoft recommends not running the distributed cache on the same server as the search server.
    • I am running the PowerShell scripts using the Install account, which has admin permissions to the farm, the distributed cache and both the app server and the web server. Note that I get the same error if I try to run the commands using the farm account, which does not have admin privileges to the web server or the app server but has admin privileges to the distributed cache and the farm.
    • Central Administration is running on the App server but not on the web server

    It appears that the PowerShell commands are trying to access Central Administration on the server that hosts the distributed cache (the web server), but Central Administration isn't there.

    Am I missing something? How do I get past this error and change the service account used by the distributed cache. I could try moving the distributed cache to app server, but that seems silly considering I just want to change the service account.


    Doug Hemminger http://www.sharepointdoug.com

    Thursday, February 28, 2013 3:14 PM

Answers

  • What follows is my test result, and i checked in Central Administration->Security->Configure Service Accounts and Services.msc after the powershell to find the service account has been changed. Just seems that the $cacheService.ProcessIdentity.Deploy() command is not needed here.

    $farm = Get-SPFarm
    $cacheService = $farm.Services | where {$_.Name -eq "AppFabricCachingService"}
    $accnt = Get-SPManagedAccount -Identity guyuming\appfabriccache
    $cacheService.ProcessIdentity.CurrentIdentityType = "SpecificUser"
    $cacheService.ProcessIdentity.ManagedAccount = $accnt
    $cacheService.ProcessIdentity.Update()
    $cacheService.ProcessIdentity.Deploy()
    Exception calling "Deploy" with "0" argument(s): "ErrorCode<ServiceAlreadyConfigured>:SubStatus<ES0001>:Service is already configured on this host. Run
    Remove-CacheHost to un-configure."
    At line:7 char:1
    + $cacheService.ProcessIdentity.Deploy()
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : CmdletInvocationException

    Update: I checked services.msc on the server where i run the powershell to find the account has been changed successfully. However, when i check the other SharePoint server, the account for the service instance is unchanged.

    I fixed it by stop and restart the Distributed Cache service instance for that server in Central Administration->Services on Server.

    Tuesday, March 26, 2013 7:11 AM
    Moderator

All replies

  • Hi Doug, 1 on which server did you run the change service account powershell? Same result from both web and app servers? 2. If above failed, Have you consider trun on sp admin service on all servers and run the command? Then trun off it after. Let us know if this helps James

    Please mark as Answered if it helped you
    James Tsai | SharePoint Consultant | MCPD,MCTS | www.jamestsai.net

    Thursday, February 28, 2013 11:48 PM
  • the error message is quite informative "This operation uses the SharePoint Administration service (spadminV4), which could not be contacted. If the service is stopped or disabled, start it and try the operation again"

    The spadminv4 service is not central administration, you can find it in services.msc, the name is SharePoint Administration service

    By the way, in my test environment, i found that distribute cache service need kerberos SPN (http://social.msdn.microsoft.com/Forums/en-CA/sharepointgeneral/thread/fd3bca97-5d75-4a67-87ca-aac7bb5f6352), if you change service account, you may need to change SPN configuration
    Tuesday, March 05, 2013 4:35 AM
    Moderator
  • I should have specified this in my original post, but the first thing I tried was turning on all the admin services. It didn't help. Same error. I suspect that there is some sort of permissions issue.

    GuYming, we are not using Kerberos. We are using claims with NTLM. Would I still need to do anything special for the service account?


    Doug Hemminger http://www.sharepointdoug.com


    Tuesday, March 05, 2013 12:30 PM
  • I somehow got it to work. I honestly don't know how. I restarted services, changed other service accounts and rebooted the machine. And somehow the service account changed at some point when I ran the PowerShell scripts to change the app fabric service account.

    If a moderator wants to close this question, I would appreciate it. My issue is resolved, but I don't have an answer for how the issue was resolved because I lost track of all the things I tried.


    Doug Hemminger http://www.sharepointdoug.com

    Tuesday, March 12, 2013 12:39 PM
  • I have this same issue and would like an answer.  I am running it on the admin and wfe server and the service is running.  

    I haven't started randomly rebooting and changing service accounts and services though.  Is that the recommendation here?

    mj

    Tuesday, March 19, 2013 7:48 PM
  • I do not think that is the recommendation. I think this may be a problem or a bug. I have seen several instances of issues reported on the forums with trying to change the distributed cache account.

    Doug Hemminger http://www.sharepointdoug.com

    Friday, March 22, 2013 12:27 PM
  • You can change the service account for distributed cache in Central Administration->Security->Configure Service Accounts.
    Monday, March 25, 2013 3:03 AM
    Moderator
  • Since when, GuYuming? When you try to change the service account in Central Administration, it tells you that it cannot be done there.

    Doug Hemminger http://www.sharepointdoug.com

    Monday, March 25, 2013 11:21 AM
  • What follows is my test result, and i checked in Central Administration->Security->Configure Service Accounts and Services.msc after the powershell to find the service account has been changed. Just seems that the $cacheService.ProcessIdentity.Deploy() command is not needed here.

    $farm = Get-SPFarm
    $cacheService = $farm.Services | where {$_.Name -eq "AppFabricCachingService"}
    $accnt = Get-SPManagedAccount -Identity guyuming\appfabriccache
    $cacheService.ProcessIdentity.CurrentIdentityType = "SpecificUser"
    $cacheService.ProcessIdentity.ManagedAccount = $accnt
    $cacheService.ProcessIdentity.Update()
    $cacheService.ProcessIdentity.Deploy()
    Exception calling "Deploy" with "0" argument(s): "ErrorCode<ServiceAlreadyConfigured>:SubStatus<ES0001>:Service is already configured on this host. Run
    Remove-CacheHost to un-configure."
    At line:7 char:1
    + $cacheService.ProcessIdentity.Deploy()
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : CmdletInvocationException

    Update: I checked services.msc on the server where i run the powershell to find the account has been changed successfully. However, when i check the other SharePoint server, the account for the service instance is unchanged.

    I fixed it by stop and restart the Distributed Cache service instance for that server in Central Administration->Services on Server.

    Tuesday, March 26, 2013 7:11 AM
    Moderator