We've been using Tomcat with Flex for some time with no problems. 
Recently we started using mod_jk to connect Flex to the Apache Web Server.

The flex application loads fine, but when it gets to handling an
HttpService, it throws an exception.  Note that if we go directly to
tomcat (port 8080 instead of 80), all is well.

The stack trace below suggests that the Flex Proxy Servlet is trying
to connect to the http service on a port which is not open .. perhaps
the mod_jk workers port (although I would think that port would be open).

Does anyone have mod_jk working with flex?

java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
        at java.net.Socket.connect(Socket.java:507)
        at java.net.Socket.connect(Socket.java:457)
        at java.net.Socket.<init>(Socket.java:365)
        at java.net.Socket.<init>(Socket.java:178)
        at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:86)
        at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:651)
        at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1170)
        at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:628)
        at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:497)
        at
flex.server.j2ee.proxy.ProxyServlet.service(ProxyServlet.java:611)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at
flex.bootstrap.BootstrapServlet.service(BootstrapServlet.java:69)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)


Why use mod_jk and Apache with Tomcat?

- The reasons to use Apache with Tomcat (versus a bare to the world
instance of tomcat) are numerous albeit some are 
superstitous/religous.  They include performance (especially SSL),
security, configurability, and scalability.

- mod_jk is fairly high performance and handles http versus https nicely.

- mod_jk supports load balancing across multiple instances of Tomcat.
 There are obvious reasons to load balance across multiple machines
and some more subtle ones for load balancing across multiple instances
on a single machine.










 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to