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

Upgrade: NPE when querying cn=config after upgrade from 2.6.4 to 6.0.0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.0
    • Fix Version/s: 6.0.0
    • Component/s: upgrade
    • Labels:

      Description

      Found with opendj 6.0.0 rev (0ce29eb96e0)

      We install a server in 2.6.4 version.
      We stop the server, unzip 6.0.0 snapshot over it and start the server again.

      $ unzip -d /tmp/2.6.4 OpenDJ-2.6.4.zip
      $ /tmp/2.6.4/opendj/setup  --cli -p 1389 --adminConnectorPort 4444 -D "cn=directory manager" -w password -b "dc=com" -n --acceptLicense
      
      $ /tmp/2.6.4/opendj/bin/ldapsearch -h localhost -p 1389 -D "cn=Directory Manager" -w password -b "cn=config" "(objectClass=ds-cfg-root-config)" 
      dn: cn=config
      objectClass: top
      objectClass: ds-cfg-root-config
      ds-cfg-writability-mode: enabled
      ds-cfg-etime-resolution: milliseconds
      ds-cfg-allowed-task: org.opends.server.tasks.AddSchemaFileTask
      ds-cfg-allowed-task: org.opends.server.tasks.BackupTask
      ds-cfg-allowed-task: org.opends.server.tasks.DisconnectClientTask
      ds-cfg-allowed-task: org.opends.server.tasks.EnterLockdownModeTask
      ds-cfg-allowed-task: org.opends.server.tasks.ExportTask
      ds-cfg-allowed-task: org.opends.server.tasks.ImportTask
      ds-cfg-allowed-task: org.opends.server.tasks.InitializeTargetTask
      ds-cfg-allowed-task: org.opends.server.tasks.InitializeTask
      ds-cfg-allowed-task: org.opends.server.tasks.SetGenerationIdTask
      ds-cfg-allowed-task: org.opends.server.tasks.LeaveLockdownModeTask
      ds-cfg-allowed-task: org.opends.server.tasks.RebuildTask
      ds-cfg-allowed-task: org.opends.server.tasks.RestoreTask
      ds-cfg-allowed-task: org.opends.server.tasks.ShutdownTask
      ds-cfg-allowed-task: org.opends.server.tasks.PurgeConflictsHistoricalTask
      ds-cfg-lookthrough-limit: 5000
      ds-cfg-idle-time-limit: 0 seconds
      ds-cfg-default-password-policy: cn=Default Password Policy,cn=Password Policies,
       cn=config
      ds-cfg-add-missing-rdn-attributes: true
      ds-cfg-max-psearches: -1
      ds-cfg-entry-cache-preload: false
      ds-cfg-allow-attribute-name-exceptions: false
      ds-cfg-time-limit: 60 seconds
      ds-cfg-proxied-authorization-identity-mapper: cn=Exact Match,cn=Identity Mappers
       ,cn=config
      ds-cfg-save-config-on-successful-startup: true
      ds-cfg-bind-with-dn-requires-password: true
      ds-cfg-reject-unauthenticated-requests: false
      ds-cfg-return-bind-error-messages: false
      ds-cfg-notify-abandoned-operations: false
      cn: config
      ds-cfg-size-limit: 1000
      ds-cfg-max-allowed-client-connections: 0
      ds-cfg-check-schema: true
      ds-cfg-invalid-attribute-syntax-behavior: reject
      ds-cfg-single-structural-objectclass-behavior: reject
      

      We stop the server, unzip 6.0.0 snapshot over it and start the server again.

      $ /tmp/2.6.4/opendj/bin/stop-ds
      $ unzip -d /tmp/2.6.4/ opendj-6.0.0-SNAPSHOT.zip
      
      $ /tmp/2.6.4/opendj/upgrade
      
      >>>> OpenDJ Upgrade Utility
      
       * OpenDJ will be upgraded from version
       2.6.4.f592aaaf8de0617e45315a9c54ccfcfea07e3f64 to
       6.0.0.0ce29eb96e0b6b00cd7d9e7748f96aebb3cc059b
       * See '/tmp/2.6.4/opendj/logs/upgrade.log' for a detailed log of this
       operation
      
      >>>> Preparing to upgrade
      
        OpenDJ 3.0.0 introduced changes to the JE backend configuration and database
        format. The upgrade will update all JE backend configurations, but will only
        migrate JE backend databases which are associated with *enabled* JE
        backends. It is very strongly recommended that any existing data has been
        backed up and that you have read the upgrade documentation before
        proceeding. Do you want to proceed with the upgrade? (yes/no) [no]: yes
      
        OpenDJ 3.0.0 changed the matching rule implementations. All indexes have to
        be rebuilt. This could take a long time to proceed. Do you want to launch
        this process automatically at the end of the upgrade? (yes/no) [no]: yes
      
        OpenDJ 3.5.0 introduced a new format for all equality indexes based on
        "distinguishedName" attribute type, like "member", "owner", "roleOccupant"
        and "seeAlso". They all have to be rebuilt if they exist on your server and
        this could take a long time to proceed. Do you want to launch this process
        automatically at the end of the upgrade? (yes/no) [no]: yes
      
        OpenDJ 3.5.0 introduced a new configuration model for the HTTP connection
        handler and its associated endpoints. Any enabled HTTP connection handlers
        will be disabled during the upgrade due to the break in compatibility.
        Do you want to make this configuration change? (yes/no) [yes]: yes
      
        OpenDJ 5.5.0 changed the indexing algorithm for JSON equality matching
        rules. All JSON based attribute indexes must be rebuilt which may take a
        long time. Do you want to rebuild the indexes automatically at the end of
        the upgrade? (yes/no) [no]: yes
      
        The upgrade is ready to proceed. Do you wish to continue? (yes/no) [yes]: 
      
      
      >>>> Performing upgrade
      
        Changing matching rule for 'userCertificate' and 'caCertificate' to
        CertificateExactMatch...............................................   100%     
        Configuring 'CertificateExactMatch' matching rule...................   100%     
        Replacing schema file '03-pwpolicyextension.ldif'...................   100%     
        Removing 'dc=replicationchanges' backend............................   100%     
        Removing ACI for 'dc=replicationchanges'............................   100%     
        Adding default privilege 'changelog-read' to all root DNs...........   100%     
        Adding PKCS5S2 password storage scheme configuration................   100%     
        Updating ds-cfg-java-class attribute in File-Based Debug Logger.....   100%     
        Deleting ds-cfg-default-debug-level attribute in File-Based Debug
        Logger..............................................................   100%     
        Updating ds-cfg-default-severity attribute in File-Based Error
        Logger..............................................................   100%     
        Updating ds-cfg-override-severity attribute in Replication Repair
        Logger..............................................................   100%     
        Removing config for 'Network Groups'................................   100%     
        Removing config for 'Workflows'.....................................   100%     
        Removing config for 'Workflow Elements'.............................   100%     
        Removing config for 'Network Group Plugin'..........................   100%     
        Removing config for 'Extensions'....................................   100%     
        Removing config for 'File System Entry Cache'.......................   100%     
        Removing config for 'Entry Cache Preload'...........................   100%     
        Removing file '/tmp/2.6.4/opendj/bin/dsframework'...................   100%     
        Removing file '/tmp/2.6.4/opendj/bat/dsframework.bat'...............   100%     
        Migrating JE backend 'userRoot'.....................................   100%     
        Convert local DB backends to JE backends............................   100%     
        Convert local DB indexes to backend indexes.........................   100%     
        Convert local DB VLV indexes to backend VLV indexes.................   100%     
        Removing file '/tmp/2.6.4/opendj/bin/dbtest'........................   100%     
        Removing file '/tmp/2.6.4/opendj/bat/dbtest.bat'....................   100%     
        Adding Bcrypt password storage scheme configuration.................   100%     
        Removing configuration for matching rules...........................   100%     
        Removing old OpenDJ library files...................................   100%     
        Removing configuration entry for the configuration backend..........   100%     
        Disabling the HTTP connection handler...............................   100%     
        Adding default HTTP endpoints and auth mechanisms to configuration..   100%     
        Adding 'rest2ldap' configuration file...............................   100%     
        Adding configuration for schema providers...........................   100%     
        Removing top configuration entry for matching rules.................   100%     
        Removing configuration for syntaxes.................................   100%     
        Adding local backend object class...................................   100%     
        Removing base-dn attribute for backends where base-dn is fixed......   100%     
        Removing file '/tmp/2.6.4/opendj/lib/je.jar'........................   100%     
        Replacing schema file '03-keystore.ldif'............................   100%     
        Removing file '/tmp/2.6.4/opendj/QuickSetup.app'....................   100%     
        Removing file '/tmp/2.6.4/opendj/Uninstall.app'.....................   100%     
        Removing file '/tmp/2.6.4/opendj/uninstall'.........................   100%     
        Removing file '/tmp/2.6.4/opendj/uninstall.bat'.....................   100%     
        Replace parallel work queue by traditional work queue...............   100%     
        Removing file '/tmp/2.6.4/opendj/lib/extensions/snmp-mib2605.jar'...   100%     
        Deleting obsolete parameters 'ds-cfg-db-evictor-lru-only' and
        'ds-cfg-db-evictor-nodes-per-scan' from JE backends.................   100%     
        Removing 'client connections monitor provider' configuration entry..   100%     
        Replacing schema file '02-config.ldif'..............................   100%     
        Archiving concatenated schema.......................................   100%     
      
      >>>> OpenDJ was successfully upgraded from version
      2.6.4.f592aaaf8de0617e45315a9c54ccfcfea07e3f64 to
      6.0.0.0ce29eb96e0b6b00cd7d9e7748f96aebb3cc059b
      
      
      >>>> Performing post upgrade tasks
      
        Rebuilding all indexes..............................................   100%     
      
      >>>> Post upgrade tasks complete
      
       * See '/tmp/2.6.4/opendj/logs/upgrade.log' for a detailed log of this
       operation
      
      $ /tmp/2.6.4/opendj/bin/start-ds
      

      Then we query cn=config again => Fails

      /tmp/2.6.4/opendj/bin/ldapsearch -h localhost -p 1389 -D "cn=Directory Manager" -w password -b "cn=config" "(objectClass=ds-cfg-root-config)" 
      dn: cn=config
      objectClass: top
      objectClass: ds-cfg-root-config
      ds-cfg-writability-mode: enabled
      ds-cfg-etime-resolution: milliseconds
      ds-cfg-allowed-task: org.opends.server.tasks.AddSchemaFileTask
      ds-cfg-allowed-task: org.opends.server.tasks.BackupTask
      ds-cfg-allowed-task: org.opends.server.tasks.DisconnectClientTask
      ds-cfg-allowed-task: org.opends.server.tasks.EnterLockdownModeTask
      ds-cfg-allowed-task: org.opends.server.tasks.ExportTask
      ds-cfg-allowed-task: org.opends.server.tasks.ImportTask
      ds-cfg-allowed-task: org.opends.server.tasks.InitializeTargetTask
      ds-cfg-allowed-task: org.opends.server.tasks.InitializeTask
      ds-cfg-allowed-task: org.opends.server.tasks.SetGenerationIdTask
      ds-cfg-allowed-task: org.opends.server.tasks.LeaveLockdownModeTask
      ds-cfg-allowed-task: org.opends.server.tasks.RebuildTask
      ds-cfg-allowed-task: org.opends.server.tasks.RestoreTask
      ds-cfg-allowed-task: org.opends.server.tasks.ShutdownTask
      ds-cfg-allowed-task: org.opends.server.tasks.PurgeConflictsHistoricalTask
      ds-cfg-lookthrough-limit: 5000
      ds-cfg-idle-time-limit: 0 seconds
      ds-cfg-default-password-policy: cn=Default Password Policy,cn=Password Policies,cn=config
      ds-cfg-add-missing-rdn-attributes: true
      ds-cfg-max-psearches: -1
      ds-cfg-allow-attribute-name-exceptions: false
      ds-cfg-time-limit: 60 seconds
      ds-cfg-proxied-authorization-identity-mapper: cn=Exact Match,cn=Identity Mappers,cn=config
      ds-cfg-save-config-on-successful-startup: true
      ds-cfg-bind-with-dn-requires-password: true
      ds-cfg-reject-unauthenticated-requests: false
      ds-cfg-return-bind-error-messages: false
      ds-cfg-notify-abandoned-operations: false
      cn: config
      ds-cfg-size-limit: 1000
      ds-cfg-max-allowed-client-connections: 0
      ds-cfg-check-schema: true
      ds-cfg-invalid-attribute-syntax-behavior: reject
      ds-cfg-single-structural-objectclass-behavior: reject
      
      # The LDAP search request failed: 80 (Other)
      # Additional Information:  An unexpected error was encountered while processing a search in one of the Directory Server backends: NullPointerException(ConfigurationHandler.java:374)
      

        Attachments

          Activity

            People

            Assignee:
            joseph.de-menditte Joseph de-Menditte
            Reporter:
            cforel carole forel
            QA Assignee:
            Ondrej Fuchsik Ondrej Fuchsik
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: