Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-4626

Routes to OpenIDM OSGi Services are lost during startup

    Details

      Description

      During startup OpenIDM will occasionally fail to properly register routes to various OpenIDM Services. This is typically observed when there is latency between the OpenIDM instance and the JDBC Repository which causes the JDBC Repo Service to take longer than usual to start.

      When the issue occurs for the ManagedObjectService, attempting to query a managed object defined with managed.json would result in the following:

      curl -u openidm-admin:openidm-admin http://localhost:8080/openidm/managed/user?_queryId=query-all-ids
      
      {"code":404,"reason":"Not Found","message":"Resource 'user' not found"}
      

      Similar failures may occur for other Services whose routes have been 'lost' during startup.

      The problem can be simulated explicitly via the following sequence of events:

      1. Start the OpenIDM instance
      2. Open the Apache Felix console via http://localhost:8443/system/console
      3. Edit the conf/managed.json file and add a new managed object type
      4. Within the Apache Felix console, navigate to Components and locate the org.forgerock.openidm.managed component
      5. Stop the org.forgerock.openidm.managed component
      6. Start the org.forgerock.openidm.managed component
      7. Perform a query-all-ids against maanaged/user and the failure should occur

      Note that the above simply simulates the issue. At startup the same sequence of Service modification, followed by deactivation and reactivation is was causes the failure. However in the case of a startup the sequence is triggered by the parallel startup of multiple OSGi Services.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cgdrake Chris Drake
                Reporter:
                cgdrake Chris Drake
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: