Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-16642

Server id creation can fail when greater id is greater than 100

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 13.5.2, 6.5.2.3, 5.5.2, 7.0.0
    • Fix Version/s: None
    • Component/s: configurator
    • Labels:
    • Sprint:
      AM Sustaining Sprint 77, AM Sustaining Sprint 78, AM Sustaining Sprint 79, AM Sustaining Sprint 80, AM Sustaining Sprint 81, AM Sustaining Sprint 82
    • Story Points:
      2
    • Support Ticket IDs:

      Description

      Bug description

      If adding servers and the serverId gets to > than 100 the naming service may fail to create the naming table correctly and the server entry will not be loaded upon restart.

      The associated  debug error maybe

      amNaming:06/28/2020 08:59:24:101 PM PDT: Thread[localhost-startStop-1,5,main]: TransactionId[3363d63e-9a5d-40be-ae04-d538f16dc698-0]amNaming:06/28/2020 08:59:24:101 PM PDT: Thread[localhost-startStop-1,5,main]: TransactionId[3363d63e-9a5d-40be-ae04-d538f16dc698-0]ERROR: WebtopNaming.getServerId()com.iplanet.services.naming.ServerEntryNotFoundException: Cannot find server ID. at com.iplanet.services.naming.WebtopNaming.getServerID(WebtopNaming.java:726) at com.iplanet.services.naming.WebtopNaming.getServerID(WebtopNaming.java:622)

      How to reproduce the issue

      1)Install AM

      2) Create a few dummy sites.

      3)Create more than 100 servers 

      4) Restart AM

      Expected behaviour
      All servers are visable in console after restart
      Current behaviour
      Servers with Server ID may be missing

      Work around

      Do not have sites

      Code analysis

      The initial creation of the server is fine. 

      This is only on the restart and only if there are site IDs in the mapping

      com.iplanet.services.naming.service.NamingService;
      
      #storeServerList
      
      
      index = serverId.indexOf(delimiter);
      if (index != -1) {
          serverId = serverId.substring(0, 2); <-- truncated
      }
      
      HashSet serverSet = new HashSet();
      serverSet.add(server);
      serverList.add(server);
      namingAttrs.put(serverId, serverSet) <--- wrong key
      

        Attachments

          Activity

            People

            • Assignee:
              jonthomas Jonathan Thomas
              Reporter:
              jonthomas Jonathan Thomas
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: