6 Replies Latest reply on Sep 1, 2003 6:08 AM by jonlee

    mod_jk2 and Jetty??

    mikefinn

      I seem to be unable to get mod_jk2 talking to Jetty. I built mod_jk2 from source (jakarta-tomcat-connectors-4.1.18), and have it config'd on Apache 2.0.44 (RH 7.2). JBoss 3.2.0 built from JBoss 3.2 branch running on W2K. I have workers2.properties config'd. In the docs, I saw reference to jk.properties on the Tomcat side, but see no analog to it in Jetty. One of the errors I get is what looks to be missing shared mem file, which is config'd in jk.properties - makes me wonder if I'm missing something.

      When I access a mapped application, I get below in error_log (startup log stuff is included as well). Browser gets a 500. workers2.properties is below as well.
      No mod_jk log. Jetty AJP is listening on 8009.

      TIA,
      Mike

      error_log
      [Mon Mar 24 09:12:08 2003] [notice] Apache/2.0.44 (Unix) DAV/2 mod_jk2/2.0.3-dev configured -- resuming normal operations
      [Mon Mar 24 09:12:08 2003] [error] shm.init(): No file
      [Mon Mar 24 09:12:14 2003] [error] workerEnv.init() create slot epStat.0 failed
      [Mon Mar 24 09:12:14 2003] [error] mod_jk.handler() Error connecting to tomcat 120000

      workers2.properties:

      [channel.socket:mjf860-1:8009]
      port=8009
      host=10.160.73.98

      [ajp13:mjf860-1:8009]
      channel=channel.socket:mjf860-1:8009

      [uri:/apps/*]
      worker=ajp13:mjf860-1:8009


        • 1. Re: mod_jk2 and Jetty??
          andreas_engstrom

          Did you ever get any reply to this, Mike? I'm having what seems to be the exact same problem, and I'm completely baffled..

          • 2. Re: mod_jk2 and Jetty??
            andreas_engstrom

            Hm, I seem to have found the problem. I needed a [shm] section in the workers2.properties file. This worked for me:

            [shm]
            file=/var/log/httpd/shm.file
            size=1048576

            What I don't get is that most of the FAQs and pages about configuring mod_jk2 with jetty don't mention that this is necessary. Really strange. Did earlier versions work without this? Or does simply no-one ever actually use mod_jk2 with Jetty?

            Neither the official Jetty FAQ: http://jetty.mortbay.com/jetty/doc/modjk.html
            nor the "unofficial" FAQ at
            http://www.pubbitch.org/jboss/jetty.html
            says a word about any shm file. At last I found it mentioned at
            http://www.gogis.nl/en/public_documentation/j2eeapplicationserver/body.html

            What should the size of this file be? I took the size straight from the page above, but I suppose it should be tuned according to how much memory you have and so on. Does anyone have any hints?

            • 3. Re: mod_jk2 and Jetty??
              dare

              Hi,

              I've been having a similar problem with the same
              configuration, but I have the shared-memory file.

              [error] handler.response() Invalid header id (12)
              [error] ajp13.service() ajpGetReply unrecoverable error 4
              [error] ajp13.service() Error forwarding ajp13:localhost:8009 0 1
              [error] mod_jk.handler() Error connecting to tomcat 120000

              My same configuration is giving me no problems on
              Solaris, running JBoss 3.0.2.

              Anyone see anything like this?

              Anyone know of problems with JBoss/Jetty messing
              up the request/response headers durring a forward?

              Thanks,

              Rob.

              • 4. Re: mod_jk2 and Jetty??
                dare

                I would like to make a correction...

                This configuration is working fine for single calls to the Servlet/JSP.

                I get this error ONLY when I do a RequestDispatcher.forward.

                Thanks,

                R.

                • 5. Re: mod_jk2 and Jetty??
                  mels

                  jboss-3.2.1(jetty) + apache2.0.46 + modjk2.

                  I have the same problem....
                  Jmx-console is working fine..

                  but my application is partly working...... due to following error.
                  [error] handler.response() Invalid header id (12)
                  [error] ajp13.service() ajpGetReply unrecoverable error 4
                  [error] ajp13.service() Error forwarding ajp13:jboss-jetty 0 1
                  [notice] ajp13.done() close endpoint ajp13:jboss-jetty error_state 1
                  [error] mod_jk.handler() Error connecting to tomcat 120000

                  Anyone cracked this???

                  Thanx
                  mels

                  • 6. Re: mod_jk2 and Jetty??
                    jonlee

                    Check http://www.amitysolutions.com.au/documents/JK2-technote.pdf for a basic configuration. This works for Jetty and Tomcat. You can experiment from there. You will need Acrobat Reader 5.0 or equivalent.

                    See if that helps.