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

Unable to install AM using default configuration wizard when built with 'suppress-upgrade'

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0.0
    • Fix Version/s: 6.0.1, 5.5.2
    • Component/s: install
    • Labels:
    • Environment:
    • Sprint:
      AM Sustaining Sprint 67
    • Story Points:
      1

      Description

      Bug description

      A fresh installation of AM 6.0.0 master (a0a21a2220c4bffd19bc8e512a4e2b3642ee3afb) built with the suppress-upgrade profile using the "Default configuration" option on the UI installer wizard results in a broken install. The install appears to complete without errors, but any attempt to access any page still redirects to /config/options.htm with all the options greyed-out. Some errors are then visible in the logs relating to upgrade (despite this being a fresh install) - see logs below.

      How to reproduce the issue

      1. Remove any existing install: rm -r ~/openam && rm -r ~/tomcat/webapps/openam && rm -r ~/.openamcfg
      2. Deploy latest OpenAM 6.0.0 snapshot war built with the suppress-upgrade Maven profile and restart Tomcat
      3. Navigate to AM home page and select "Default configuration" option from installer
      4. Enter amadmin password and let install complete
      5. After successful install, click to redirect to Login page
      Expected behaviour
      Redirected to login page as normal
      Current behaviour
      Redirected back to installer page with all links greyed out
      

      Work around

      Build AM without suppress-upgrade.

      Code analysis

      The following logs exist in the AM debug directory after the failures. Firstly, amUpgrade exists despite no upgrade being performed with multiple copies of the following log message:

      amUpgrade:04/25/2018 08:33:57:773 AM BST: Thread[http-nio-8080-exec-6,5,main]: TransactionId[a20b01dd-c86a-4495-b0c6-f7024a50df42-24]
      ERROR: Unable to parse product versions for comparison; Current:  war:

      The Configuration log has multiple copies of the following error:

      amSetupServlet:04/25/2018 08:33:57:778 AM BST: Thread[http-nio-8080-exec-6,5,main]: TransactionId[a20b01dd-c86a-4495-b0c6-f7024a50df42-24]
      ERROR: AMSetupServlet.isCurrentConfigurationValid
      org.forgerock.openam.upgrade.UpgradeException: Unable to parse product versions for comparison. Current:  war: 
      at org.forgerock.openam.upgrade.VersionUtils.isVersionNewer(VersionUtils.java:100)
      at org.forgerock.openam.upgrade.VersionUtils.isVersionNewer(VersionUtils.java:87)
      at com.sun.identity.setup.AMSetupServlet.isCurrentConfigurationValid(AMSetupServlet.java:254)
      at com.sun.identity.setup.AMSetupServlet.notifyAmStartup(AMSetupServlet.java:1820)
      at com.sun.identity.setup.AMSetupServlet.processRequest(AMSetupServlet.java:497)
      at com.sun.identity.config.DefaultSummary.createDefaultConfig(DefaultSummary.java:121)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.click.util.ClickUtils.invokeMethod(ClickUtils.java:3317)
      at org.apache.click.util.ClickUtils.invokeListener(ClickUtils.java:2088)
      at org.apache.click.control.AbstractControl$1.onAction(AbstractControl.java:228)
      at org.apache.click.ActionEventDispatcher.fireActionEvent(ActionEventDispatcher.java:259)
      at org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:236)
      at org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:180)
      at org.apache.click.ClickServlet.performOnProcess(ClickServlet.java:746)
      at org.apache.click.ClickServlet.processAjaxPageEvents(ClickServlet.java:1860)
      at org.apache.click.ClickServlet.processPage(ClickServlet.java:559)
      at org.apache.click.ClickServlet.handleRequest(ClickServlet.java:383)
      at org.apache.click.ClickServlet.doGet(ClickServlet.java:276)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:59)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.forgerock.openam.headers.SetHeadersFilter.doFilter(SetHeadersFilter.java:80)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:124)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.forgerock.openam.audit.context.AuditContextFilter.doFilter(AuditContextFilter.java:46)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:651)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:407)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1376)
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:748)

      The CoreSystem log then has some (unrelated?) errors from DJ audit logging:

      org.forgerock.audit.handlers.json.JsonFileWriter:04/25/2018 08:30:54:900 AM BST: Thread[audit-json-0,5,main]: TransactionId[3b54783a-93bb-4656-9474-831c77f79b10-5191]
      ERROR: Failed to flush file buffer
      java.nio.file.NoSuchFileException: /Users/neil/openam/opends/logs/ldap-access.audit.json
      at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
      at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
      at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
      at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177)
      at java.nio.channels.FileChannel.open(FileChannel.java:287)
      at java.nio.channels.FileChannel.open(FileChannel.java:335)
      at org.forgerock.audit.handlers.json.JsonFileWriter$QueueConsumer$TopicEntry.openFileChannel(JsonFileWriter.java:516)
      at org.forgerock.audit.handlers.json.JsonFileWriter$QueueConsumer$TopicEntry.flush(JsonFileWriter.java:445)
      at org.forgerock.audit.handlers.json.JsonFileWriter$QueueConsumer.writeEvents(JsonFileWriter.java:358)
      at org.forgerock.audit.handlers.json.JsonFileWriter$QueueConsumer.run(JsonFileWriter.java:313)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
      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)

      Possibly related to OPENAM-12688, but that was merged a week ago so I would expect others to have noticed in the meantime.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                adam.heath Adam Heath
                Reporter:
                neil.madden Neil Madden
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: