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

Upgrade fails when the global setting "smtp-server" is missing the optional port

    XMLWordPrintable

    Details

      Description

      As the upgrade tool attempts to rebuild the indexes, the rebuild fails with an incorrect message about the SMTP value being invalid.

      [28/Mar/2016:09:21:43 -0600] category=UPGRADE sq=154 severity=FINE src=org.forgerock.i18n.slf4j.LocalizedLogger debug
       msg=The rebuild index tool arguments are [--rebuildAll, -f, /opt/instances/opendj/./config/config.ldif, -b, dc=forgerock,dc=com]
      An error occurred while trying to initialize the core Directory Server
      configuration:  The provided SMTP server value 'smtp.forgerock.com' is
      invalid. An SMTP server value must have an IP address or a resolvable name,
      and it may optionally be followed by a colon and an integer value between 1
      and 65535 to specify the server port number
      
      opendj; opendj/$ ping smtp.forgerock.com
      PING opendj.forgerock.com (192.168.0.11): 56 data bytes
      64 bytes from 192.168.0.11: icmp_seq=0 ttl=64 time=0.039 ms
      64 bytes from 192.168.0.11: icmp_seq=1 ttl=64 time=0.079 ms
      
      --- opendj.forgerock.com ping statistics ---
      2 packets transmitted, 2 packets received, 0.0% packet loss
      round-trip min/avg/max/stddev = 0.039/0.059/0.079/0.020 ms
      


      Test Case:

      1. Set smtp-server as seen in Step 1 here "Procedure 12.3. To Mail Users About Account Status" - https://backstage.forgerock.com/#!/docs/opendj/2.6/admin-guide#account-status-notification on OpenDJ 2.6.x.
      2. Upgrade to 3.0.0.

      >>>> 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
      
        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%     
        Rerunning dsjavaproperties..........................................   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 '/opt/instances/opendj/bin/dsframework'...............   100%     
        Removing file '/opt/instances/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 '/opt/instances/opendj/bin/dbtest'....................   100%     
        Removing file '/opt/instances/opendj/bat/dbtest.bat'................   100%     
        Replacing schema file '02-config.ldif'..............................   100%     
        Archiving concatenated schema.......................................   100%     
      
      >>>> OpenDJ was successfully upgraded from version 2.6.3.12667 to
      3.0.0.185acee3ba68d8da1782007eebacb3701dc996d6
      
      
      >>>> Performing post upgrade tasks
      
      Mar 28, 2016 9:02:11 AM org.forgerock.i18n.slf4j.LocalizedLogger info
      INFO: Loaded extension from file '/opt/instances/opendj/lib/extensions/snmp-mib2605.jar' (build 3.0.0, revision 185acee3ba68d8da1782007eebacb3701dc996d6)
        Rebuilding all indexes..............................................   FAIL
        [!] An error occurred during post upgrade task. Process aborted. Please
        check log for further details
      
      >>>> Post upgrade tasks complete
      
       * See '/opt/instances/opendj/logs/upgrade.log' for a detailed log of this
       operation
      


      rebuild-index fails in the same way.

      opendj; bin/$ ./rebuild-index --rebuildAll -b dc=forgerock,dc=com
      [28/03/2016:09:42:31 -0600] category=EXTENSIONS seq=0 severity=INFO msg=Loaded extension from file '/opt/instances/opendj/lib/extensions/snmp-mib2605.jar' (build 3.0.0, revision 185acee3ba68d8da1782007eebacb3701dc996d6)
      An error occurred while trying to initialize the core Directory Server
      configuration:  The provided SMTP server value 'smtp.forgerock.com' is
      invalid. An SMTP server value must have an IP address or a resolvable name,
      and it may optionally be followed by a colon and an integer value between 1
      and 65535 to specify the server port number
      


      3.0.0 code.

      • RebuildIndex.java initializes the config via CoreConfigManager.
      • The call to HostPort.valueOf(server) in server/core/CoreConfigManager.java throws an exception
      public static HostPort valueOf(String hostPort) throws NumberFormatException,
            IllegalArgumentException
        {
          final int sepIndex = hostPort.lastIndexOf(':');
          if ((hostPort.charAt(0) == '['
              && hostPort.charAt(hostPort.length() - 1) == ']')
              || sepIndex == -1)
          {
      

        Attachments

          Activity

            People

            Assignee:
            cjr Chris Ridd
            Reporter:
            lee.trujillo Lee Trujillo
            QA Assignee:
            Ondrej Fuchsik Ondrej Fuchsik
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: