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

InstanceAlreadyExistsException is thrown from Agent.siteNames

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 13.5.0
    • Fix Version/s: None
    • Component/s: monitoring
    • Labels:

      Description

      Bug description

      InstanceAlreadyExistsException Agent.siteNames should be printed in warning rather than error level

      How to reproduce the issue

      1. install two instances of OpenAM server in a single cluster
      2. login to admin console
      3. click [Configure] -> [Global Services] -> [System] -> "Monitoring" link
      4. enable appropriate status
      5. click [Save] button
      6. click [Deployment] -> [Sites] -> [+ Add a Site]
      7. type in Name, Primary URL as well as Secondary URLs.
      8. restart OpenAM server and monitor CoreSystem debug log

      NOTE:

      • do not assign server instances to site to recreate issue
      • you must specify secondary URLs to recreate issue
      Expected behaviour
      • server instances which are not assigned to a site shouldn't throw InstanceAlreadyExistsException.
      • site with secondary URLs shouldn't throw InstanceAlreadyExistsException
      Current behaviour
      amMonitoring:09/14/2017 12:56:41:171 PM NZST: Thread[localhost-startStop-1,5,main]: TransactionId[526f1144-c385-45e2-898e-3077a553c758-0]
      Agent.siteNames:doing siteName null, svrURL = http://lb.example.com:58080/opensso
      amMonitoring:09/14/2017 12:56:41:171 PM NZST: Thread[localhost-startStop-1,5,main]: TransactionId[526f1144-c385-45e2-898e-3077a553c758-0]
      SsoServerSitesEntryImpl.createSsoServerSitesEntryObjectName:
          SiteId = 5
          SiteName = null
      amMonitoring:09/14/2017 12:56:43:702 PM NZST: Thread[localhost-startStop-1,5,main]: TransactionId[526f1144-c385-45e2-898e-3077a553c758-0]
      ERROR: Agent.siteNames:05
      javax.management.InstanceAlreadyExistsException: SUN_OPENSSO_SERVER_MIB/ssoServerSitesTable:ssoServerSitesEntry.siteName=null
              at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)
              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)
              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)
              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
              at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
              at com.sun.identity.monitoring.Agent.siteNames(Agent.java:1277)
              at com.sun.identity.common.ConfigMonitoring.configureMonitoring(ConfigMonitoring.java:174)
              at com.sun.identity.common.MonitoringConfiguration.init(MonitoringConfiguration.java:64)
              at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
              at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113)
              at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      

      Work around

      • assign server instances to site
      • leave secondary URLs in site config blank

      Code analysis

      Printing exception is probably necessary, but it can be changed from error level to warning level to reduce the noise. Also, naming table only returns site name if primary URL is used. This needs to be fixed or secondary URLs should retrieve site name from primary URL.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sachiko Sachiko Wallace
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: