Uploaded image for project: 'OpenAM Agents'
  1. OpenAM Agents
  2. AMAGENTS-2285

Having a trailing / in your site URL will cause J2EE agent to not properly obtain server id

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5.1.0
    • Component/s: J2EE Agents
    • Labels:

      Description

      1. Configured a site with Primary URL http://lb1.example.com/openam/
      2. In top realm, created a new agent with Server URL http://lb1.example.com:80/openam/
      3. Restarted OpenAM (not sure if this step is really necessary)
      4. Installed J2EE agent 3.5.0 for tomcat on separate box.

      Tomcat does not start up and the following errors are observed in the catalina.out and the agent logs:

      For the agent:

      amAuthContext:01/28/2016 01:59:28:278 PM PST: Thread[main,5,main]
      **********************************************
      amAuthContext:01/28/2016 01:59:28:271 PM PST: Thread[main,5,main]
      ERROR: Failed to obtain auth service url from server: null://null:null
      amNaming:01/28/2016 01:59:28:337 PM PST: Thread[main,5,main]
      **********************************************
      amNaming:01/28/2016 01:59:28:337 PM PST: Thread[main,5,main]
      ERROR: WebtopNaming.getServerId():serverId null for server: http://lb1.example.com:80/openam
      amNaming:01/28/2016 01:59:28:337 PM PST: Thread[main,5,main]
      ERROR: WebtopNaming.getServerId()
      com.iplanet.services.naming.ServerEntryNotFoundException: Cannot find server ID.
      at com.iplanet.services.naming.WebtopNaming.getServerID(WebtopNaming.java:757)
      at com.iplanet.services.naming.WebtopNaming.updatePlatformServerIDs(WebtopNaming.java:1336)
      at com.iplanet.services.naming.WebtopNaming.updateNamingTable(WebtopNaming.java:1259)
      at com.iplanet.services.naming.WebtopNaming.getNamingProfile(WebtopNaming.java:1142)
      at com.iplanet.services.naming.WebtopNaming.access$000(WebtopNaming.java:91)
      at com.iplanet.services.naming.WebtopNaming$SiteMonitor.<clinit>(WebtopNaming.java:1669)
      at com.iplanet.services.naming.WebtopNaming.startSiteMonitor(WebtopNaming.java:1496)
      at com.iplanet.services.naming.WebtopNaming.initializeNamingService(WebtopNaming.java:303)
      at com.iplanet.services.naming.WebtopNaming.updateNamingTable(WebtopNaming.java:1214)
      at com.iplanet.services.naming.WebtopNaming.getNamingProfile(WebtopNaming.java:1142)
      at com.iplanet.services.naming.WebtopNaming.getServiceAllURLs(WebtopNaming.java:526)
      at com.sun.identity.authentication.AuthContext.login(AuthContext.java:687)
      1,1 Top

      For catalina.out:

      Jan 28, 2016 1:59:28 PM org.apache.tomcat.util.digester.Digester startElement
      SEVERE: Begin event threw error
      java.lang.ExceptionInInitializerError
      at com.sun.identity.agents.arch.Manager.<clinit>(Manager.java:675)
      at com.sun.identity.agents.tomcat.v6.AmTomcatRealm.<clinit>(AmTomcatRealm.java:67)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      at java.lang.Class.newInstance(Class.java:383)
      at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:145)
      at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1282)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
      at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)
      at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1555)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:615)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:280)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454)
      Caused by: java.lang.RuntimeException: Failed to load configuration: ApplicationSSOTokenProvider.getApplicationSSOToken(): Unable to get Application SSO Token
      at com.sun.identity.agents.arch.AgentConfiguration.bootStrapClientConfiguration(AgentConfiguration.java:790)
      at com.sun.identity.agents.arch.AgentConfiguration.initializeConfiguration(AgentConfiguration.java:1140)
      at com.sun.identity.agents.arch.AgentConfiguration.<clinit>(AgentConfiguration.java:1579)
      ... 29 more

      java.lang.ExceptionInInitializerError
      at com.sun.identity.agents.arch.Manager.<clinit>(Manager.java:675)
      at com.sun.identity.agents.tomcat.v6.AmTomcatRealm.<clinit>(AmTomcatRealm.java:67)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      at java.lang.Class.newInstance(Class.java:383)
      at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:145)
      at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1282)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
      at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)

      In the agent bootstrap, there was two // before the naming service. Removed one and retested, but received the same results.

      Edited the Primary site URL to remove the trailing /, and the agent was able to start up appropriately.

      The workaround is to remove the trailing slash at the end of your Primary Site URL

        Attachments

          Activity

            People

            • Assignee:
              kamal.sivanandam@forgerock.com Kamal Sivanandam
              Reporter:
              tina.roper Tina Roper
            • Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: