OUD 12.2.1.4.0 - The "ldapmodify" Add Command fails with error - "The provided value "DN_VALUE_HERE" could not be parsed as a valid distinguished name because the underscore character is not allowed in an attribute name"
(Doc ID 2674121.1)
Last updated on DECEMBER 27, 2023
Applies to:
Oracle Unified Directory - Version 12.2.1.4.0 and laterInformation in this document applies to any platform.
Symptoms
When loading attributes into OUD with the "ds-cfg-allow-attribute-name-exceptions" set to "true" attributes are created successfully.
From dsconfig --advanced:
>>>> Configure the properties of the Global Configuration
Property Value(s)
----------------------------------------------------------------------
1) add-missing-rdn-attributes true
2) allow-attribute-name-exceptions true
However when trying to add schema using an ldif file with ldapmodify an error is thrown, even though the allow-attribute-name-exceptions is set to true.
Unable to parse LDIF entry starting at line 1 because an error occurred while trying to parse the value of line "DN_VALUE_HERE" as a distinguished name:
The provided value "DN_VALUE_HERE" could not be parsed as a valid distinguished name because the underscore character is not allowed in an attribute name unless the
ds-cfg-allow-attribute-name-exceptions configuration option is enabled
The ldapmodify ADD wasn't even sent to the directory, which means the error was from ldapmodify as DirectoryServer object via which the LDAPModify utility accesses the
global configuration(allow-attribute-name-exceptions) is different to the one on the OUD server.
From the Verbose log output:
/ldapmodify -a -h localhost -p LDAP_PORT -D "cn=DS_ADMIN" -j PWD_FILE -f ~/SCHEMA_IMPORT.ldif
12:57:52.374 protocol verbose LDAPMessage(msgID=1, protocolOp=BindRequest(version=3, dn=cn=DS_ADMIN, pword=******))
12:57:52.386 protocol verbose WRITE ASN.1 START SEQUENCE(type=0x30)
12:57:52.386 protocol verbose WRITE ASN.1 INTEGER(type=0x2, length=1, value=1)
12:57:52.387 protocol verbose WRITE ASN.1 START SEQUENCE(type=0x60)
12:57:52.387 protocol verbose WRITE ASN.1 INTEGER(type=0x2, length=1, value=3)
12:57:52.388 protocol verbose WRITE ASN.1 OCTETSTRING(type=0x4, length=20)
12:57:52.388 protocol verbose WRITE ASN.1 OCTETSTRING(type=0x80, length=8)
12:57:52.388 protocol verbose WRITE ASN.1 END SEQUENCE(length=0)
12:57:52.388 protocol verbose WRITE ASN.1 END SEQUENCE(length=0)
12:57:52.389 protocol verbose bytes written to wire(len=42):
30 28 02 01 01 60 23 02 01 03 04 14 63 6E 3D 44
69 72 65 63 74 6F 72 79 20 4D 61 6E 61 67 65 72
80 08 70 61 73 73 77 30 72 64
12:57:52.406 protocol verbose READ ASN.1 START SEQUENCE(type=0x30, length=12)
12:57:52.407 protocol verbose READ ASN.1 INTEGER(type=0x2, length=1, value=1)
12:57:52.407 protocol verbose READ ASN.1 START SEQUENCE(type=0x61, length=7)
12:57:52.407 protocol verbose READ ASN.1 INTEGER(type=0xa, length=1, value=0)
12:57:52.408 protocol verbose READ ASN.1 END SEQUENCE
12:57:52.408 protocol verbose READ ASN.1 END SEQUENCE
12:57:52.408 protocol verbose bytes read from wire(len=14):
30 0C 02 01 01 61 07 0A 01 00 04 00 04 00 0 a
12:57:52.408 protocol verbose LDAPMessage(msgID=1, protocolOp=BindResponse(resultCode=0))
12:57:52.445 message info DN decode failed for:
12:57:52.462 caught error caught={org.opends.server.util.LDIFException: Unable to parse LDIF entry starting at line 1 because an error occurred while trying to parse the value of line "DN_VALUE_HERE" as a distinguished name:The provided value "DN_VALUE_HERE" could not be parsed as a valid distinguished name because the underscore character is not allowed in an attribute name unless the ds-cfg-allow-attribute-name-exceptions configuration option is enabled
Error at or near line 1 in LDIF file ~/SCHEMA_IMPORT.ldif:org.opends.server.util.LDIFException:
Unable to parse LDIF entry starting at line 1 because an error occurred while trying to parse the value of line "DN_VALUE_HERE" as a distinguished name:
The provided value "DN_VALUE_HERE" could not be parsed as a valid distinguished name because the underscore character is not allowed in an attribute name unless the
ds-cfg-allow-attribute-name-exceptions configuration option is enabled
ds-cfg-allow-attribute-name-exceptions configuration option is enabled
12:57:52.463 protocol verbose LDAPMessage(msgID=2, protocolOp=UnbindRequest())
12:57:52.463 protocol verbose WRITE ASN.1 START SEQUENCE(type=0x30)
12:57:52.463 protocol verbose WRITE ASN.1 INTEGER(type=0x2, length=1, value=2)
12:57:52.464 protocol verbose WRITE ASN.1 NULL(type=0x42, length=0)
12:57:52.464 protocol verbose WRITE ASN.1 END SEQUENCE(length=0)
Steps to recreate issue:
1) Create schema which contains attributes with underscores as an ldif file.
2) Using dsconfig, check / set ds-cfg-allow-attribute-name-exceptions to true
3) load data into the directory using ldapmodify with file and the add flag, ie;
/ldapmodify -a -h localhost -p LDAP_PORT -D "cn=DS_ADMIN" -j PWD_FILE -f ~/SCHEMA_IMPORT.ldif
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |