DC卸载失败, 错误信息 Event ID: 2022 Event ID: 2091

问题描述:Windows Server 2008R2 DC卸载失败 Error messagewhen you run the "Adprep /rodcprep" command in Windows Server 2008:"Adprep could not contact a replica for partitionDC=DomainDnsZones,DC=Contoso,DC=com"

错误信息 Event ID: 2022 Event ID: 2091

原因分析:

查看日志报错信息如下

Event ID:2022

Theoperations master roles held by this directory server could not transfer to thefollowing remote directory server.

Remotedirectory server:

\\DC01.XXXXXX.COM

This is preventingremoval of this directory server.

UserAction

Investigatewhy the remote directory server might be unable to accept the operations masterroles, or manually transfer all the roles that are held by this directoryserver to the remote directory server. Then, try to remove this directoryserver again.

AdditionalData

Errorvalue:

5005 Thedirectory service is missing mandatory configuration information, and is unableto determine the ownership of floating single-master operation roles.

There wasalso a second Event ID: 2091

Ownershipof the following FSMO role is set to a server which is deleted or does notexist.

Operationswhich require contacting a FSMO operation master will fail until this conditionis corrected.

FSMORole: CN=Infrastructure,DC=ForestDnsZones,DC=XXXXX,DC=COM

FSMOServer DN: CN=NTDSSettings\0ADEL:bf05e3dc-9acf-4de5-9358-89bc719fb445,CN=-AD01\0ADEL:dbe9f89d-aa5c-4ad0-bee6-618aa0f1fa31,CN=Servers,CN=MainOffice,CN=Sites,CN=Configuration,DC=U,DC=local

根据日志分析,可以看到FSMO的指向是非法的DC信息,该问题是由第二个新的域控制器具有与旧的死域控制器相同的IP地址造成的,这导致剩余的DC变得混乱,认为其丢失的DC仍然活着,并且破坏了FSMORole所有者的编辑,使用ADSI查看信息可以看到错误的FSMO信息

  • 右键单击ADSI编辑根并单击连接...
  • 使用以下连接点:DC = DomainDNSZones,DC =domain DC =com
  • 单击默认命名上下文输入DC.domain.Com。
  • 单击DC = DomainDNSZones
  • 双击CN =Infrastructure。
  • 找到fSMORoleOwner属性

如下图:

在上面,fSMORoleOwner中看到0ADEL,它指的是一个被删除的DC。

正确的FSMORoleOwner值应该为

解决方法

使用VBS脚本同步所有的DC服务器的FSMO信息(在拥有操作主机的DC上运行)

cscript fixfsmo.vbsdc=forestdnszones,dc=XXXXXX,dc=com

cscript fixfsmo.vbs dc=domaindnszones,dc=XXXXX,dc=com

如下命令保存成VBS脚本,然后执行

参考文档https://support.microsoft.com/zh-cn/kb/949257

const ADS_NAME_INITTYPE_GC = 3

const ADS_NAME_TYPE_1779 = 1

const ADS_NAME_TYPE_CANONICAL = 2

set inArgs = WScript.Arguments

if (inArgs.Count = 1) then

‘Assume the command line argument is the NDNC (in DN form) to use.

NdncDN = inArgs(0)

Else

Wscript.StdOut.Write "usage: cscript fixfsmo.vbs NdncDN"

End if

if (NdncDN <> "") then

‘Convert the DN form of the NDNC into DNS dotted form.

Set objTranslator = CreateObject("NameTranslate")

objTranslator.Init ADS_NAME_INITTYPE_GC, ""

objTranslator.Set ADS_NAME_TYPE_1779, NdncDN

strDomainDNS = objTranslator.Get(ADS_NAME_TYPE_CANONICAL)

strDomainDNS = Left(strDomainDNS, len(strDomainDNS)-1)

Wscript.Echo "DNS name: " & strDomainDNS

‘Find a domain controller that hosts this NDNC and that is online.

set objRootDSE = GetObject("LDAP://" & strDomainDNS &"/RootDSE")

strDnsHostName = objRootDSE.Get("dnsHostName")

strDsServiceName = objRootDSE.Get("dsServiceName")

Wscript.Echo "Using DC " & strDnsHostName

‘Get the current infrastructure fsmo.

strInfraDN = "CN=Infrastructure," & NdncDN

set objInfra = GetObject("LDAP://" & strInfraDN)

Wscript.Echo "infra fsmo is " & objInfra.fsmoroleowner

‘If the current fsmo holder is deleted, set the fsmo holder to this domaincontroller.

if (InStr(objInfra.fsmoroleowner, "\0ADEL:") > 0) then

‘ Set the fsmo holder to this domain controller.

objInfra.Put "fSMORoleOwner", strDsServiceName

objInfra.SetInfo

‘ Read the fsmo holder back.

set objInfra = GetObject("LDAP://" & strInfraDN)

Wscript.Echo "infra fsmochanged to:" & objInfra.fsmoroleowner

End if

End if

时间: 2024-08-28 13:13:43

DC卸载失败, 错误信息 Event ID: 2022 Event ID: 2091的相关文章

EasyUI前台执行删除功能后台返回给前台信息 删除成功/删除失败+错误信息

新建一个类 1 public class JsonResult { 2 private Boolean success = true; 3 private String msg; 4 5 public JsonResult() { 6 } 7 8 public JsonResult(Boolean success, String msg) { 9 this.success = success; 10 this.msg = msg; 11 } 12 ...get/set 13 } Controll

ASP.NET MVC遍历ModelState的错误信息

在ASP.NET MVC中,ModelState中包含了验证失败的错误信息,具体被存储在ModelState.Values[i].Errors[j].ErrorMessage属性中.当然,通过打断点,单步调试可以查看具体的验证失败错误信息,但有时候希望把ModelState中的验证失败信息遍历显示出来. ModelState类型是ModelStateDictionary,ModelStateDictionary是一个字典集合,键是模型的各个属性,值是模型各个属性对应的ModelState. Mo

遍历ModelState中存储的错误信息

在服务器端验证中,有时我们添加了一个ModelError,然后还需要将该信息以JS的形式返回到客户端.如: [HttpPost] public ActionResult Index(LogOnModel model) { if (string.IsNullOrEmpty(model.UserName)) { ModelState.AddModelError("UserName", "请输入用户名."); return JavaScript("alert('

微信小程序云开发导入json数据报错:导入数据库失败, Error: Poll error, 导入数据任务(id:528440)异常,错误信息:line 1, column 750: bare &quot; in non-quoted-field

错误信息如下: 导入数据库失败, Error: Poll error, 导入数据任务(id:528440)异常,错误信息:line 1, column 750: bare " in non-quoted-field 导入数据库失败, Error: Poll error, 导入数据任务(id:528445)异常,错误信息:解析json文档错误,请检查导入文件格式,错误详情如下:invalid character ',' looking for beginning of value 导入JSON格式

POWERSHELL 计划任务的创建,收集DC中失败的登录信息并邮件通知

(注:本文参考以下前辈文章修改而来,源文章连接:http://itadmindev.blogspot.hk/2011/07/powershell-ad-dc-failed-logins-report.html) 原脚本只用于收集统计AD,过去一天时内,EventID为4625帐户登录失败的IP.主机名及登录次数. EventID对应的内容可参考以下内容:http://support.microsoft.com/kb/947226/zh-cn 我现在依需求,修改为需要收集过去一天内,ID为4771

安装VisualStudio时失败,错误信息安装包失败或证书不在有效期内

本人安装VisualStudio2012的时候,安装失败有:错误信息安装包失败或证书不在有效期内等 网上查找相关信息,得到的答案很少,我重新网上下载同版本软件继续之前的下载,但还是无效 之后我把软件卸载,再重新安装,结果居然可以了,为什么这次又可以了呢,自己想想,很可能是因为我之前安装VS2012的同时,也在安装SqlServer2012, 很可能是因为这2个软件不能同时安装,不然为什么卸载了之后,这次没有同时安装SqlServer2012,因为它已经安装好了, 结论:VisualStudio2

vistual studio 2012 安装失败,提示Microsoft Vistual Studio 2012 Devenv找不到元素,等错误信息

在安装vistual studio 2012过程中,出现安装失败,提示Microsoft Vistual Studio 2012 Devenv找不到元素,等错误信息 解决方法是更新对应的服务器补丁,更新完成后,重新安装vistual studio 2012,就可以通过. vistual studio 2012 安装失败,提示Microsoft Vistual Studio 2012 Devenv找不到元素,等错误信息

VS编译失败但是错误输出页中没有显示任何错误信息

VS编译失败但是错误输出页中没有显示任何错误信息这种情况对于VS新手来说简直是爆炸问题,完全不知道怎么办遇到这种情况不要慌,首先回想从上一次编译没有问题到现在,都做了什么操作,想起来后试着回退操作,然后可能就编译通过了,这个时候就能定位出影响编译失败的原因了加入做了多个操作没那就一个一个回退挨着试呗如果想不起来操作怎么办?找到VS底部,错误选项卡旁白,有一个输出选项卡,把编译输出信息拉到最后,会发现一句:编译一解决方案,成功*个,失败*个等类似信息,你会发现失败那里不是0,但是这个失败信息没有显

使用spring webflow,在前台页面中如何显示后端返回的错误信息

刚刚接触spring webflow,相关的资料并不是很多,并且大都是那种入门的 .xml文件的配置. 用到的CAS 最新的4.0版本用的就是web-flow流,前台页面使用的是表单提交.于是我就碰到了一个问题,问题描述如下: 第一次输入错误的用户名密码提示用户名密码错误,第二次输入了正确的用户名和密码仍然报错,校验不通过. 在使用cas之前的登录页面如果输入用户名和密码错误的话,会弹出alert提示框,这个是使用ajax请求实现的.而ajax请求的一般都是那种spring mvc的contro