12 Replies Latest reply on Jul 10, 2003 10:46 AM by ericmolitor

    IIS Integration to JBoss/Jetty

    dereks

      Hi All

      Has anyone managed to set-up IIS to communicate with Jetty integrated into JBoss. I know that there is the Jakarta IIS plugin to communicate with Tomcat, but I was wondering if anyone had managed to link IIS directly to Jetty integated into JBoss.

      Any comments/suggestions would be appreciated.

      Thanks,

      Derek.

        • 1. Re: IIS Integration to JBoss/Jetty

          I also want to integrate JBoss/jetty with IIS.

          Thanks for any reply

          Olivier.

          • 2. Re: IIS Integration to JBoss/Jetty
            jonlee

            All that is required is to install the isapi.dll for JK2 and configure it as per the instructions for JK2 for IIS. You will need to set it up to communicate with the correct port on Jetty.

            There are no big operational differences between Jetty and embedded Jetty with regard to listeners. You will need to set up the JK2 listener in Jetty. In JBoss, this configuration is maintained in server/instance/deploy/jbossweb-jetty.sar/META-INF/jboss-service.xml in 3.2.0 where instance is the JBoss instance.

            You'll want a configuration like this:



            8009
            5
            20
            0
            443




            This means that it will be listening for your JK2 communications on port 8009. So, in this case, your isapi.dll plugin will need to be configured to communicate to the Jetty service on port 8009.

            To make things easy, the HowTo for IIS is based on a listener being configured for port 8009. See:
            http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html

            The isapi.dll is simply a redirector for web requests, configured for a specific proprietary protocol. For example, the HAHT app server has an ISAPI module to integrate with the IIS front-end.

            • 3. Re: IIS Integration to JBoss/Jetty

              Thanks for your reply.

              Well still stuck.

              In case anybody has valid worker and uriworker files, I would appreciate to see them.

              Olivier.

              • 4. Re: IIS Integration to JBoss/Jetty

                More on my problem:

                Basically my confirguration:
                - Windows 2003 server
                - IIS bundled with W2003 (running on port 8080 for now)
                - JBoss/Jetty 3.2.1 (on port 80)

                I downloaded the ISAPI dll and installed as mentionned (see also exported part of my registry).

                I stopped (and even rebooted my server) to be sure it works.

                I launched JBoss which runs perfectly.

                But what i get when i try to access my jsp pages using IIS is a 404 error.

                I attached my worker and uriworker files, as well part of my registry concerning the ISAPI filter.


                • 5. Re: IIS Integration to JBoss/Jetty
                  jonlee

                  The isapi redirector is looking for a file called workers.properties but you have included in the post a file called worker.properties. Is this correct?

                  Also, has your ISAPI log file produced anything? (D:\ISAPIRedirect\isapi.log)

                  Finally, as per the tutorial, what is your IIS log producing when you try to access the page? (SYSTEM/LogFiles/W3SVC1)

                  A line of this pattern (substitute with whatever is appropriate for your web app content):

                  GET "/examples/jsp/index.html HTTP/1.1" 404

                  means that the redirector is not being called by IIS - which means a configuration error.

                  When your JBoss/Jetty configuration runs, are you able to telnet to port 8009 (where presumably the Jetty JK2 listener is bound).

                  • 6. Re: IIS Integration to JBoss/Jetty
                    dereks

                    Just as a matter of interest, I have managed to get it working. I had to use the isapi_redirector2.dll (jk2) to get it working. Using the jk isapi_redirect.dll gave me errors.

                    I have attached all my files. I copied them into the \Intepub\Scripts directory. You may need to modify the attached files to setup for your system (isapi_redirector2.reg & workers2.properties).

                    Do the following:
                    - Run in the .reg file.
                    - Create a virtual directory called 'jakarta' in IIS (executable) pointing to the above directory.
                    - Add the dll to the ISAPI filter list in IIS.
                    - Add your context for filtering to the workers2.properties file.
                    - Restart IIS

                    Hope this helps.

                    Derek.

                    • 7. Re: IIS Integration to JBoss/Jetty

                      > The isapi redirector is looking for a file called
                      > workers.properties but you have included in the post
                      > a file called worker.properties. Is this correct?
                      >
                      Yes, I saw that error and corrected it : but did not change anything.


                      > Also, has your ISAPI log file produced anything?
                      > (D:\ISAPIRedirect\isapi.log)

                      Nothing at all! I can't see the file.

                      >
                      > Finally, as per the tutorial, what is your IIS log
                      > producing when you try to access the page?
                      > (SYSTEM/LogFiles/W3SVC1)
                      >

                      My web site is located in /ods. Directly with JBoss it works fine. But when using IIS to serve it, here what appears in the log file:

                      2003-06-05 12:23:46 127.0.0.1 GET /ods/index.jsp - 8080 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322) - 404 0 3



                      > A line of this pattern (substitute with whatever is
                      > appropriate for your web app content):
                      >
                      > GET "/examples/jsp/index.html HTTP/1.1" 404
                      >
                      > means that the redirector is not being called by IIS
                      > - which means a configuration error.
                      >
                      > When your JBoss/Jetty configuration runs, are you
                      > able to telnet to port 8009 (where presumably the
                      > Jetty JK2 listener is bound).

                      Yes I can telnet the connector on this port


                      Thanks.

                      Olivier.

                      • 8. Re: IIS Integration to JBoss/Jetty
                        jonlee

                        Yes. My bad. The JK2 maps to AJP13. The old JK (AJP12) is not supported in Tomcat 4.x.

                        http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/installhowto.html

                        Register the jk2 redirector instead. However, still appears that you weren't having any luck connecting, Olivier. The indication was that IIS was not calling the redirector.

                        • 9. Re: IIS Integration to JBoss/Jetty

                          Well I changed all in favor of JK2. I think the situation has improved but I'm still stuck.

                          What I simply want to do :
                          Redirect all incoming request handled by IIS on /ods to jboss which has a ods.war deployed.

                          I attach two files : the log file from JK2 and my workers2.properties.

                          Many thanks to those who are helping me.

                          Olivier.

                          • 10. Re: IIS Integration to JBoss/Jetty
                            jonlee

                            You may want to simplify your setting first just so we don't confuse ourselves.Turn this:

                            [uri:/ods]
                            info=Example webapp in the default context.
                            context=/ods
                            group=channel.socket:localhost:8009
                            debug=10

                            [uri:/ods/servlet/*]
                            info=Prefix mapping
                            context=/ods
                            group=channel.socket:localhost:8009
                            debug=10

                            [uri:/ods/*.jsp]
                            info=Extension mapping
                            context=/ods
                            group=channel.socket:localhost:8009
                            debug=10

                            [uri:/ods/*]
                            info=Map the whole webapp
                            context=/ods
                            group=channel.socket:localhost:8009
                            debug=10

                            [uri:/ods/*]
                            info=ODS Web site
                            context=/ods
                            group=channel.socket:localhost:8009
                            debug=10

                            Into:

                            [uri:/ods/*]
                            info=ODS Web site
                            context=/ods
                            group=channel.socket:localhost:8009
                            debug=10

                            Essentially, any URI starting with /ods/ egts handed to JK2.

                            Now the log shows that we are now passing off to Tomcat but we stop dead there.

                            You may want to turn debug to 10 on the socket channel so we can see if anything breaks.
                            [channel.socket:localhost:8009]
                            info=Ajp13 forwarding over socket
                            debug=10
                            tomcatId=localhost:8009

                            Also, does Jetty report anything in its access logs, or in the server.log for JBoss? That may give a clue as to whether Jetty is having problems with the communication.

                            • 11. Re: IIS Integration to JBoss/Jetty
                              ivirut

                              Some tips that could help you next time:

                              If you want to serve an JSP file, you must add:
                              [uri:/ods/*.jsp]
                              info=ODS Web site
                              context=/ods
                              group=channel.socket:localhost:8009
                              debug=10

                              If you configure the log file to a directory logs, you must create that directory.

                              The serverRoot could be any directory in which you put your config file (workers2.properties) and your logs files.

                              • 12. Re: IIS Integration to JBoss/Jetty
                                ericmolitor

                                Just some bonus information. We ran into many issues using both isapi_redirector.dll and isapi_redirector2.dll under load.

                                Why not front with apache on Windows or just let tomcat handle everything?