{"id":3698,"date":"2023-03-26T16:48:13","date_gmt":"2023-03-26T16:48:13","guid":{"rendered":"https:\/\/geekmungus.co.uk\/?p=3698"},"modified":"2023-04-10T07:14:10","modified_gmt":"2023-04-10T07:14:10","slug":"microsoft-exchange-2016-how-to-fix-exchange-dag-witness-failed-state","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=3698","title":{"rendered":"Microsoft Exchange 2016 &#8211; How to Fix Exchange DAG Witness Failed State"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In certain situations the Exchange DAG witness can become a problem, this can occur during an upgrade or can happen if there is a network interruption. Although the DAG will continue to operate the witness is considered failed, which can cause odd behaviour in a failover scenario, as there is no quorum available for the database resource (i.e. to decide which side is going to be active and which passive).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"303\" height=\"167\" src=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/03\/image-2.png\" alt=\"\" class=\"wp-image-3699\" srcset=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/03\/image-2.png 303w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/03\/image-2-300x165.png 300w\" sizes=\"auto, (max-width: 303px) 100vw, 303px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">It is recommended to run the PowerShell console as Administrator.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"MicrosoftExchange2016HowtoFixExchangeDAGWitnessFailedState-ConfirmingtheIssue\">Confirming the Issue<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">To confirm the issue run the following PowerShell command from the Exchange Management Shell:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-DatabaseAvailabilityGroup -Identity \"DAG01\" -Status | format-list Name, *Witness*, Servers\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now in my output, I was seeing &#8220;InvalidConfiguration&#8221; under the WitnessShareInUse field.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"971\" height=\"192\" src=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/03\/image-3.png\" alt=\"\" class=\"wp-image-3701\" srcset=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/03\/image-3.png 971w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/03\/image-3-300x59.png 300w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/03\/image-3-768x152.png 768w\" sizes=\"auto, (max-width: 971px) 100vw, 971px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Notice the the WitnessShareInUse is showing &#8220;InvalidConfiguration&#8221;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you just try to set it back up again with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-DatabaseAvailabilityGroup -Identity \"DAG1603\" -WitnessServer \"exchserver1.domain.com\u201d -WitnessDirectory \"C:\\DAGFileShareWitnesses\\DAG1603.domain.com\"\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You get this error:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"970\" height=\"215\" src=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/03\/image-4.png\" alt=\"\" class=\"wp-image-3702\" srcset=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/03\/image-4.png 970w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/03\/image-4-300x66.png 300w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/03\/image-4-768x170.png 768w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"MicrosoftExchange2016HowtoFixExchangeDAGWitnessFailedState-Resolution\">Resolution<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">To resolve it you just need to set a new WitnessServer, in our setup we have two Witness servers each taking half of the pairs of the servers in each DAG. So instead, if you run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-DatabaseAvailabilityGroup&nbsp;-Identity&nbsp;\"DAG1603\"&nbsp;-WitnessServer&nbsp;\"wtgc-exch-wit-b.internal.sanger.ac.uk\u201d -WitnessDirectory \"C:\\DAGFileShareWitnesses\\DAG1603.internal.sanger.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><img decoding=\"async\" src=\"https:\/\/ssg-confluence.internal.sanger.ac.uk\/s\/-qx04a5\/8703\/51k4y0\/_\/images\/icons\/emoticons\/check.svg\" alt=\"(tick)\">&nbsp;Notice, this is a different WitnessServer specified&nbsp;<strong>wtgc-exch-wit-b.internal.sanger.ac.uk<\/strong>&nbsp;instead of&nbsp;<strong>wtgc-exch-wit-a.internal.sanger.ac.uk<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now to confirm its okay, re-run:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><code>Get<\/code><code>-DatabaseAvailabilityGroup<\/code>&nbsp;<code>-Identity<\/code>&nbsp;<code>\"DAG1603\"<\/code>&nbsp;<code>-Status<\/code>&nbsp;<code>|&nbsp;<\/code><code>format-list<\/code>&nbsp;<code>Name, *Witness*, Servers<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s better, its showing&nbsp;<strong>primary&nbsp;<\/strong>now.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"890\" height=\"167\" src=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/03\/image-5.png\" alt=\"\" class=\"wp-image-3703\" srcset=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/03\/image-5.png 890w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/03\/image-5-300x56.png 300w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/03\/image-5-768x144.png 768w\" sizes=\"auto, (max-width: 890px) 100vw, 890px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you also run this, you&#8217;ll see a quorum resource is now specified:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><code>Get<\/code><code>-ClusterQuorum<\/code>&nbsp;<code>|&nbsp;<\/code><code>fl<\/code>&nbsp;<code>*<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When it is operating correctly, the <strong>QuorumResource <\/strong>field will show a value, when it is not, this will be blank (typically).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Alternate Witness Server<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now, if like me you have the alternate witness server specified you may need to change this as well, for example, in our case each DAG uses two witness servers, so we have A and B servers specified as the WitnessServer and the AlternateWitnessServer, now it doesn&#8217;t matter which is which, as long as they are both different servers for maximum availability.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run the commands above to set a new directory setting specifying the different server for the alternate as per the original\/primary.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"MicrosoftExchange2016HowtoFixExchangeDAGWitnessFailedState-AdditionalInformation\">Additional Information<\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.stellarinfo.com\/blog\/fix-exchange-dag-witness-server-failed-state\/\">https:\/\/www.stellarinfo.com\/blog\/fix-exchange-dag-witness-server-failed-state\/<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.thatlazyadmin.com\/exchange-dag-witness-failed-state\/\">https:\/\/www.thatlazyadmin.com\/exchange-dag-witness-failed-state\/<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.nucleustechnologies.com\/blog\/fix-exchange-dag-witness-failed-state\/\">https:\/\/www.nucleustechnologies.com\/blog\/fix-exchange-dag-witness-failed-state\/<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In certain situations the Exchange DAG witness can become a problem, this can occur during an upgrade or can happen if there is a network interruption. Although the DAG will continue to operate the witness is considered failed, which can cause odd behaviour in a failover scenario, as there is no quorum available for the &#8230; <a title=\"Microsoft Exchange 2016 &#8211; How to Fix Exchange DAG Witness Failed State\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=3698\" aria-label=\"Read more about Microsoft Exchange 2016 &#8211; How to Fix Exchange DAG Witness Failed State\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32,14],"tags":[],"class_list":["post-3698","post","type-post","status-publish","format-standard","hentry","category-microsoft-exchange","category-microsoft-windows"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/3698","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3698"}],"version-history":[{"count":4,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/3698\/revisions"}],"predecessor-version":[{"id":3711,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/3698\/revisions\/3711"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3698"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}