You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Stefan Seelmann <ma...@stefan-seelmann.de> on 2018/03/18 16:35:29 UTC

Error: I do not know how to handle NameAndOptionalUID normalization

Hi,

the installers-in-docker test jenkins job shows strange errors like

ERROR [org.apache.directory.api.ldap.model.entry.Value] - ERR_04226 I do
not know how to handle NameAndOptionalUID normalization with objects of
class: sambaSID

See
https://builds.apache.org/view/D/view/Directory/job/dir-apacheds-docker-installers/113/console
for more of them.

Any idea what the cause could be?

Kind Regards,
Stefan

Re: Error: I do not know how to handle NameAndOptionalUID normalization

Posted by Emmanuel Lécharny <el...@gmail.com>.
> You can just reproduce by running the generated zip/tar.gz archive and
> look into the logs.


Indeed.


There are errors for AttributeType that belongs to schemas we don't load
by default.

The list of loaded schemas is : system, other, cosine, pwdpolicy,
inetorgperson, collective, krb5kdc, java, apache, core, apachemeta,
adsconfig

The list of schema we don't load is : rfc2307bis, autofs, samba, nis,
mozilla, dhcp, corba and apachedns.


Thus those are 'normal' errors. We may want to do something about those
errors, by avoiding t parse schema we don't need.

I'll give it a look tomorrow.


-- 
Emmanuel Lecharny

Symas.com
directory.apache.org


Re: Error: I do not know how to handle NameAndOptionalUID normalization

Posted by Emmanuel Lécharny <el...@gmail.com>.

Le 19/03/2018 à 21:57, Stefan Seelmann a écrit :
> On 03/19/2018 05:32 PM, Emmanuel Lécharny wrote:
</snip>
>>
>> wdyt ?
> 
> Is that a chicken-egg problem? To initialize the scheama partition we
> need the schema?

To read the cn=schema, we use the ou=schema (aka registries).

This is how it all works :
- first we load the registries, processing the enabled schemas
- then we initialize the partitions, including the schema partition

Obviously, some of the schema partition elements aren't known by the
registries (because we haven't load the disabled schemas), so we get
some errors - but that's not a problem, because we just load the
partition in memory discarding the errors we have met.

This is necessary because one can change the schema partition even if
the elements are invalid : once relaoded, that may be ok.

> 
> How does it work for the enabled schemas? Are they present before the
> schema partition is loaded?

Yes, we have loaded hem.

> 
> We init the SchemaManager with the SchemaLoader. Can't we just enable
> all schemas for initializing the schema partition?

Sadly there are some incompatibility between some of the schemas (nis
and rfc2307bis), so we can't load all of them.

What we can do though is to avoid reading the ldif files twice : if we
have loaded the schema in the registries, there is no need to load it
again while initializing the partition. Nte that it will not solve the
problem, just speed up he initialization a bit.

Thanks !

-- 
Emmanuel Lecharny

Symas.com
directory.apache.org


Re: Error: I do not know how to handle NameAndOptionalUID normalization

Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
On 03/19/2018 05:32 PM, Emmanuel Lécharny wrote:
> To be more specific :
> 
> when the schema partition is initialized, we read all the associated
> files. Many of them
> 
> For instance, when we read the apacheDnsDomainName ldif file, which is in :
> 
> ou=schema
>   |
>   +-- cn=apachedns
>         |
>         +-- ou=attributeTypes
>                |
>                +-- m-oid=1.3.6.1.4.1.18060.0.4.2.2.6.ldif
> 
> we get that entry :
> 
> 
> dn:m-oid=1.3.6.1.4.1.18060.0.4.2.2.6,ou=attributeTypes,cn=apachedns,ou=schema
> m-usage: USER_APPLICATIONS
> m-oid: 1.3.6.1.4.1.18060.0.4.2.2.6
> m-name: apacheDnsSoaMName
> m-description: The domain name of the name server that was the primary
> source of data for this zone
> m-obsolete: FALSE
> m-equality: caseIgnoreIA5Match
> m-supattributetype: apacheDnsDomainName
> entryParentId: bc4ca0cc-66e5-4c8e-8f16-b0d5f77e0ac9
> m-singlevalue: TRUE
> createTimestamp: 20150708131906.591Z
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.26
> m-nousermodification: FALSE
> m-collective: FALSE
> objectclass: metaAttributeType
> objectclass: metaTop
> objectclass: top
> entryUUID: bac4890c-08a4-4957-bca3-f441674c2569
> creatorsname: uid=admin,ou=system
> entryCSN: 20150708131902.875000Z#000001#000#000000
> 
> 
> At this piont, we need to process the following attributes and their
> values :
> 
> 
> m-supattributetype: apacheDnsDomainName
> 
> where the apacheDnsDomainName is not present in the SchemaManager,
> because the apachedns schema is not enabled. This generates the error
> you can see, which is not actually an error, but a problem with a non
> existant schema element definition.
> 
> Now, the question is : should we make that a warning instead of an
> error? (Note that in this very case, we continue to process the schema,
> it's a non blocking error).
> 
> wdyt ?

Is that a chicken-egg problem? To initialize the scheama partition we
need the schema?

How does it work for the enabled schemas? Are they present before the
schema partition is loaded?

We init the SchemaManager with the SchemaLoader. Can't we just enable
all schemas for initializing the schema partition?

Kind Regards,
Stefan


Re: Error: I do not know how to handle NameAndOptionalUID normalization

Posted by Emmanuel Lécharny <el...@gmail.com>.
To be more specific :

when the schema partition is initialized, we read all the associated
files. Many of them

For instance, when we read the apacheDnsDomainName ldif file, which is in :

ou=schema
  |
  +-- cn=apachedns
        |
        +-- ou=attributeTypes
               |
               +-- m-oid=1.3.6.1.4.1.18060.0.4.2.2.6.ldif

we get that entry :


dn:m-oid=1.3.6.1.4.1.18060.0.4.2.2.6,ou=attributeTypes,cn=apachedns,ou=schema
m-usage: USER_APPLICATIONS
m-oid: 1.3.6.1.4.1.18060.0.4.2.2.6
m-name: apacheDnsSoaMName
m-description: The domain name of the name server that was the primary
source of data for this zone
m-obsolete: FALSE
m-equality: caseIgnoreIA5Match
m-supattributetype: apacheDnsDomainName
entryParentId: bc4ca0cc-66e5-4c8e-8f16-b0d5f77e0ac9
m-singlevalue: TRUE
createTimestamp: 20150708131906.591Z
m-syntax: 1.3.6.1.4.1.1466.115.121.1.26
m-nousermodification: FALSE
m-collective: FALSE
objectclass: metaAttributeType
objectclass: metaTop
objectclass: top
entryUUID: bac4890c-08a4-4957-bca3-f441674c2569
creatorsname: uid=admin,ou=system
entryCSN: 20150708131902.875000Z#000001#000#000000


At this piont, we need to process the following attributes and their
values :


m-supattributetype: apacheDnsDomainName

where the apacheDnsDomainName is not present in the SchemaManager,
because the apachedns schema is not enabled. This generates the error
you can see, which is not actually an error, but a problem with a non
existant schema element definition.

Now, the question is : should we make that a warning instead of an
error? (Note that in this very case, we continue to process the schema,
it's a non blocking error).

wdyt ?



Le 18/03/2018 à 19:11, Stefan Seelmann a écrit :
> On 03/18/2018 07:00 PM, Emmanuel Lécharny wrote:
>>
>>
>> Le 18/03/2018 à 17:35, Stefan Seelmann a écrit :
>>> Hi,
>>>
>>> the installers-in-docker test jenkins job shows strange errors like
>>>
>>> ERROR [org.apache.directory.api.ldap.model.entry.Value] - ERR_04226 I do
>>> not know how to handle NameAndOptionalUID normalization with objects of
>>> class: sambaSID
>>>
>>> See
>>> https://builds.apache.org/view/D/view/Directory/job/dir-apacheds-docker-installers/113/console
>>> for more of them.
>>> ``$`
>>
>> It throws such an exception when the value is invalid or when we can't
>> find the name's OID.
>>
>> This is a kind of weird. My bet is that it has to do with the schema file.
>>
>> Where is the dockerfile ?
> 
> There is no dockerfile.
> 
> Those tests run different docker containers [1] which then excute bash
> scripts (e.g. [2]) which just install apacheds and interact with it.
> 
> You can just reproduce by running the generated zip/tar.gz archive and
> look into the logs.
> 
> Kind Regards,
> Stefan
> 
> [1]
> https://github.com/apache/directory-server/blob/master/installers/src/test/docker/run-tests.sh
> [2]
> https://github.com/apache/directory-server/blob/master/installers/src/test/docker/archive.test
> 

-- 
Emmanuel Lecharny

Symas.com
directory.apache.org


Re: Error: I do not know how to handle NameAndOptionalUID normalization

Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
On 03/18/2018 07:00 PM, Emmanuel Lécharny wrote:
> 
> 
> Le 18/03/2018 à 17:35, Stefan Seelmann a écrit :
>> Hi,
>>
>> the installers-in-docker test jenkins job shows strange errors like
>>
>> ERROR [org.apache.directory.api.ldap.model.entry.Value] - ERR_04226 I do
>> not know how to handle NameAndOptionalUID normalization with objects of
>> class: sambaSID
>>
>> See
>> https://builds.apache.org/view/D/view/Directory/job/dir-apacheds-docker-installers/113/console
>> for more of them.
>> ``$`
> 
> It throws such an exception when the value is invalid or when we can't
> find the name's OID.
> 
> This is a kind of weird. My bet is that it has to do with the schema file.
> 
> Where is the dockerfile ?

There is no dockerfile.

Those tests run different docker containers [1] which then excute bash
scripts (e.g. [2]) which just install apacheds and interact with it.

You can just reproduce by running the generated zip/tar.gz archive and
look into the logs.

Kind Regards,
Stefan

[1]
https://github.com/apache/directory-server/blob/master/installers/src/test/docker/run-tests.sh
[2]
https://github.com/apache/directory-server/blob/master/installers/src/test/docker/archive.test

Re: Error: I do not know how to handle NameAndOptionalUID normalization

Posted by Emmanuel Lécharny <el...@gmail.com>.

Le 18/03/2018 à 17:35, Stefan Seelmann a écrit :
> Hi,
> 
> the installers-in-docker test jenkins job shows strange errors like
> 
> ERROR [org.apache.directory.api.ldap.model.entry.Value] - ERR_04226 I do
> not know how to handle NameAndOptionalUID normalization with objects of
> class: sambaSID
> 
> See
> https://builds.apache.org/view/D/view/Directory/job/dir-apacheds-docker-installers/113/console
> for more of them.
> ``$`

It throws such an exception when the value is invalid or when we can't
find the name's OID.

This is a kind of weird. My bet is that it has to do with the schema file.

Where is the dockerfile ?

-- 
Emmanuel Lecharny

Symas.com
directory.apache.org