Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-4474

Changing the JE db-logging-level to a non-allowed value disables the backend on restart


    • Type: Bug
    • Status: Dev backlog
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.0.0, 5.5.0, 4.0.0, 3.5.3, 3.5.2, 3.5.1, 3.5.0, 3.0.0
    • Fix Version/s: None
    • Component/s: backends, config, tools
    • Labels:


      You can inadvertently set the JE db-logging-level to any string value.  If you restart the server after adding a non-number value, the backend is disabled.

      dsconfig set-backend-prop \
                --backend-name userRoot \
                --set db-logging-level:DEBUG \
                --hostname localhost \
                --port 4444 \
                --bindDn cn=Directory\ Manager \
                --bindPasswordFile pass \
                --trustAll \


      [06/Nov/2017:10:13:11 -0700] category=CONFIG severity=ERROR msgID=116 msg=An error occurred while trying to initialize a backend loaded from class org.opends.server.backends.jeb.JEBackend with the information in configuration entry ds-cfg-backend-id=userRoot,cn=Backends,cn=config: InitializationException: The database environment could not be opened: org.forgerock.opendj.config.server.ConfigException: The database logging level string 'LEET' provided for configuration entry 'ds-cfg-backend-id=userRoot,cn=Backends,cn=config' is invalid. The value must be one of OFF, SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, or ALL. Note that these values are case sensitive (BackendImpl.java:781 BackendImpl.java:164 BackendConfigManager.java:816 BackendConfigManager.java:799 BackendConfigManager.java:251 BackendConfigManager.java:227 BackendConfigManager.java:217 DirectoryServer.java:1458 DirectoryServer.java:1306 DirectoryServer.java:4210). This backend will be disabled

      If you try to reset the logging level (after restart), dsconfig exits with the following error and an exception is thrown in the error log.

      opendj; bin/$ dsconfig set-backend-prop \
      >           --backend-name userRoot \
      >           --reset db-logging-level \
      >           --hostname localhost \
      >           --port 4444 \
      >           --bindDn cn=Directory\ Manager \
      >           --bindPasswordFile pass \
      >           --trustAll \
      >           --no-prompt
      The JE Backend could not be modified due to a communications problem: Undefined
      [06/Nov/2017:09:51:00 -0700] category=org.opends.messages.external severity=WARNING msgID=1 msg=GRIZZLY0011: Uncaught exception on thread Thread[Administration Connector port 4444(1) SelectorRunner,5,main] exception=UndeliverableException: org.forgerock.opendj.ldap.LdapException: Other: The Directory Server encountered an unexpected error while attempting to add the client request to the work queue: NullPointerException(JEStorage.java:942) (RxJavaPlugins.java:349 FlowableCreate.java:133 LdapClientConnection.java:865 LdapClientConnection.java:826 LdapClientConnection.java:673 ModifyRequestImpl.java:53 LdapClientConnection.java:673 LdapClientConnection.java:659 LdapClientConnection.java:631 FlowableCreate.java:72 Flowable.java:12986 Flowable.java:12935 FlowableLift.java:49 Flowable.java:12986 Flowable.java:12932 FlowableLift.java:49 Flowable.java:12986 FlowableDoFinally.java:47 Flowable.java:12986 FlowableMap.java:38 Flowable.java:12986 ...)

      Conversely, if you set it to a numeric value and restart, the backend is still usable on restart and dsconfig will not throw an exception if you try to reset it.


      Stop the server and manually remove the ds-cfg-db-logging-level attribute.

      dn: ds-cfg-backend-id=userRoot,cn=Backends,cn=config
      objectClass: top
      objectClass: ds-cfg-backend
      objectClass: ds-cfg-local-backend
      objectClass: ds-cfg-pluggable-backend
      objectClass: ds-cfg-je-backend
      ds-cfg-java-class: org.opends.server.backends.jeb.JEBackend
      ds-cfg-backend-id: userRoot
      ds-cfg-enabled: true
      ds-cfg-db-directory: db
      ds-cfg-writability-mode: enabled
      ds-cfg-base-dn: dc=example,dc=com
      modifiersName: cn=Directory Manager,cn=Root DNs,cn=config
      ds-cfg-db-logging-level: DEBUG
      modifyTimestamp: 20171106170416Z

      Note: 2.6.x had the correct behavior

      The Local DB Backend could not be modified because of the following reason:
          *  [LDAP: error code 53 - Entry
             ds-cfg-backend-id=userRoot,cn=Backends,cn=config cannot be modified
             because one of the configuration change listeners registered for that
             entry rejected the change:  The database logging level string 'DEBUG'
             provided for configuration entry
             'ds-cfg-backend-id=userRoot,cn=Backends,cn=config' is invalid.  The
             value must be one of OFF, SEVERE, WARNING, INFO, CONFIG, FINE, FINER,
             FINEST, or ALL.  Note that these values are case sensitive]




            • Assignee:
              lee.trujillo Lee Trujillo
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: