none
How do you remove a DHCP failover in Windows Server 2012 when the DHCP manager and powershell commands fail? RRS feed

  • Question

  • Hello Everyone

    We have two domain controllers running Windows Server 2012.

    Both of them had DHCP installed and we configured a normal load balancing failover between the two servers for a IPV4 scope. This have been working really good for quite some time now. But after some recent security updates all of a suddan the primary DHCP controller is unable to communicate with the other DHCP server. If it had anything to do with the updates I do not know.

    But in the eventviewer of the primary DHCP controller the following two error messages was written.Both of the servers are using an external NTP pool that works well they are at the exact same time.

    The server detected that it is out of time synchronization with partner server: dc04 for failover relationship: 169.254.153.80-dc04.  The time is out of sync by: 480 seconds .

    The failover state of server: 169.254.153.80 for failover relationship: 169.254.153.80-dc04 changed from: NORMAL to COMMUNICATION_INT.

    I tried to remove the failover configuration but the primary DHCP controller won't let me. I tried a few different scenarions.

    But if i choose deconfigure Failover this is what happens.

    Check status of the failover relationship..............Failed.
    The DHCP Server service is not running on the target computer.
    Deconfigure failover failed. Error 1722. The DHPC server is not running on the target computer.

    I then tried to change the status of the failover server to Partner down to be able to remove it. But the primary DHCP server cannot even change that. It replies with.

    The DHCP service is not running on the target computer.

    At this point DHCP service was running fine on both servers and both used the same timeservers and the time matched correctly. After this I tried to remove my DHCP scope to create it again but it says I cannot remove it as long as I got a failover configured.

    The last thing we tried was removing the DHCP failover from the secondary DHCP server and that worked. However our primary DHCP server still thinks it has a failover setup with the secondary DHCP server. We uninstalled the DHCP server role from the secondary DHCP server and still no luck.

    Anyone know how to force a removal of an old failover configuration so we can set up a new one and maybe someone understand the time difference it mentions?

    Thanks.

    Kind Regards!


    • Edited by Damdor_ Tuesday, November 20, 2012 2:34 PM Added a thanks!
    Tuesday, November 20, 2012 2:25 PM

Answers

  • Hi Damdor,

    You are right. You do not need the cluster feature for the new DHCP failover in Windows Server 2012.

    Regarding the message you are getting on the primary server -

    Check status of the failover relationship..............Failed.
    The DHCP Server service is not running on the target computer.
    Deconfigure failover failed. Error 1722. The DHPC server is not running on the target computer.

    Are you able to do any remote management operation on this DHCP server. The message seems to indicate that the DHCP MMC is unable to communicate with this DHCP server.

    Now that you have removed the relationship from the secondary, you should delete the failover relationship from primary DHCP server as well.

    You can do this using the DHCP PowerShell cmdlet Remove-DhcpServerv4Failover on the primary DHCP server and specify a -Force flag to delete the relationship. This operation can be done using DHCP MMC as well but you seem to be running into issues with DHCP MMC. Hence, the suggestion to use PowerShell cmdlet instead. After this, you will be left with the scope(s) being present on both servers. You will need to delete the scopes from one of the servers.

    Is it possible that the time out of sync error was transient and the servers recovered from it. Was the failover relationship in communication interrupted state before you proceeded to delete it.

    Regards

    Friday, November 30, 2012 5:06 PM
  • Hello,

    Thank you for your answer.

    Your solution did help me solve my problem. But the key to it all was the -force command in the cmdlet.

    It did not work to remove the failover the way you mentioned. I received the same error in powershell as I got using DCHP manager. Got the following errors when I tried to remove it using powershell.

    PS C:\Windows\system32> Remove-DhcpServerv4Failover -ComputerName dc03 -Name 169.254.153.80-dc04 -Force
    WARNING: Failed to delete the failover relationship 169.254.153.80-dc04 on the partner server dc04. 

    PS C:\Windows\system32> Remove-DhcpServerv4FailoverScope -ComputerName dc03 -Name 169.254.153.80-dc04 -ScopeID 10.10.
    0.0 -Force
    Remove-DhcpServerv4FailoverScope : Failed to get failover relationship name 169.254.153.80-dc04 on DHCP server dc03.
    At line:1 char:1
    + Remove-DhcpServerv4FailoverScope -ComputerName dc03 -Name 169.254.153.80-dc04 -S ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (169.254.153.80-dc04:root/Microsoft/...v4FailoverScope) [Remove-DhcpServ
       erv4FailoverScope], CimException
        + FullyQualifiedErrorId : DHCP 20115,Remove-DhcpServerv4FailoverScope

    The solution that worked for me was to remove the DHCP scope using the -force command from my primary dhcp server and then recreate the failover relationship with my other DHCP server. But i had to manually recreate the scope so I am lucky that I have quite a simple dhcp setup. It was also possible to set it up on my secondary dhcp server before I removed it from the primary dhcp server using the -force command. So now i have the failover setup and working again.

    I do not know what caused the problem from the start.

    But thanks for your answer.

    Monday, December 3, 2012 2:48 PM

All replies

  • Try to stop the DHCP service first and then remove DHCP role from the node, If you want to remove it.


    Regards, Ravikumar P

    Tuesday, November 20, 2012 3:57 PM
  • Hello Ravikumar.

    Thanks for your reply.

    I actually did'nt know that you needed the Cluster Feature installed on the server to do it. It's been working great without having that feature installed at all.

    I created my DHCP Scope then right clicked it and just choose configure DHCP failover and it seemed quite simple and have worked fine until now.

    What is the correct way to do it if we were to ask Microsoft? ;)

    Kind regards.

    Tuesday, November 20, 2012 4:06 PM
  • Hi Damdor,

    You are right. You do not need the cluster feature for the new DHCP failover in Windows Server 2012.

    Regarding the message you are getting on the primary server -

    Check status of the failover relationship..............Failed.
    The DHCP Server service is not running on the target computer.
    Deconfigure failover failed. Error 1722. The DHPC server is not running on the target computer.

    Are you able to do any remote management operation on this DHCP server. The message seems to indicate that the DHCP MMC is unable to communicate with this DHCP server.

    Now that you have removed the relationship from the secondary, you should delete the failover relationship from primary DHCP server as well.

    You can do this using the DHCP PowerShell cmdlet Remove-DhcpServerv4Failover on the primary DHCP server and specify a -Force flag to delete the relationship. This operation can be done using DHCP MMC as well but you seem to be running into issues with DHCP MMC. Hence, the suggestion to use PowerShell cmdlet instead. After this, you will be left with the scope(s) being present on both servers. You will need to delete the scopes from one of the servers.

    Is it possible that the time out of sync error was transient and the servers recovered from it. Was the failover relationship in communication interrupted state before you proceeded to delete it.

    Regards

    Friday, November 30, 2012 5:06 PM
  • Hello,

    Thank you for your answer.

    Your solution did help me solve my problem. But the key to it all was the -force command in the cmdlet.

    It did not work to remove the failover the way you mentioned. I received the same error in powershell as I got using DCHP manager. Got the following errors when I tried to remove it using powershell.

    PS C:\Windows\system32> Remove-DhcpServerv4Failover -ComputerName dc03 -Name 169.254.153.80-dc04 -Force
    WARNING: Failed to delete the failover relationship 169.254.153.80-dc04 on the partner server dc04. 

    PS C:\Windows\system32> Remove-DhcpServerv4FailoverScope -ComputerName dc03 -Name 169.254.153.80-dc04 -ScopeID 10.10.
    0.0 -Force
    Remove-DhcpServerv4FailoverScope : Failed to get failover relationship name 169.254.153.80-dc04 on DHCP server dc03.
    At line:1 char:1
    + Remove-DhcpServerv4FailoverScope -ComputerName dc03 -Name 169.254.153.80-dc04 -S ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (169.254.153.80-dc04:root/Microsoft/...v4FailoverScope) [Remove-DhcpServ
       erv4FailoverScope], CimException
        + FullyQualifiedErrorId : DHCP 20115,Remove-DhcpServerv4FailoverScope

    The solution that worked for me was to remove the DHCP scope using the -force command from my primary dhcp server and then recreate the failover relationship with my other DHCP server. But i had to manually recreate the scope so I am lucky that I have quite a simple dhcp setup. It was also possible to set it up on my secondary dhcp server before I removed it from the primary dhcp server using the -force command. So now i have the failover setup and working again.

    I do not know what caused the problem from the start.

    But thanks for your answer.

    Monday, December 3, 2012 2:48 PM
  • Hi Damdor,

    Glad to know that you were able to get failover up and running again.

    Regarding the first command -

    PS C:\Windows\system32> Remove-DhcpServerv4Failover -ComputerName dc03 -Name 169.254.153.80-dc04 -Force
    WARNING: Failed to delete the failover relationship 169.254.153.80-dc04 on the partner server dc04.

    Here the command actually succeeded in removing the failover relationship from the server dc-03. Only removal of relationship from the partner server (dc04) failed which has been reported as a _Warning_.

    Your second command - Remove-DhcpServerv4FailoverScope  - which removes a scope (10.10.0.0) from a failover relationship failed since your first command had succeeded in deleting the failover relationship.

    Time out of sync error of 8 minutes seems rather odd. Could you please respond to my other question -

    "Is it possible that the time out of sync error was transient and the servers recovered from it. Was the failover relationship in communication interrupted state before you proceeded to delete it."

    Thanks.

    Wednesday, December 5, 2012 8:52 AM
  • Hi again.

    Ill try to answer your question.

    "Is it possible that the time out of sync error was transient and the servers recovered from it. Was the failover relationship in communication interrupted state before you proceeded to delete it."

    The servers never seemed  to recover from the time out of sync error. They were both flagged as Communication interrupted.

    Kind regards

    and thanks again.

    Wednesday, December 5, 2012 11:27 AM
  • I am looking for some syntax help here.

    I have DC1 and DC2.

    DC1 shows normal with relationship CCWTech-dc2 and partner server dc2 in load balance.

    DC2 shows normal with the same CCWTech-dc2 and partner server 169.254.114.117 in load balance.

    Can anyone assist with the PowerShell Command I need to run to remove the fail over relationship?

    I don't do much powershell.

    Thursday, May 15, 2014 9:42 PM
  • I am looking for some syntax help here.

    I have DC1 and DC2.

    DC1 shows normal with relationship CCWTech-dc2 and partner server dc2 in load balance.

    DC2 shows normal with the same CCWTech-dc2 and partner server 169.254.114.117 in load balance.

    Can anyone assist with the PowerShell Command I need to run to remove the fail over relationship?

    I don't do much powershell.

    Here is what helped me format PowerShell:

    http://technet.microsoft.com/en-us/library/jj590715.aspx

    Ran on DC1:

    Remove-DhcpServerv4Failover -ComputerName dc1.ccwtech.local -Name CCWTech-dc2 -Force

    Ran on DC2:

    Remove-DhcpServerv4Failover -ComputerName dc2.ccwtech.local -Name CCWTech-dc2 -Force

    Worked great! I hope this helps others who aren't familiar with PowerShell.

    • Proposed as answer by Allen-CCWTech Thursday, May 22, 2014 1:27 PM
    Thursday, May 22, 2014 1:27 PM
  • I think the dhcp failover needs some in depth rework.

    I liked the idea of a second DHCP server on the net and configured a standby failover.

    I chose standby because we do not use dynamic dns update because of too many duplicate devices in a heterogenous network with not all AD integrated windows machines.

    We use VLAN segments and do manual reservation of IP addresses especially for statically configured servers

    A thing I don't like was the reservation of a certain percentage of IPs to the standby which means I cannot use up all IPs e. g. in the server VLAN.

    Lately we had an outage of our primary DHCP and the standby went into place.

    So far so good.

    But 2 days after the incident there where no DHCP addresses available anymore.

    It looked like the secondary still was in charge and the failover relationship was broken.

    Both servers where on NTP time sync but something did not work anymore.

    It became a difficult task to get rid of the failover relationship and more so to get the scopes deleted on the secondary server.

    I don't want to run the dhcp service on the secondary because it must not interfere with the primary.

    But to rebuild the failover relationship I do need to delete existing scopes on the secondary.

    Alas I cannot delete scopes if the service doesn't run.

    Who t. h. thought of such interlocking mechanisms?

    Monday, July 11, 2016 12:43 PM
  • Hi Guys,

       Same issue i managed to remove the failover  but i have stop dhcp on my standby server. 

      So do i have to delete the scope manually and re configure the fail over? 

    when this hot standby up will that cause any issues?

     As

    Monday, November 11, 2019 9:09 AM
  • Hi 

    Deactivate Secondary DHCP  Server And Deconfigure  Fail over and  continue.

    Best Regards.

    Monday, December 16, 2019 9:31 AM