V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
victorwu34
V2EX  ›  Java

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

  •  
  •   victorwu34 · 2019-06-05 21:21:10 +08:00 · 1791 次点击
    这是一个创建于 1779 天前的主题,其中的信息可能已经有所发展或是发生改变。

    在 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

    所以我应该怎么做

    哈哈不用了

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4981 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 09:39 · PVG 17:39 · LAX 02:39 · JFK 05:39
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.