LDAP 自定义 schema 删除 attributetype 报错(已解决)

2019-06-05 21:21:10 +08:00
 victorwu34

在 ApacheDS 中自定义了一个 schema 叫 myschema

在 myschema 里面定义了一个 Object Class 叫 MyUser OID 是 2.22.1

在 myschema 里面定义了 2 个 Attribute Type 分别叫 MyUserId OID 是 2.22.1.1 和 MyUserName 2.22.1.2

因为后来做了修改,现在想删除这个 schema 和里面的 class、attribute,但是删除的时候 MyUserId 无法删除

异常信息是:

LDAP:error code 53 UNWILLING_TO_PERFORM
...
...
...
Entry: m-oid=2.22.1.1,ou=attributetypes,cn=myschema,ou=schema
ERR_346 Cannot delete the AttributeType from registries, the resulting registries would be inconsistent
ERR_11012 The following SchemaObjects are referencing this SchemaObject:Object_CLASS,2.22.1

这个异常就是说, MyUser引用了他不能删除, 于是我就找到MyUser删除,这次的异常提示是:

LDAP:error code 54 LOOP_DETECT
ERROR_04273 OBJECT_CLASS with OID 2.22.1 not registered!

所以 MyUser 也一样不能删除

这个异常是说,MyUser 没有注册,我没有查到这个 register 指的是什么。

LOOP_DETECT 异常有一种情况是这么说的

If the server supports aliases and the process of **dereferencing an alias** eventually leads the server back to an alias entry that it has already encountered.

我去查这个 dereferencing an alias 指的是什么:

Searching the entry that an alias entry points to is known as dereferencing an alias

alias 指的是

An alias entry in an LDAP directory is an entry that points to another entry.

这里的 point to 什么意思不是很明白,我的理解是,一个 entry 中如果有 attribute 对应的 value 引用到了另外一个 entry,那么这个 entry 就叫做 alias。

所以 dereferencing an alias 就是说查询一个 entry 指向的其他 entry 所以 LOOP_DETECT 异常的解释就是

如果 ldap 服务器支持 alias,那么查找一个 entry 引用的其他 entry 的时候,查到了刚才已经查到的结果(类似于循环引用?)

回到我的情况,MyUser里面没有 attribute 的 value 用到MyUserId

所以我应该怎么做

哈哈不用了

1895 次点击
所在节点    Java
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/571274

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX