7 Replies Latest reply on Feb 15, 2002 3:57 PM by Craig Koster

    How can i know if Ajp13Connector is running???

    Enrique Rodriguez Newbie

      I pass 2 days reading all the threads about Apache+Tomcat+Jboss. I can run this configuration with mod_webapp and the warp connector but i can't do it wiht th Ajp13Connector and mod_jk.

      I do the same that other people said in the forum, but it seems that nothing happen. Apache said that mod_jk is running but i think that tomcat don't listent to it.

      This is all that i do:
      Apache.

      LoadModule jk_module modules/mod_jk.dll
      AddModule mod_jk.c

      And at the end of the file:

      JkWorkersFile "C:/jboss/catalina/conf/workers.properties"
      JkLogFile "C:/jboss/catalina/logs/mod_jk.log"

      #
      # Log level to be used by mod_jk
      #
      JkLogLevel error

      #
      # Root context mounts for Tomcat
      #
      JkMount /*.jsp ajp13
      JkMount /servlet/* ajp13
      JkMount /MKFileUpload/* ajp13
      JkMount /MKFileUpload/servlet/* ajp13

      Tomcat/catalina.
      Copy the workers.properties of TC3.2 to CATALINA_HOME/conf

      JBoss.
      modify the jboss.jcml






      do i forgot anything???


      My configuration is
      Windows 2000
      Apache 1.3.23
      Jboss 2.4.4
      Tomcat 4.01

      Regards, Enrique.

        • 1. Re: How can i know if Ajp13Connector is running???
          Craig Koster Newbie

          When you start up jboss/catalina you should see the following:

          [INFO,EmbeddedCatalinaServiceSX] Starting
          [INFO,EmbeddedCatalinaServiceSX] Starting EmbeddedCatalinaSX....
          [INFO,EmbeddedCatalinaServiceSX] Building Http engine and connector
          [INFO,Default] Apache Tomcat/4.0.1
          [INFO,EmbeddedCatalinaServiceSX] HttpConnector Opening server socket on all host IP addresses
          [INFO,EmbeddedCatalinaServiceSX] HttpConnector[8080] Starting background thread
          [INFO,EmbeddedCatalinaServiceSX] HttpProcessor[8080][0] Starting background thread
          [INFO,EmbeddedCatalinaServiceSX] HttpProcessor[8080][1] Starting background thread
          [INFO,EmbeddedCatalinaServiceSX] HttpProcessor[8080][2] Starting background thread
          [INFO,EmbeddedCatalinaServiceSX] HttpProcessor[8080][3] Starting background thread
          [INFO,EmbeddedCatalinaServiceSX] HttpProcessor[8080][4] Starting background thread
          [INFO,EmbeddedCatalinaServiceSX] Ajp13Connector[8009] Opening server socket on all host IP addresses
          [INFO,EmbeddedCatalinaServiceSX] Ajp13Connector[8009] Starting background thread
          [INFO,EmbeddedCatalinaServiceSX] Ajp13Processor[8009][0] Starting background thread
          [INFO,EmbeddedCatalinaServiceSX] Ajp13Processor[8009][0] Background thread has been started
          [INFO,EmbeddedCatalinaServiceSX] Ajp13Processor[8009][1] Starting background thread
          [INFO,EmbeddedCatalinaServiceSX] Ajp13Processor[8009][1] Background thread has been started
          [INFO,EmbeddedCatalinaServiceSX] Ajp13Processor[8009][2] Starting background thread
          [INFO,EmbeddedCatalinaServiceSX] Ajp13Processor[8009][2] Background thread has been started
          [INFO,EmbeddedCatalinaServiceSX] Ajp13Processor[8009][3] Starting background thread
          [INFO,EmbeddedCatalinaServiceSX] Ajp13Processor[8009][3] Background thread has been started
          [INFO,EmbeddedCatalinaServiceSX] Ajp13Processor[8009][4] Starting background thread
          [INFO,EmbeddedCatalinaServiceSX] Ajp13Processor[8009][4] Background thread has been started
          [INFO,EmbeddedCatalinaServiceSX] OK
          [INFO,EmbeddedCatalinaServiceSX] Started

          That'll tell you that the Ajp13 connector is running. Then try changing your Apache log level to info or debug and when you try one of your examples you should see something like this:

          [INFO,EmbeddedCatalinaServiceSX] Ajp13Processor[8009][4] An incoming request is being assigned
          [INFO,EmbeddedCatalinaServiceSX] Ajp13Processor[8009][4] The incoming request has been awaited
          [INFO,Default] [Ajp13] setSocket()
          [INFO,Default] [Ajp13] receiveNextRequest()
          [INFO,Default] [Ajp13] receive()
          [INFO,Default] [Ajp13] receive: len = 320
          [INFO,Default] [Ajp13] receive: total read = 320
          [INFO,Default] [Ajp13] decodeRequest()
          [INFO,EmbeddedCatalinaServiceSX] Ajp13Processor[8009][4] invoking...
          [INFO,Default] [Ajp13] sendHeaders()
          [INFO,Default] [Ajp13] status is: 302(Moved Temporarily)
          [INFO,Default] [Ajp13] send()
          [INFO,Default] [Ajp13] sending msg, len = 78
          [INFO,Default] [Ajp13] doWrite(byte[], 0, 647)
          [INFO,Default] [Ajp13] send()
          [INFO,Default] [Ajp13] sending msg, len = 655
          [INFO,Default] [Ajp13] finish()
          [INFO,Default] [Ajp13] send()
          [INFO,Default] [Ajp13] sending msg, len = 6
          [INFO,Default] [Ajp13] recycle()
          [INFO,Default] [Ajp13] receiveNextRequest()
          [INFO,Default] [Ajp13] receive()
          [INFO,Default] [Ajp13] receive: len = 329
          [INFO,Default] [Ajp13] receive: total read = 329
          [INFO,Default] [Ajp13] decodeRequest()
          [INFO,EmbeddedCatalinaServiceSX] Ajp13Processor[8009][4] invoking...
          [INFO,EmbeddedCatalinaServiceSX] jsp: init
          [INFO,Default] [Ajp13] sendHeaders()
          [INFO,Default] [Ajp13] status is: 200(OK)
          [INFO,Default] [Ajp13] send()
          [INFO,Default] [Ajp13] sending msg, len = 105
          [INFO,Default] [Ajp13] doWrite(byte[], 0, 595)
          [INFO,Default] [Ajp13] send()
          [INFO,Default] [Ajp13] sending msg, len = 603
          [INFO,Default] [Ajp13] finish()
          [INFO,Default] [Ajp13] send()
          [INFO,Default] [Ajp13] sending msg, len = 6
          [INFO,Default] [Ajp13] recycle()
          [INFO,Default] [Ajp13] receiveNextRequest()
          [INFO,Default] [Ajp13] receive()

          I have the same configuration as you and the same entries in the httpd.config and jboss.jcml as you and it works fine for me. The only thing I can think of is check your paths's to the workers file and make sure you have the Ajp13 worker and java.home properties set correctly in that file.

          • 2. Re: How can i know if Ajp13Connector is running???
            Enrique Rodriguez Newbie

            ok, now i know that the problem is in Jboss Tomcat because i don't get this messages of AjpConector. I only get these:

            [INFO,EmbeddedCatalinaServiceSX] Starting
            [INFO,EmbeddedCatalinaServiceSX] Starting EmbeddedCatalinaSX....
            [INFO,EmbeddedCatalinaServiceSX] Building Http engine and connector
            [INFO,Default] Apache Tomcat/4.0.1
            [INFO,EmbeddedCatalinaServiceSX] HttpConnector Abriendo sockets de servidor en todas las direcciones IP disponibles
            [INFO,EmbeddedCatalinaServiceSX] HttpConnector[8080] Iniciando thread de posterior
            [INFO,EmbeddedCatalinaServiceSX] HttpProcessor[8080][0] Iniciando thread de posterior
            [INFO,EmbeddedCatalinaServiceSX] HttpProcessor[8080][1] Iniciando thread de posterior
            [INFO,EmbeddedCatalinaServiceSX] HttpProcessor[8080][2] Iniciando thread de posterior
            [INFO,EmbeddedCatalinaServiceSX] HttpProcessor[8080][3] Iniciando thread de posterior
            [INFO,EmbeddedCatalinaServiceSX] HttpProcessor[8080][4] Iniciando thread de posterior
            [INFO,EmbeddedCatalinaServiceSX] OK
            [INFO,EmbeddedCatalinaServiceSX] Started

            So what do you think that i have wrong???

            Is yout configuration on Linux or on Windows???

            Could you upload your config files to test they on my machine????

            I attach my config files.

            Regards, Enrique.

            • 3. Re: How can i know if Ajp13Connector is running???
              Craig Koster Newbie

              My config files look just like yours do so I'm not sure what the problem is.

              It looks like the EmbeddedCatalinaService is starting OK (you have your log level set higher so that's why you don't see all the lines that I posted).

              In your original message you said that you couldn't get this to work. What is happening to make you say that? Can you not browse http://localhost (Apache root) or http://localhost:8080 (Tomcat root) anymore? Can you see http://localhost/jboss/ (tomcat-test.ear project) ?

              Give some specifics of the errors you're seeing.

              • 4. Re: How can i know if Ajp13Connector is running???
                Enrique Rodriguez Newbie

                ok, now i know that the problem is in Jboss Tomcat because i don't get this messages of AjpConector. I only get these:

                [INFO,EmbeddedCatalinaServiceSX] Starting
                [INFO,EmbeddedCatalinaServiceSX] Starting EmbeddedCatalinaSX....
                [INFO,EmbeddedCatalinaServiceSX] Building Http engine and connector
                [INFO,Default] Apache Tomcat/4.0.1
                [INFO,EmbeddedCatalinaServiceSX] HttpConnector Abriendo sockets de servidor en todas las direcciones IP disponibles
                [INFO,EmbeddedCatalinaServiceSX] HttpConnector[8080] Iniciando thread de posterior
                [INFO,EmbeddedCatalinaServiceSX] HttpProcessor[8080][0] Iniciando thread de posterior
                [INFO,EmbeddedCatalinaServiceSX] HttpProcessor[8080][1] Iniciando thread de posterior
                [INFO,EmbeddedCatalinaServiceSX] HttpProcessor[8080][2] Iniciando thread de posterior
                [INFO,EmbeddedCatalinaServiceSX] HttpProcessor[8080][3] Iniciando thread de posterior
                [INFO,EmbeddedCatalinaServiceSX] HttpProcessor[8080][4] Iniciando thread de posterior
                [INFO,EmbeddedCatalinaServiceSX] OK
                [INFO,EmbeddedCatalinaServiceSX] Started

                So what do you think that i have wrong???

                Is yout configuration on Linux or on Windows???

                Could you upload your config files to test they on my machine????

                Regards, Enrique.

                • 5. Re: How can i know if Ajp13Connector is running???
                  Enrique Rodriguez Newbie

                  hi ckoster,

                  i change de debug level to 0 an the log messages are the same .

                  About what go for me and what not

                  Http://localhost/ --> Apache index page
                  Http://locahost:8080/OneOfMyWebApps --> My WebApp
                  Http://localhost/OneOfMyWebApps --> Internal Server Error

                  I think this is very very strange.

                  I'm trying other things. I connect apache to tomcat (without jboss) without any problems thought ajp13Connector

                  So i'm sure that te problem is in jboss (workes file and apache configuration i think is ok).

                  Another thing is one thing that jtwomey said in this thread http://main.jboss.org/thread.jsp?forum=50&thread=8536 about my config that i dont understand.

                  Please read this thread, and see the my configuration to run all with mod_webapp conector.

                  Thanks a lot ckoster.

                  Regards, Enrique.

                  • 6. Re: How can i know if Ajp13Connector is running???
                    Enrique Rodriguez Newbie

                    ok, i donwnload again, and now, all go¡¡¡¡

                    i can't explain it¡¡¡¡ but... it's true


                    Thank to everybody who help me.

                    Regard Enrique.

                    • 7. Re: How can i know if Ajp13Connector is running???
                      Craig Koster Newbie

                      Glad to hear you got it.

                      The only thing I can say is that when you run stuff thru Apache/Tomcat integration you have to make sure to add a trailing slash ("/") to your URL for some reason.

                      http://localhost/myapp <--get page not found
                      http://localhost/myapp/ <--everything OK

                      Not sure why this is or if this happens to everybody else but just thought I'd mention it. By the way, if anyone reading knows how to fix this so you DON'T have to add the trailing slash I'd appreciate a post or link on how you did it. Thanks.