10 Replies Latest reply: Jul 20, 2012 10:32 AM by 945348 RSS

    Connecting to Application Express Listener through AJP after images upgrade

    945348
      Hello,

      I have a working standalone Application Express Listener 1.1 that serves over HTTP just great, but does not seem to serve OK over AJP.

      The only change I have made to the Application Express Listener is an upgrade of the images directory, to match an upgrade we did on the database side. Before performing this upgrade, the AJP was working fine.

      When I try and use AJP, I get this in the java output:

      INFO: Starting: /opt/local/apxapp/apex/apex.war
      *See: 'java -jar apex.war --help' for full range of configuration options*
      INFO: Extracting to: /var/tmp/apex
      INFO: Using classpath: file:/var/tmp/apex/apex/____embedded/start.jar:file:/var/tmp/apex/apex/WEB-INF/lib/je-4.0.103.jar:file:/var/tmp/apex/apex/WEB-INF/lib/poi-3.6-20091214.jar:file:/var/tmp/apex/apex/WEB-INF/lib/commons-fileupload-1.2.1.jar:file:/var/tmp/apex/apex/WEB-INF/lib/ojdbc6.jar:file:/var/tmp/apex/apex/WEB-INF/lib/ojmisc.jar:file:/var/tmp/apex/apex/WEB-INF/lib/xdb-11.2.0.jar:file:/var/tmp/apex/apex/WEB-INF/lib/xmlparserv2-11.2.0.jar:file:/var/tmp/apex/apex/WEB-INF/lib/ucp.jar:file:/var/tmp/apex/apex/WEB-INF/lib/apex.jar:
      INFO: Starting Embedded Web Container in: /var/tmp/apex
      Jul 16, 2012 10:46:19 AM ____bootstrap.Deployer start
      INFO: AJP Listener on port 8009 enabled, HTTP listener is disabled.
      Jul 16, 2012 10:46:19 AM ____bootstrap.Deployer deploy
      INFO: Will deploy application path=/var/tmp/apex/apex/WEB-INF/web.xml
      Jul 16, 2012 10:46:20 AM ____bootstrap.Deployer deploy
      INFO: deployed application path=/var/tmp/apex/apex/WEB-INF/web.xml
      Jul 16, 2012 10:46:20 AM com.sun.grizzly.http.jk.server.JkMain init
      INFO: Can't find home, jk2.properties not loaded
      Jul 16, 2012 10:46:20 AM com.sun.grizzly.http.jk.common.ChannelSocket init
      INFO: JK: ajp13 listening on /0.0.0.0:8009
      Jul 16, 2012 10:46:20 AM com.sun.grizzly.http.jk.server.JkMain start
      INFO: Jk running ID=0 time=3/22  config=null
      Jul 16, 2012 10:47:40 AM com.sun.grizzly.http.servlet.ServletAdapter doService
      SEVERE: service exception:
      oracle.dbtools.rt.service.ServiceLocatorException: There are no services defined
      at oracle.dbtools.rt.service.ServiceLocator.acquireAll(ServiceLocator.java:91)
      at oracle.dbtools.rt.service.ServiceLocator.acquire(ServiceLocator.java:74)
      at oracle.dbtools.rt.service.ServiceLocator.acquire(ServiceLocator.java:85)
      at oracle.dbtools.rt.web.HttpEndpointBase.dispatchers(HttpEndpointBase.java:138)
      at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:85)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at com.sun.grizzly.http.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:195)
      at com.sun.grizzly.http.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:139)
      at com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:376)
      at ____bootstrap.SecureServletAdapter.doService(SecureServletAdapter.java:72)
      at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:324)
      at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
      at com.sun.grizzly.tcp.http11.GrizzlyAdapterChain.service(GrizzlyAdapterChain.java:180)
      at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
      at com.sun.grizzly.http.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:237)
      at com.sun.grizzly.http.jk.common.HandlerRequest.invoke(HandlerRequest.java:330)
      at com.sun.grizzly.http.jk.common.ChannelSocket.invoke(ChannelSocket.java:816)
      at com.sun.grizzly.http.jk.common.ChannelSocket.processConnection(ChannelSocket.java:742)
      at com.sun.grizzly.http.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:942)
      at com.sun.grizzly.http.jk.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
      at java.lang.Thread.run(Thread.java:662)

      Here is how I am starting with AJP enabled:

      *{apex_dir}/java/bin/java -Dapex.ajp=8009 -jar ${apex_dir}/apex.war > ${apex_dir}/apex.out*

      Here is how I've configured our Apache web server to pass through AJP requests:


      ProxyPreserveHost On
      ProxyPass /apex ajp://apexhost:8009/apex
      ProxyPassReverse /apex ajp://apexhost:8009/apex
      ProxyPass /i ajp://apexhost:8009/i
      ProxyPassReverse /i ajp://apexhost:8009/i
        • 1. Re: Connecting to Application Express Listener through AJP after images upgrade
          Udo
          Hello,

          looks like your APEX Listener hasn't been configured, at least it doesn't find its configuration...
          Since you start it using
          {apex_dir}/java/bin/java -Dapex.ajp=8009 -jar ${apex_dir}/apex.war > ${apex_dir}/apex.out
          you don't provide the parameter apex.home to give its configuration a non-temporary location. Possibly you had it configured previously but either changed the home or rebooted your machine so your temp got erased.
          You should start without *>* so you will be able to get the "interactive" command line instead. You'll probably be prompted to enter credentials for admin and manager as well as the location for the static contents (images) and you'll then be directed to the listenerConfigure page.
          ProxyPreserveHost On
          ProxyPass /apex ajp://apexhost:8009/apex
          ProxyPassReverse /apex ajp://apexhost:8009/apex
          ProxyPass /i ajp://apexhost:8009/i
          ProxyPassReverse /i ajp://apexhost:8009/i
          I'm not sure your AJP rules will work that way. There is an [url http://www.humboldt.co.uk/2009/02/the-mystery-of-proxypassreverse.html]interesting post on AJP vs. Reverse Proxying you might want to read and change your configuration.
          I'd also recommend to let your Apache serve the static files ( +/i/+ ) instead of proxying it, unless you have a good reason to do so.

          -Udo
          • 2. Re: Connecting to Application Express Listener through AJP after images upgrade
            945348
            >
            you don't provide the parameter apex.home to give its configuration a non-temporary location. Possibly you had it configured previously but either changed the home or rebooted your machine so your temp got erased.
            You should start without *>* so you will be able to get the "interactive" command line instead. You'll probably be prompted to enter credentials for admin and manager as well as the location for the static contents (images) and you'll then be directed to the listenerConfigure page.
            Sure enough, if I specify a non-temp location, it works. I did have to reconfigure the admin and manager users, but after that it works fine.

            Now I will re-attempt a second listener using the same images, as well as same apache listener.

            Thanks Udo!
            • 4. Re: Connecting to Application Express Listener through AJP after images upgrade
              945348
              So, I restarted the listener this morning, and get essentially the same error, except now it's using a non-temp location.

              INFO: Starting: /opt/local/apxapp/apex/apex.war
              *See: 'java -jar apex.war --help' for full range of configuration options*
              INFO: Extracting to: /opt/local/apxapp/apex
              INFO: Using classpath: file:/opt/local/apxapp/apex/apex/____embedded/start.jar:file:/opt/local/apxapp/apex/apex/WEB-INF/lib/ojdbc6.jar:file:/opt/local/apxapp/apex/apex/WEB-INF/lib/xdb-11.2.0.jar:file:/opt/local/apxapp/apex/apex/WEB-INF/lib/commons-fileupload-1.2.1.jar:file:/opt/local/apxapp/apex/apex/WEB-INF/lib/poi-3.6-20091214.jar:file:/opt/local/apxapp/apex/apex/WEB-INF/lib/xmlparserv2-11.2.0.jar:file:/opt/local/apxapp/apex/apex/WEB-INF/lib/ucp.jar:file:/opt/local/apxapp/apex/apex/WEB-INF/lib/ojmisc.jar:file:/opt/local/apxapp/apex/apex/WEB-INF/lib/je-4.0.103.jar:file:/opt/local/apxapp/apex/apex/WEB-INF/lib/apex.jar:
              INFO: Starting Embedded Web Container in: /opt/local/apxapp/apex
              Jul 18, 2012 8:59:34 AM ____bootstrap.Deployer start
              INFO: AJP Listener on port 8009 enabled, HTTP listener is disabled.
              Jul 18, 2012 8:59:34 AM ____bootstrap.Deployer deploy
              INFO: Will deploy application path=/opt/local/apxapp/apex/apex/WEB-INF/web.xml
              Jul 18, 2012 8:59:34 AM ____bootstrap.Deployer deploy
              INFO: deployed application path=/opt/local/apxapp/apex/apex/WEB-INF/web.xml
              Jul 18, 2012 8:59:34 AM com.sun.grizzly.http.jk.server.JkMain init
              INFO: Can't find home, jk2.properties not loaded
              Jul 18, 2012 8:59:34 AM com.sun.grizzly.http.jk.common.ChannelSocket init
              INFO: JK: ajp13 listening on /0.0.0.0:8009
              Jul 18, 2012 8:59:34 AM com.sun.grizzly.http.jk.server.JkMain start
              INFO: Jk running ID=0 time=3/12  config=null
              Jul 18, 2012 8:59:40 AM com.sun.grizzly.http.servlet.ServletAdapter doService
              SEVERE: service exception:
              oracle.dbtools.rt.service.ServiceLocatorException: There are no services defined
              at oracle.dbtools.rt.service.ServiceLocator.acquireAll(ServiceLocator.java:91)
              at oracle.dbtools.rt.service.ServiceLocator.acquire(ServiceLocator.java:74)
              at oracle.dbtools.rt.service.ServiceLocator.acquire(ServiceLocator.java:85)
              at oracle.dbtools.rt.web.HttpEndpointBase.dispatchers(HttpEndpointBase.java:138)
              at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:85)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
              at com.sun.grizzly.http.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:195)
              at com.sun.grizzly.http.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:139)
              at com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:376)
              at ____bootstrap.SecureServletAdapter.doService(SecureServletAdapter.java:72)
              at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:324)
              at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
              at com.sun.grizzly.tcp.http11.GrizzlyAdapterChain.service(GrizzlyAdapterChain.java:180)
              at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
              at com.sun.grizzly.http.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:237)
              at com.sun.grizzly.http.jk.common.HandlerRequest.invoke(HandlerRequest.java:330)
              at com.sun.grizzly.http.jk.common.ChannelSocket.invoke(ChannelSocket.java:816)
              at com.sun.grizzly.http.jk.common.ChannelSocket.processConnection(ChannelSocket.java:742)
              at com.sun.grizzly.http.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:942)
              at com.sun.grizzly.http.jk.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
              at java.lang.Thread.run(Thread.java:662)
              • 5. Re: Connecting to Application Express Listener through AJP after images upgrade
                945348
                Additionally, here is the java startup line:

                java -Dapex.home=/opt/local/apxapp/apex -Dapex.ajp=8009 -jar ${apex_dir}/apex.war
                • 6. Re: Connecting to Application Express Listener through AJP after images upgrade
                  Udo
                  I still think it would be a good idea to separate deployment from home. Possibly there is a kind of access restriction or something similar.
                  Could you try something like this:
                  - leave apex.war where it is (seems to be +/opt/local/apxapp/apex+ )
                  - stop your APEX Listener if it still is running
                  - create a new directory for the home, e.g. in +/opt/local/apxapp/apex_home+ )
                  - either copy the current config from the old home (+ apex-config.xml+, apex.properties and credentials ) or take a chance on a fresh start
                  - start your APEX Listener using the new home
                  java -Dapex.home=/opt/local/apxapp/apex_home -Dapex.ajp=8009 -jar ${apex_dir}/apex.war
                  Possibly this helps you solving your issues.

                  -Udo
                  • 7. Re: Connecting to Application Express Listener through AJP after images upgrade
                    945348
                    Separating the deployment from home has gotten this working again, and it works through my apache web proxy.

                    Thanks again!
                    • 8. Re: Connecting to Application Express Listener through AJP after images upgrade
                      945348
                      I spoke too soon, again! Upon restarting the listener, it again reports the "no services" error. It was working great on the initial startup.

                      Here's how I'm starting it:

                      *java -Dapex.ajp=8009 -Dapex.home=/opt/local/apxapp/apex_home -jar ${apex_dir}/apex.war*

                      Log:

                      INFO: Starting: /opt/local/apxapp/apex/apex.war
                      *See: 'java -jar apex.war --help' for full range of configuration options*
                      INFO: Extracting to: /opt/local/apxapp/apex_home
                      INFO: Using classpath: file:/opt/local/apxapp/apex_home/apex/____embedded/start.jar:file:/opt/local/apxapp/apex_home/apex/WEB-INF/lib/ojdbc6.jar:file:/opt/local/apxapp/apex_home/apex/WEB-INF/lib/xdb-11.2.0.jar:file:/opt/local/apxapp/apex_home/apex/WEB-INF/lib/ojmisc.jar:file:/opt/local/apxapp/apex_home/apex/WEB-INF/lib/je-4.0.103.jar:file:/opt/local/apxapp/apex_home/apex/WEB-INF/lib/apex.jar:file:/opt/local/apxapp/apex_home/apex/WEB-INF/lib/ucp.jar:file:/opt/local/apxapp/apex_home/apex/WEB-INF/lib/xmlparserv2-11.2.0.jar:file:/opt/local/apxapp/apex_home/apex/WEB-INF/lib/poi-3.6-20091214.jar:file:/opt/local/apxapp/apex_home/apex/WEB-INF/lib/commons-fileupload-1.2.1.jar:
                      INFO: Starting Embedded Web Container in: /opt/local/apxapp/apex_home
                      Jul 18, 2012 3:32:10 PM ____bootstrap.Deployer start
                      INFO: AJP Listener on port 8009 enabled, HTTP listener is disabled.
                      Jul 18, 2012 3:32:10 PM ____bootstrap.Deployer deploy
                      INFO: Will deploy application path=/opt/local/apxapp/apex_home/apex/WEB-INF/web.xml
                      Jul 18, 2012 3:32:10 PM ____bootstrap.Deployer deploy
                      INFO: deployed application path=/opt/local/apxapp/apex_home/apex/WEB-INF/web.xml
                      Jul 18, 2012 3:32:10 PM com.sun.grizzly.http.jk.server.JkMain init
                      INFO: Can't find home, jk2.properties not loaded
                      Jul 18, 2012 3:32:10 PM com.sun.grizzly.http.jk.common.ChannelSocket init
                      INFO: JK: ajp13 listening on /0.0.0.0:8009
                      Jul 18, 2012 3:32:10 PM com.sun.grizzly.http.jk.server.JkMain start
                      INFO: Jk running ID=0 time=3/13  config=null
                      Jul 18, 2012 3:32:18 PM com.sun.grizzly.http.servlet.ServletAdapter doService
                      SEVERE: service exception:
                      oracle.dbtools.rt.service.ServiceLocatorException: There are no services defined
                      at oracle.dbtools.rt.service.ServiceLocator.acquireAll(ServiceLocator.java:91)
                      at oracle.dbtools.rt.service.ServiceLocator.acquire(ServiceLocator.java:74)
                      at oracle.dbtools.rt.service.ServiceLocator.acquire(ServiceLocator.java:85)
                      at oracle.dbtools.rt.web.HttpEndpointBase.dispatchers(HttpEndpointBase.java:138)
                      at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:85)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
                      at com.sun.grizzly.http.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:195)
                      at com.sun.grizzly.http.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:139)
                      at com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:376)
                      at ____bootstrap.SecureServletAdapter.doService(SecureServletAdapter.java:72)
                      at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:324)
                      at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
                      at com.sun.grizzly.tcp.http11.GrizzlyAdapterChain.service(GrizzlyAdapterChain.java:180)
                      at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
                      at com.sun.grizzly.http.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:237)
                      • 10. Re: Connecting to Application Express Listener through AJP after images upgrade
                        945348
                        I've abandoned the standalone approach and have this working through Tomcat.

                        Thanks!