You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ângelo Vimeney <av...@gmail.com> on 2007/12/06 19:27:29 UTC

[users@httpd] Apache, Tomcat and mod_proxy

Hello everybody,

I'm experiencing problems using the Apache server as a proxy to my
Tomcat server and I will appreciate if somebody could help me. Please,
take my apologies for my poor English and long mail.

I'm using Apache version 2.2.6 installed on a dedicated HTTP server
machine (running Linux 2.6.9-34.EL). I'm using Tomcat version 6.0.14
installed on another dedicated server machine (running Linux
2.6.9-34.EL). I have also a remote browser emulator running on another
dedicated machine. The emulated browsers access an e-commerce site
deployed at the Tomcat server (I'm running the TPC-W benchmark).

When I simulate 25 browsers accessing Apache, everything works fine.
But when I increase this value to 50, after 5 minutes of simulation,
the following error message is logged at the Apache's error_log file:

[Tue Dec 04 16:47:17 2007] [notice] Apache/2.2.6 (Unix) configured --
resuming normal operations
[Tue Dec 04 16:53:08 2007] [error] (70007)The timeout specified has
expired: ajp_ilink_receive() can't receive header
[Tue Dec 04 16:53:08 2007] [error] ajp_read_header: ajp_ilink_receive failed
[Tue Dec 04 16:53:08 2007] [error] (120006)APR does not understand
this error code: proxy: read response failed from 10.10.20.246:8009
(compute-0-0)
[Tue Dec 04 16:53:08 2007] [error] (70007)The timeout specified has
expired: ajp_ilink_receive() can't receive header
[Tue Dec 04 16:53:08 2007] [error] ajp_read_header: ajp_ilink_receive failed
[Tue Dec 04 16:53:08 2007] [error] (120006)APR does not understand
this error code: proxy: read response failed from 10.10.20.246:8009
(compute-0-0)
...

At the Tomcat's catalina.out I found the following log:

...
Dec 4, 2007 4:47:49 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3549 ms
Dec 4, 2007 4:53:51 PM org.apache.jk.core.MsgContext action
WARNING: Error sending end packet
java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:531)
        at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:121)
        at org.apache.jk.core.MsgContext.action(MsgContext.java:301)
        at org.apache.coyote.Response.action(Response.java:183)
        at org.apache.coyote.Response.finish(Response.java:305)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:195)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:595)
Dec 4, 2007 4:53:51 PM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Dec 4, 2007 4:53:56 PM org.apache.jk.core.MsgContext action
WARNING: Error sending end packet
java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:531)
        at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:121)
        at org.apache.jk.core.MsgContext.action(MsgContext.java:301)
        at org.apache.coyote.Response.action(Response.java:183)
        at org.apache.coyote.Response.finish(Response.java:305)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:195)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:595)
...

I have successfully build my Apache using:

configure --enable-modules='proxy proxy_ajp proxy_balancer'
make
make install

I added to the original httpd.conf the followings configurations:

ProxyRequests Off

<Location /tpcw>
    ProxyPass balancer://tomcatCluster/tpcw stickysession=JSESSIONID
nofailover=On timeout=60
    ProxyPassReverse balancer://tomcatCluster/tpcw
</Location>

<Proxy balancer://tomcatCluster>
    BalancerMember ajp://compute-0-0:8009  route=tomcat1
</Proxy>

ServerLimit 75
MaxClients 75


In the Tomcat's server.xml, I'm using:

<Connector port="8009" enableLookups="false" redirectPort="8443"
       protocol="AJP/1.3" maxThreads="75"
       minSpareThreads="50"
       maxSpareThreads="50"/>

<Engine name="Standalone" defaultHost="localhost" jvmRoute="tomcat1">


After the error, both Apache and Tomcat still working fine, but the
error makes my simulation's results unreliable. Note that, when I use
the mod_jk instead of mod_proxy, no problems arise, not even with more
than 50 emulated browsers. Is that some configuration problem?? Any
suggestions?

Thanks in advance,
Ângelo Vimeney

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache, Tomcat and mod_proxy

Posted by Ângelo Vimeney <av...@gmail.com>.
Gabriel, when I use the mod_jk everything works fine. The problem
arises when using the mod_proxy, so the JkOptions directive can't be
used to solve it. However, I thank you for your attention.

Ângelo

On Dec 7, 2007 12:10 PM,  <GK...@symcor.com> wrote:
> Hi,
> Do you have a firewall between apache and Tomcat? Looks like the connection
> gets closed before Tomcat is able to send the response.
>  Try JkOptions DisableReuse, this worked for me.
>
> Gabriel
>
>
>
>
>              "Ângelo Vimeney"
>              <avimeney@gmail.c
>              om>                                                        To
>                                        users@httpd.apache.org
>              06/12/2007 01:27                                           cc
>              PM
>                                                                    Subject
>                                        [users@httpd] Apache, Tomcat and
>              Please respond to         mod_proxy
>              users@httpd.apach
>                    e.org
>
>
>
>
>
>
>
>
>
> Hello everybody,
>
> I'm experiencing problems using the Apache server as a proxy to my
> Tomcat server and I will appreciate if somebody could help me. Please,
> take my apologies for my poor English and long mail.
>
> I'm using Apache version 2.2.6 installed on a dedicated HTTP server
> machine (running Linux 2.6.9-34.EL). I'm using Tomcat version 6.0.14
> installed on another dedicated server machine (running Linux
> 2.6.9-34.EL). I have also a remote browser emulator running on another
> dedicated machine. The emulated browsers access an e-commerce site
> deployed at the Tomcat server (I'm running the TPC-W benchmark).
>
> When I simulate 25 browsers accessing Apache, everything works fine.
> But when I increase this value to 50, after 5 minutes of simulation,
> the following error message is logged at the Apache's error_log file:
>
> [Tue Dec 04 16:47:17 2007] [notice] Apache/2.2.6 (Unix) configured --
> resuming normal operations
> [Tue Dec 04 16:53:08 2007] [error] (70007)The timeout specified has
> expired: ajp_ilink_receive() can't receive header
> [Tue Dec 04 16:53:08 2007] [error] ajp_read_header: ajp_ilink_receive
> failed
> [Tue Dec 04 16:53:08 2007] [error] (120006)APR does not understand
> this error code: proxy: read response failed from 10.10.20.246:8009
> (compute-0-0)
> [Tue Dec 04 16:53:08 2007] [error] (70007)The timeout specified has
> expired: ajp_ilink_receive() can't receive header
> [Tue Dec 04 16:53:08 2007] [error] ajp_read_header: ajp_ilink_receive
> failed
> [Tue Dec 04 16:53:08 2007] [error] (120006)APR does not understand
> this error code: proxy: read response failed from 10.10.20.246:8009
> (compute-0-0)
> ...
>
> At the Tomcat's catalina.out I found the following log:
>
> ...
> Dec 4, 2007 4:47:49 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 3549 ms
> Dec 4, 2007 4:53:51 PM org.apache.jk.core.MsgContext action
> WARNING: Error sending end packet
> java.net.SocketException: Broken pipe
>         at java.net.SocketOutputStream.socketWrite0(Native Method)
>         at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
>         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
>         at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:531)
>         at
> org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:121)
>         at org.apache.jk.core.MsgContext.action(MsgContext.java:301)
>         at org.apache.coyote.Response.action(Response.java:183)
>         at org.apache.coyote.Response.finish(Response.java:305)
>         at
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:195)
>         at
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
>         at
> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
>         at
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
>
>         at
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
>
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
>
>         at java.lang.Thread.run(Thread.java:595)
> Dec 4, 2007 4:53:51 PM org.apache.jk.common.ChannelSocket processConnection
> WARNING: processCallbacks status 2
> Dec 4, 2007 4:53:56 PM org.apache.jk.core.MsgContext action
> WARNING: Error sending end packet
> java.net.SocketException: Broken pipe
>         at java.net.SocketOutputStream.socketWrite0(Native Method)
>         at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
>         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
>         at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:531)
>         at
> org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:121)
>         at org.apache.jk.core.MsgContext.action(MsgContext.java:301)
>         at org.apache.coyote.Response.action(Response.java:183)
>         at org.apache.coyote.Response.finish(Response.java:305)
>         at
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:195)
>         at
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
>         at
> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
>         at
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
>
>         at
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
>
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
>
>         at java.lang.Thread.run(Thread.java:595)
> ...
>
> I have successfully build my Apache using:
>
> configure --enable-modules='proxy proxy_ajp proxy_balancer'
> make
> make install
>
> I added to the original httpd.conf the followings configurations:
>
> ProxyRequests Off
>
> <Location /tpcw>
>     ProxyPass balancer://tomcatCluster/tpcw stickysession=JSESSIONID
> nofailover=On timeout=60
>     ProxyPassReverse balancer://tomcatCluster/tpcw
> </Location>
>
> <Proxy balancer://tomcatCluster>
>     BalancerMember ajp://compute-0-0:8009  route=tomcat1
> </Proxy>
>
> ServerLimit 75
> MaxClients 75
>
>
> In the Tomcat's server.xml, I'm using:
>
> <Connector port="8009" enableLookups="false" redirectPort="8443"
>        protocol="AJP/1.3" maxThreads="75"
>        minSpareThreads="50"
>        maxSpareThreads="50"/>
>
> <Engine name="Standalone" defaultHost="localhost" jvmRoute="tomcat1">
>
>
> After the error, both Apache and Tomcat still working fine, but the
> error makes my simulation's results unreliable. Note that, when I use
> the mod_jk instead of mod_proxy, no problems arise, not even with more
> than 50 emulated browsers. Is that some configuration problem?? Any
> suggestions?
>
> Thanks in advance,
> Ângelo Vimeney
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache, Tomcat and mod_proxy

Posted by Staf Wagemakers <st...@gmail.com>.
I'd try to add a retry to you ProxyPass (retry=60) also try to increase
MaxClients.

hope this helps...

-- 
Staf Wagemakers   - http://www.wagemakers.be

On Dec 10, 2007 9:24 PM, Ângelo Vimeney <av...@gmail.com> wrote:

> Hi,
>
> Thanks for your analysis, Karel. I'll try a larger timeout (60 seconds
> was used in my unsuccessfully last test). However, recently I put 300
> browsers to access Apache connect to Tomcat using mod_jk without any
> problem. Unfortunately, I suspect this could be a bug with
> mod_proxy...
>
> Ângelo
>
> On Dec 7, 2007 12:19 PM, Karel Kubat <ka...@e-tunity.com> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi,
> >
> > > At the Tomcat's catalina.out I found the following log:
> > > ...
> > > Dec 4, 2007 4:47:49 PM org.apache.catalina.startup.Catalina start
> > > INFO: Server startup in 3549 ms
> > > Dec 4, 2007 4:53:51 PM org.apache.jk.core.MsgContext action
> > > WARNING: Error sending end packet
> > > java.net.SocketException: Broken pipe
> >
> > This might indicate that your Tomcat server took too long to produce
> > its answer. By the time that it started writing its response, the
> > network connection was gone. This might be caused because your Apache
> > proxy "hung up" already.
> >
> > Check your Apache proxy for timeouts and choose a longer time. Then
> > re-test. If the problem occurs with a higher load than the 50 users
> > that you simulated, then you're on to something - in that case,
> > Tomcat would be the bottleneck, because the processing times increase
> > beyond the proxy's timeout.
> >
> > Hope this helps,
> >     --
> >     Karel Kubat / M +31 6 2956 4861 (+31 6 AWK 6 HUM 1)
> >     From the list of "Things You'll Never Hear A Southern Male Say":
> >     I'll take Shakespeare for 1000, Alex.
> >
>

Re: [users@httpd] Apache, Tomcat and mod_proxy

Posted by Ângelo Vimeney <av...@gmail.com>.
Hi,

Thanks for your analysis, Karel. I'll try a larger timeout (60 seconds
was used in my unsuccessfully last test). However, recently I put 300
browsers to access Apache connect to Tomcat using mod_jk without any
problem. Unfortunately, I suspect this could be a bug with
mod_proxy...

Ângelo

On Dec 7, 2007 12:19 PM, Karel Kubat <ka...@e-tunity.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> > At the Tomcat's catalina.out I found the following log:
> > ...
> > Dec 4, 2007 4:47:49 PM org.apache.catalina.startup.Catalina start
> > INFO: Server startup in 3549 ms
> > Dec 4, 2007 4:53:51 PM org.apache.jk.core.MsgContext action
> > WARNING: Error sending end packet
> > java.net.SocketException: Broken pipe
>
> This might indicate that your Tomcat server took too long to produce
> its answer. By the time that it started writing its response, the
> network connection was gone. This might be caused because your Apache
> proxy "hung up" already.
>
> Check your Apache proxy for timeouts and choose a longer time. Then
> re-test. If the problem occurs with a higher load than the 50 users
> that you simulated, then you're on to something - in that case,
> Tomcat would be the bottleneck, because the processing times increase
> beyond the proxy's timeout.
>
> Hope this helps,
>     --
>     Karel Kubat / M +31 6 2956 4861 (+31 6 AWK 6 HUM 1)
>     From the list of "Things You'll Never Hear A Southern Male Say":
>     I'll take Shakespeare for 1000, Alex.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (Darwin)
>
> iD8DBQFHWVZl23FrzRzybNURAugGAJ47GMRdnzmdjYgQZ/lMICEK5F+TwgCg+xod
> IFTBr0nkFYO/YUyVFhhHADs=
> =p9DS
> -----END PGP SIGNATURE-----
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache, Tomcat and mod_proxy

Posted by Karel Kubat <ka...@e-tunity.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

> At the Tomcat's catalina.out I found the following log:
> ...
> Dec 4, 2007 4:47:49 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 3549 ms
> Dec 4, 2007 4:53:51 PM org.apache.jk.core.MsgContext action
> WARNING: Error sending end packet
> java.net.SocketException: Broken pipe

This might indicate that your Tomcat server took too long to produce  
its answer. By the time that it started writing its response, the  
network connection was gone. This might be caused because your Apache  
proxy "hung up" already.

Check your Apache proxy for timeouts and choose a longer time. Then  
re-test. If the problem occurs with a higher load than the 50 users  
that you simulated, then you're on to something - in that case,  
Tomcat would be the bottleneck, because the processing times increase  
beyond the proxy's timeout.

Hope this helps,
    --
    Karel Kubat / M +31 6 2956 4861 (+31 6 AWK 6 HUM 1)
    From the list of "Things You'll Never Hear A Southern Male Say":
    I'll take Shakespeare for 1000, Alex.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFHWVZl23FrzRzybNURAugGAJ47GMRdnzmdjYgQZ/lMICEK5F+TwgCg+xod
IFTBr0nkFYO/YUyVFhhHADs=
=p9DS
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache, Tomcat and mod_proxy

Posted by GK...@symcor.com.
Hi,
Do you have a firewall between apache and Tomcat? Looks like the connection
gets closed before Tomcat is able to send the response.
 Try JkOptions DisableReuse, this worked for me.

Gabriel



                                                                           
             "Ângelo Vimeney"                                              
             <avimeney@gmail.c                                             
             om>                                                        To 
                                       users@httpd.apache.org              
             06/12/2007 01:27                                           cc 
             PM                                                            
                                                                   Subject 
                                       [users@httpd] Apache, Tomcat and    
             Please respond to         mod_proxy                           
             users@httpd.apach                                             
                   e.org                                                   
                                                                           
                                                                           
                                                                           
                                                                           




Hello everybody,

I'm experiencing problems using the Apache server as a proxy to my
Tomcat server and I will appreciate if somebody could help me. Please,
take my apologies for my poor English and long mail.

I'm using Apache version 2.2.6 installed on a dedicated HTTP server
machine (running Linux 2.6.9-34.EL). I'm using Tomcat version 6.0.14
installed on another dedicated server machine (running Linux
2.6.9-34.EL). I have also a remote browser emulator running on another
dedicated machine. The emulated browsers access an e-commerce site
deployed at the Tomcat server (I'm running the TPC-W benchmark).

When I simulate 25 browsers accessing Apache, everything works fine.
But when I increase this value to 50, after 5 minutes of simulation,
the following error message is logged at the Apache's error_log file:

[Tue Dec 04 16:47:17 2007] [notice] Apache/2.2.6 (Unix) configured --
resuming normal operations
[Tue Dec 04 16:53:08 2007] [error] (70007)The timeout specified has
expired: ajp_ilink_receive() can't receive header
[Tue Dec 04 16:53:08 2007] [error] ajp_read_header: ajp_ilink_receive
failed
[Tue Dec 04 16:53:08 2007] [error] (120006)APR does not understand
this error code: proxy: read response failed from 10.10.20.246:8009
(compute-0-0)
[Tue Dec 04 16:53:08 2007] [error] (70007)The timeout specified has
expired: ajp_ilink_receive() can't receive header
[Tue Dec 04 16:53:08 2007] [error] ajp_read_header: ajp_ilink_receive
failed
[Tue Dec 04 16:53:08 2007] [error] (120006)APR does not understand
this error code: proxy: read response failed from 10.10.20.246:8009
(compute-0-0)
...

At the Tomcat's catalina.out I found the following log:

...
Dec 4, 2007 4:47:49 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3549 ms
Dec 4, 2007 4:53:51 PM org.apache.jk.core.MsgContext action
WARNING: Error sending end packet
java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:531)
        at
org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:121)
        at org.apache.jk.core.MsgContext.action(MsgContext.java:301)
        at org.apache.coyote.Response.action(Response.java:183)
        at org.apache.coyote.Response.finish(Response.java:305)
        at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:195)
        at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
        at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)

        at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)

        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)

        at java.lang.Thread.run(Thread.java:595)
Dec 4, 2007 4:53:51 PM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Dec 4, 2007 4:53:56 PM org.apache.jk.core.MsgContext action
WARNING: Error sending end packet
java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:531)
        at
org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:121)
        at org.apache.jk.core.MsgContext.action(MsgContext.java:301)
        at org.apache.coyote.Response.action(Response.java:183)
        at org.apache.coyote.Response.finish(Response.java:305)
        at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:195)
        at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
        at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)

        at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)

        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)

        at java.lang.Thread.run(Thread.java:595)
...

I have successfully build my Apache using:

configure --enable-modules='proxy proxy_ajp proxy_balancer'
make
make install

I added to the original httpd.conf the followings configurations:

ProxyRequests Off

<Location /tpcw>
    ProxyPass balancer://tomcatCluster/tpcw stickysession=JSESSIONID
nofailover=On timeout=60
    ProxyPassReverse balancer://tomcatCluster/tpcw
</Location>

<Proxy balancer://tomcatCluster>
    BalancerMember ajp://compute-0-0:8009  route=tomcat1
</Proxy>

ServerLimit 75
MaxClients 75


In the Tomcat's server.xml, I'm using:

<Connector port="8009" enableLookups="false" redirectPort="8443"
       protocol="AJP/1.3" maxThreads="75"
       minSpareThreads="50"
       maxSpareThreads="50"/>

<Engine name="Standalone" defaultHost="localhost" jvmRoute="tomcat1">


After the error, both Apache and Tomcat still working fine, but the
error makes my simulation's results unreliable. Note that, when I use
the mod_jk instead of mod_proxy, no problems arise, not even with more
than 50 emulated browsers. Is that some configuration problem?? Any
suggestions?

Thanks in advance,
Ângelo Vimeney

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org