6 Replies Latest reply on Apr 2, 2012 6:13 PM by Joe Upshaw

    SEVERE: Need a console to configure listener credentials

    Joe Upshaw
      We have been using APEX 4.1 since it cam out and the latest patch set for several weeks now. Over the weekend, we had an unplanned power outage and now, the Apex Listener can not be restarted.

      Attempts to restart the listener result in the following error stack:

      INFO: Starting: /u01/oracle/product/apex_listener/apex.war
      See: 'java -jar apex.war --help' for full range of configuration options
      INFO: Extracting to: /tmp/apex
      INFO: Using classpath: file:/tmp/apex/apex/____embedded/start.jar:file:/tmp/apex/apex/WEB-INF/lib/je-4.0.103.jar:file:/tmp/apex/apex/WEB-INF/lib/poi-3.6-20091214.jar:file:/tmp/apex/apex/WEB-INF/lib/xdb-11.2.0.jar:file:/tmp/apex/apex/WEB-INF/lib/commons-fileupload-1.2.1.jar:file:/tmp/apex/apex/WEB-INF/lib/apex.jar:file:/tmp/apex/apex/WEB-INF/lib/xmlparserv2-11.2.0.jar:file:/tmp/apex/apex/WEB-INF/lib/ojmisc.jar:file:/tmp/apex/apex/WEB-INF/lib/ojdbc6.jar:file:/tmp/apex/apex/WEB-INF/lib/ucp.jar:
      INFO: Starting Embedded Web Container in: /tmp/apex
      SEVERE: Need a console to configure listener credentials
      java.lang.IllegalStateException: Need a console to configure listener credentials
      at ____bootstrap.____Bootstrap._start(____Bootstrap.java:29)
      at ____bootstrap.____Bootstrap.start(____Bootstrap.java:163)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at ____embedded.____EntryPoint.invoke(____EntryPoint.java:299)
      at ____embedded.____EntryPoint.main(____EntryPoint.java:95)

      Anyone have any ideax of something we could try?

      -Joe
        • 1. Re: SEVERE: Need a console to configure listener credentials
          Udo
          Hi Joe,

          it seems you are using the APEX Listener in Standalone Mode.
          It would have been helpful to know how you started your APEX Listener. Probably you didn't configure the apex.home, so your configuration (apex-config.xml as well as your adminlistener/managerlistener credentials and the information where your static contents (images) resides) would have been stored in +/tmp/apex+ as well. Depending on your OS, it's likely that +/tmp+ will be "recycled" upon every reboot, so it's lost by now.
          My next guess is that you use some kind of automatic startup with nohup or some similar tool. This doesn't offer the console needed to enter credentials and images location.
          You can solve this issue by starting APEX Listener directly, i.e. using a regular terminal instead of some background service, so you'll be able to rerun the initial configuration.

          Please note that running APEX Listener in Standalone Mode is not recommended for a production deployment. If you can't do anything about that right now, I'd at least recommend to include apex.home in your startup and let it point to a permanent file system location, e.g.
          java -Dapex.home=/u01/oracle/product/apex_listener/conf -jar apex.war
          There is also a parameter apex.images to provide the path to the images instead of using the value from first startup. See the APEX Listener Installation and Developer Guide for details and further options for deploying APEX Listener.

          -Udo
          • 2. Re: SEVERE: Need a console to configure listener credentials
            Joe Upshaw
            Thanks, Udo. What you have pointed to, the location of the config files on the /tmp directory was, for sure, the issue.

            I have managed to reconfig the listener and now have it back up again. However, I would like to stop it form using the /tmp directory to prevent this from happening in the future.

            I opened the apex.war file and editing the web.xml file such that I uncommented the section, config.dir and changed the value to a permanent location. I restarted apex but, the change doesn't seem to have any affect. That is, it is still using the /tmp/apex directory.

            Does your command do the same thing, albeit form the command liine?

            Do I have to call it like that everytime or will calling it once like that change the location from that point forward?

            Thanks,

            -Joe
            • 3. Re: SEVERE: Need a console to configure listener credentials
              Udo
              Hi Joe,

              the config.dir from web.xml is just for the apex-config.xml , not for user credentials. I'm not sure if it is evaluated at all when running in Standalone Mode, perhaps I'll run a test case to be sure.
              Anyway, you need to set that startup parameter, as mentioned before. Obviously, you need to do that upon every startup, as there is no way to know where the home would be without having any configuration data. However, once you've finished the initial configuration, you just need to pass the parameter for the home, you don't need to re-enter the configuration data if that home has been configured before.

              -Udo
              • 4. Re: SEVERE: Need a console to configure listener credentials
                Joe Upshaw
                Udo,

                Not sure that I understand...it seemed like you were saying that I did need to pass the parameter every time but, then, later you said "you don't need to re-enter the configuration data if that home has been configured before"

                Let me ask a more specific question to make sure I am doing this correctly.

                Right now, this is the command line with which I start up the stand alone listener: /usr/java/jdk1.6.0_27/bin/java -jar /u01/oracle/product/apex_listener/apex.war

                You are saying that I need to use: /usr/java/jdk1.6.0_27/bin/java -Dapex.home=/u01/oracle/product/apex_listener/conf -jar /u01/oracle/product/apex_listener/apex.war

                Correct?

                My question is, do I need to pass in the Dapex.home argument only when I initially reconfigure. Or do I need to permanently issue the command with the "Dapex.home" switch included?

                Thanks for clarifying,

                -Joe
                • 5. Re: SEVERE: Need a console to configure listener credentials
                  Udo
                  Hi Joe,
                  /usr/java/jdk1.6.0_27/bin/java -Dapex.home=/u01/oracle/product/apex_listener/conf -jar /u01/oracle/product/apex_listener/apex.war
                  Right. You need to pass that parameter every time you start your APEX Listener, because, as I intended to clarify before, the application wouldn't have any chance to know where it's home would be if you didn't pass that parameter.
                  What I meant to say is that you need to enter the configuration data (images, usernames and passwords) just upon initializing that home directory, i.e. upon the first time you call APEX Listener using that path. Later, you can run APEX Listener in background (referencing a proper home directory).

                  -Udo

                  P.S.: If your question is answered, please mark this thread and any helpful or correct answer accordingly to help other users searching for a similar issue to spot relevant posts easily. Thanks!

                  Edited by: Udo on 02.04.2012 20:12
                  • 6. Re: SEVERE: Need a console to configure listener credentials
                    Joe Upshaw
                    Thanks, Udo.

                    All is working as desired now.

                    -Joe