OpenIdentityPlatform / OpenDJ

OpenDJ is an LDAPv3 compliant directory service, which has been developed for the Java platform, providing a high performance, highly available, and secure store for the identities managed by your organization. Its easy installation process, combined with the power of the Java platform makes OpenDJ the simplest, fastest directory to deploy and manage.
https://www.openidentityplatform.org/opendj
Other
364 stars 98 forks source link

OpenDJ fails to upgrade from version 3->4 #354

Closed pdaterao closed 1 month ago

pdaterao commented 1 month ago

Describe the bug A clear and concise description of what the bug is.

Upgrade from OpenAM 13 to OpenAM 14 fails.

To Reproduce Steps to reproduce the behavior:

  1. Install OpenAM 13 and create a configuration with defaults.
  2. Upgrade to OpenAM 14

Expected behavior Upgrade should work without any errors

Desktop (please complete the following information):

Additional context Error Log:

ERROR: Upgrade required: upgrading from 3.0.0.185acee3ba68d8da1782007eebacb3701dc996d6 to 4.6.2.c514a26503adf32d757ea02bf61944db3fbaf6b4

OpenDJ Upgrade Utility

Preparing to upgrade

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) 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

The upgrade is ready to proceed. Do you wish to continue? (yes/no) yes

Performing upgrade

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% Restoring 'ds-cfg-delimiter-char' attribute type in concatenated schema.............................................................. 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% Replacing schema file '02-config.ldif'.............................. 100% Archiving concatenated schema....................................... 100%

OpenDJ was successfully upgraded from version 3.0.0.185acee3ba68d8da1782007eebacb3701dc996d6 to 4.6.2.c514a26503adf32d757ea02bf61944db3fbaf6b4

Performing post upgrade tasks

Rebuilding index(es) '[.distinguishedNameMatch, .objectIdentifierMatch, .uniqueMemberMatch, .certificateExactMatch]' for base dn(s) '[dc=datastore,dc=acme,dc=com]'.................................... FAIL [!] An error occurred during post upgrade task. Process aborted. Please check log for further details

Post upgrade tasks complete

openam@fc9a38e72e9a:/usr/local/tomcat$ cat /usr/openam/config/opends/logs/upgrade.log [05/Jul/2024:19:16:17 +0000] category=UPGRADE sq=36 severity=INFO src=org.opends.server.tools.upgrade.UpgradeLog initLogFileHandler msg= Upgrade of OpenDJ started [05/Jul/2024:19:16:17 +0000] category=UPGRADE sq=37 severity=INFO src=org.opends.server.tools.upgrade.UpgradeLog initLogFileHandler msg=Installation Directory: /usr/openam/config/opends [05/Jul/2024:19:16:17 +0000] category=UPGRADE sq=38 severity=INFO src=org.opends.server.tools.upgrade.UpgradeLog initLogFileHandler msg=Instance Directory: /usr/openam/config/opends/. [11/Jul/2024:16:29:05 +0000] category=BACKEND severity=INFORMATION msgID=410 msg=JE backend 'userRoot' does not specify the number of cleaner threads: defaulting to 12 threads [11/Jul/2024:16:29:05 +0000] category=BACKEND severity=INFORMATION msgID=411 msg=JE backend 'userRoot' does not specify the number of lock tables: defaulting to 29 [11/Jul/2024:16:29:05 +0000] category=BACKEND severity=NOTICE msgID=542 msg=Rebuild of index(es) dn2id, member.distinguishedNameMatch, referral, ds-sync-conflict.distinguishedNameMatch, memberof.distinguishedNameMatch, uniqueMember.uniqueMemberMatch, objectClass.objectIdentifierMatch started with 551 total entries to process [11/Jul/2024:16:29:05 +0000] category=BACKEND severity=NOTICE msgID=528 msg=The amount of free memory available to the import task is 1405668556 bytes. The number of phase one buffers required is 192 buffers [11/Jul/2024:16:29:05 +0000] category=BACKEND severity=NOTICE msgID=520 msg=Setting DB cache size to 33554432 bytes and phase one buffer size to 2196357 bytes [11/Jul/2024:16:29:05 +0000] category=TOOLS severity=ERROR msgID=852 msg=An error occurred while attempting to perform index rebuild: Unable to decode the provided object class set because it used an undefined token 1 (id=org.opends.messages.core-621) An error occurs during the rebuild index process in dc=datastore,dc=acme,dc=com, rebuild index(es) aborted.

vharseko commented 1 month ago

Please check v15

pdaterao commented 1 month ago

Please check v15

Identical error while upgrading to v15 from v13. I also tried upgrading to several versions of v14 (ever minor release starting 14.0.1 to 14.8.4) without any luck.

vharseko commented 1 month ago

Please provide zip /usr/openam/config/opends

pdaterao commented 1 month ago

Please provide zip /usr/openam/config/opends

https://www.dropbox.com/scl/fi/128didziz13uhaq94njct/opends.zip?rlkey=1arftnh1dfg88b52xgycdyl6r&st=5kpvxs54&dl=0

github does not let me upload the file here since it's over 25MB. Let me know if you have any issues with downloading the file.

vharseko commented 1 month ago

@pdaterao fixed, please test snapshot artifact from PR https://github.com/OpenIdentityPlatform/OpenAM/actions/runs/9936091099 or wait release OpenAM 15.0.3

vharseko commented 1 month ago

fixed 4.6.5