StartDagServerMaintenance.ps1 failed

Answered StartDagServerMaintenance.ps1 failed

  • Thursday, May 19, 2011 7:29 PM
     
     

    I'm trying to apply windows update to several Exchange 2010 DAG member servers.  I ran StartDagServerMaintenance.ps1 on the first DAG member server and got the following error below.

    Does anyone know how to fix this?

     

    Thanks in advance.

     

    -----------------------

    [PS] C:\apps\Exchange\Scripts>.\StartDagServerMaintenance.ps1 -serverName mbx01
    WARNING: [18:42:24.717 UTC] Call-ClusterExe: cluster.exe did not succeed, but 5 was not a retry-able error code. Not
    attempting any other servers. This may be an expected error by the caller.
    WARNING: The Resume operation won’t have an effect on database replication because database ‘DB01′ hosted on server
    ‘MBX01′ is the active mailbox database.
    WARNING: The Resume operation won’t have an effect on database replication because database ‘DB02′ hosted on server
    ‘MBX01′ is the active mailbox database.
    WARNING: The Resume operation won’t have an effect on database replication because database ‘DB03′ hosted on server
    ‘MBX01′ is the active mailbox database.
    WARNING: The Resume operation won’t have an effect on database replication because database ‘DB04′ hosted on server
    ‘MBX01′ is the active mailbox database.
    Log-Error : [18:42:24.717 UTC] Start-DagServerMaintenance: Failed to suspend the server mbx01 from hosting the Primary
    Active Manager, returned 5.
    At C:\apps\Exchange\Scripts\StartDagServerMaintenance.ps1:165 char:14
    + Log-Error <<<< ($StartDagServerMaintenance_LocalizedStrings.res_0004 -f $serverName,$LastExitCode,"
    tart-DagServerMaintenance") -stop
    + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Log-Error

    ----------------------------------

All Replies

  • Thursday, May 19, 2011 7:34 PM
    Moderator
     
     Proposed Answer

    Is replication healthy? (test-replicationhealth)

     

    Any other event log errors?

    Everything look good in the Failover Cluster Manager?

    Can you move the PAM manually to another server?

    cluster group "Cluster Group" /move

     

    • Proposed As Answer by exxczyk Friday, April 27, 2012 4:50 PM
    •  
  • Monday, May 23, 2011 3:25 AM
    Moderator
     
     Answered

    Hi,

     

     

    As we know, StartDagServerMaintenance.ps1 will put a DAG member into maintenance mode, moving the active databases off the server.

    According to the error message, the DAG member failed to suspend the active database.

    1. It looks like cluster errors, you could run this command to check it.

    Test-ReplicationHealth
    Test-ServiceHealth

     

    2. Could you please try to re-index the search catalog for the passive database? When finished running these commands then try to run the maintenance scripts again.

    Get-MailboxDatabaseCopyStatus -Server <Dag Node 1> | where {$_.Status -like "Healthy"} | Update-MailboxDatabaseCopy -catalogonly

    Get-MailboxDatabaseCopyStatus -Server <Dag Node 2> | where {$_.Status -like "Healthy"} | Update-MailboxDatabaseCopy –catalogonly

     

    3. Could you please try to suspend the active database copy manually then try to run the maintenance scripts again.

     

    Suspend or Resume a Mailbox Database Copy


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Wednesday, May 25, 2011 3:35 PM
     
     
    I'm having the same issue running StopDagServerMaintenance.ps1 - I have tried these solutions proposed by Jerome but they have not resolved the issue.  I am trying a complete reseed of the copies now.
  • Thursday, May 26, 2011 3:01 AM
    Moderator
     
     

    Hi Red-Pat,

     

    What about you? Do you have any update?


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Thursday, June 02, 2011 9:11 PM
     
     
    I've run across this at a few of my clients as well when using the scripts.   Any update?
    Christopher Holley EC Technologies
  • Thursday, July 07, 2011 10:00 PM
     
     

    I've got an issue running the startdagservermaintenance script as well.

    Replication and Service health - AOK.

    When I run the script EMS errors out as follows: "Add-PSsnapin : The Windows Powershell snap-in 'Microsoft.Exchange.Management.Powershell.E2010' is not installed on this machine. At C:\Program Files\Microsoft\Exchange Server\V14\Scripts\StartDagServerMaintenance.ps1:46 char:21 Add-PsSnapin <<<< Microsoft.Exchange.Management.Powershell.E2010 -ErrorAction:Stop............."


    DQ
  • Friday, July 08, 2011 10:14 PM
     
     
    anybody get an update on this? currently having this issue also. HELP!
  • Wednesday, July 20, 2011 6:20 PM
     
     Proposed Answer

    WIth a great amount of troubleshooting I found the answer in our environment.

    4 out of our 6 Exchange 2010 servers were missing 2 out of the 3 required registry keys under HKLM\Software\Microsoft\Powershell\1\PowerShellSnapins\

    The   Microsoft.Exchange.Management.PowerShell.Setup key was present.

    The following 2 were missing:  (NOTE: the paths need to be updated as per your install locations)

    Microsoft.Exchange.Management.PowerShell.E2010

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.Exchange.Management.PowerShell.E2010]

    "CustomPSSnapInType"="Microsoft.Exchange.Management.PowerShell.AdminPSSnapIn"

    "ApplicationBase"="C:\\Program Files\\Microsoft\\Exchange Server\\V14\\bin"

    "AssemblyName"="Microsoft.Exchange.PowerShell.Configuration, Version=14.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

    "Description"="Admin Tasks for the Exchange Server"

    "ModuleName"="C:\\Program Files\\Microsoft\\Exchange Server\\V14\\bin\\Microsoft.Exchange.PowerShell.Configuration.dll"

    "PowerShellVersion"="1.0"

    "Vendor"="Microsoft Corporation"

    "Version"="14.0.0.0"

    Microsoft.Exchange.Management.PowerShell.Support

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.Exchange.Management.Powershell.Support]

    "CustomPSSnapInType"="Microsoft.Exchange.Management.Powershell.Support.SupportPSSnapIn"

    "ApplicationBase"="C:\\Program Files\\Microsoft\\Exchange Server\\V14\\bin"

    "AssemblyName"="Microsoft.Exchange.Management.Powershell.Support, Version=14.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

    "Description"="Support Tasks for the Exchange Server"

    "ModuleName"="C:\\Program Files\\Microsoft\\Exchange Server\\V14\\bin\\Microsoft.Exchange.Management.Powershell.Support.dll"

    "PowerShellVersion"="1.0"

    "Vendor"="Microsoft Corporation"

    "Version"="14.0.0.0"


    DQ
    • Proposed As Answer by dq72 Wednesday, July 20, 2011 6:20 PM
    •  
  • Thursday, July 21, 2011 3:40 PM
     
     

    Does not appear to work for me either.  Brand new install of 2010SP1+RU3.

    It does actually move the active DB's over to the other DAG node and pause the 'maintenance' node in FCM but does not put the passive DB's in suspend mode.

    If I manually suspend the passive DB copies on the maintenance node and run StopDagServerMaintenance.ps1 it will resume the copies.
  • Thursday, August 04, 2011 2:49 PM
     
     

    Maybe this will help someone. I had this issue, but it turned out to be quite simple. (but annoying to figure out). I have a 3 node DAG. I added the 3rd mailbox server and then tried running the StartDagServerMaintenance.ps1 script from the 3rd mailbox server and against the 3rd mailbox server. I got this error:

    start-DagServerMaintenance: Failed to suspend the server mbx01 from hosting the Primary Active Manager, returned 5.

    However, if I run the script on a different mailbox server against the 3rd mailbox server it works great! The conclusion I came to is that you cannot run the script on the server that you're running it against.

     

    So make sure you run the script from a machine that is not the mailbox server you're trying to put into maintenance mode.

  • Thursday, August 04, 2011 4:44 PM
     
     

    Hi all,

    I was hoping the above would work for me but it makes no difference. :(

  • Saturday, August 20, 2011 8:27 PM
     
     

    Hi All,

    try running the Exchange Management Shell as administrator. This worked for me.


  • Monday, April 30, 2012 6:38 PM
     
     

    I run the script from another mailbox server against the one I wanted to update and it worked!

    Thank chusome


    • Edited by Reni114 Monday, April 30, 2012 6:38 PM
    •  
  • Thursday, May 24, 2012 12:03 PM
     
     

    Hi chusome,

    thanks for this! I run the schript from another server and it worked!

  • Wednesday, July 18, 2012 6:32 PM
     
     Answered

    Sorry for not providing update

    I simple ran EMS as an administrator and it worked.

    • Marked As Answer by Red_Pat Wednesday, July 18, 2012 6:32 PM
    •  
  • Thursday, September 06, 2012 12:29 PM
     
     

    It worked fine too, when i run it as an administrator

    Cheers, Uwe


    • Edited by AD-URZ Basel Thursday, September 06, 2012 12:30 PM
    •