You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Patrick Fong <pf...@unimelb.edu.au> on 2006/11/07 23:48:32 UTC

Need setting up Tomcat with Apache web-server

Hi

I am trying to setup Tomcat with Apache web-server. I know this is a 
common problem, but I've searched the mailing lists database and have 
not found a solution to my problem. I have a feeling this is a simple 
problem and not opening a vital port.

I'm running Apache2 (v2.0.59) with Tomcat (v5.5.17). Both Apache2 and 
Tomcat have been installed as services on my WinXP machine. I am looking 
for an open-source (free) alternative to Resin Caucho.

After setting up and trying to run JSPs with Tomcat, I get a 503 error 
with the following error printed in the log files -

[6124:5512] [info]  jk_ajp_common.c (941): (testWorker) Tomcat has 
forced a connection close for socket 824
[6124:5512] [error] jk_ajp_common.c (1536): (testWorker) Tomcat is down 
or refused connection. No response has been sent to the client (yet)

I've included the changes I've made the specific configuration files
1) *Http.conf*

LoadModule jk_module modules/mod_jk.so

<IfModule mod_jk.c>
JkWorkersFile "C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/conf/workers.properties"
JkLogFile c:/logs/tomcat/tomcat.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
JkRequestLogFormat "%w %V %T"

Alias /jsp-examples "C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/webapps/jsp-examples/"
 <Directory "C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/webapps/jsp-examples/">
        Options Indexes +FollowSymLinks
        AllowOverride None
        Allow from all
 </Directory>
JkMount /jsp-examples/servlet/* testWorker
JkMount /jsp-examples/*.jsp testWorker
<Location "/jsp-examples/WEB-INF/">
    AllowOverride None
    deny from all
</Location>
</IfModule>
----------------------------------------------------------------------------------------------------------------------------------------  

2) *Worker.properties*
<IfModule mod_jk.c>
JkWorkersFile "C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/conf/workers.properties"
JkLogFile c:/logs/tomcat/tomcat.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
JkRequestLogFormat "%w %V %T"

Alias /jsp-examples "C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/webapps/jsp-examples/"
 <Directory "C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/webapps/jsp-examples/">
        Options Indexes +FollowSymLinks
        AllowOverride None
        Allow from all
 </Directory>
JkMount /jsp-examples/servlet/* testWorker
JkMount /jsp-examples/*.jsp testWorker
<Location "/jsp-examples/WEB-INF/">
    AllowOverride None
    deny from all
</Location>
</IfModule>
----------------------------------------------------------------------------------------------------------------------------------------  

3) *server.xml *- I've changed the port for non-SSL HTTP/1.1 Connector 
to 8081 because port 8080 is being used by an existing application. 
HTTP/1.0 is not created.

    <!-- Define a non-SSL HTTP/1.1 Connector on port 8081(From 8080) -->
    <Connector port="8081" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />

    <Connector port="8009"
               enableLookups="false" redirectPort="8443" 
protocol="AJP/1.3" />

    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector" port="8009"
        minProcessors="5" maxProcessors="75" acceptCount="10" debug="0"/>

     <Context path="/jsp-examples" docBase="C;/Program Files/Apache 
Group/apache-tomcat-5.5.17/webapps/jsp-examples/" debug="0"/>



Any ideas?

Cheers
Patrick

Re: Need setting up Tomcat with Apache web-server

Posted by brian bay <br...@gmail.com>.
This looks suspiciously not right...

   <Connector port="8009"
> >               enableLookups="false" redirectPort="8443"
> > protocol="AJP/1.3" />
> >
> >    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
> > port="8009"
> >        minProcessors="5" maxProcessors="75" acceptCount="10" debug="0"/>
> >
>
Also, your on windows xp in production??

If you want an open source solution --  linux - apache - tomcat

I've found linux to be far more pleasant when running tomcat..



On 11/8/06, Rainer Jung <ra...@kippdata.de> wrote:
>
> You made a mistake when trying to post your workers.properties. You
> posted the httpd.conf twice. Please post worker.properties.
>
> The error situation looks strange. I would like to know, if you can
> successfully send the same request to tomcats http conector. Even if you
> don't want to use that connector in the end, its good to check your
> installation and basic functionality with that one, before adding more
> features and complexity with apache/mod_jk.
>
> Regards,
>
> Rainer
>
> Patrick Fong schrieb:
> > Hi
> >
> > I am trying to setup Tomcat with Apache web-server. I know this is a
> > common problem, but I've searched the mailing lists database and have
> > not found a solution to my problem. I have a feeling this is a simple
> > problem and not opening a vital port.
> >
> > I'm running Apache2 (v2.0.59) with Tomcat (v5.5.17). Both Apache2 and
> > Tomcat have been installed as services on my WinXP machine. I am looking
> > for an open-source (free) alternative to Resin Caucho.
> >
> > After setting up and trying to run JSPs with Tomcat, I get a 503 error
> > with the following error printed in the log files -
> >
> > [6124:5512] [info]  jk_ajp_common.c (941): (testWorker) Tomcat has
> > forced a connection close for socket 824
> > [6124:5512] [error] jk_ajp_common.c (1536): (testWorker) Tomcat is down
> > or refused connection. No response has been sent to the client (yet)
> >
> > I've included the changes I've made the specific configuration files
> > 1) *Http.conf*
> >
> > LoadModule jk_module modules/mod_jk.so
> >
> > <IfModule mod_jk.c>
> > JkWorkersFile "C:/Program Files/Apache
> > Group/apache-tomcat-5.5.17/conf/workers.properties"
> > JkLogFile c:/logs/tomcat/tomcat.log
> > JkLogLevel info
> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> > JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
> > JkRequestLogFormat "%w %V %T"
> >
> > Alias /jsp-examples "C:/Program Files/Apache
> > Group/apache-tomcat-5.5.17/webapps/jsp-examples/"
> > <Directory "C:/Program Files/Apache
> > Group/apache-tomcat-5.5.17/webapps/jsp-examples/">
> >        Options Indexes +FollowSymLinks
> >        AllowOverride None
> >        Allow from all
> > </Directory>
> > JkMount /jsp-examples/servlet/* testWorker
> > JkMount /jsp-examples/*.jsp testWorker
> > <Location "/jsp-examples/WEB-INF/">
> >    AllowOverride None
> >    deny from all
> > </Location>
> > </IfModule>
> >
> ----------------------------------------------------------------------------------------------------------------------------------------
> >
> > 2) *Worker.properties*
> > <IfModule mod_jk.c>
> > JkWorkersFile "C:/Program Files/Apache
> > Group/apache-tomcat-5.5.17/conf/workers.properties"
> > JkLogFile c:/logs/tomcat/tomcat.log
> > JkLogLevel info
> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> > JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
> > JkRequestLogFormat "%w %V %T"
> >
> > Alias /jsp-examples "C:/Program Files/Apache
> > Group/apache-tomcat-5.5.17/webapps/jsp-examples/"
> > <Directory "C:/Program Files/Apache
> > Group/apache-tomcat-5.5.17/webapps/jsp-examples/">
> >        Options Indexes +FollowSymLinks
> >        AllowOverride None
> >        Allow from all
> > </Directory>
> > JkMount /jsp-examples/servlet/* testWorker
> > JkMount /jsp-examples/*.jsp testWorker
> > <Location "/jsp-examples/WEB-INF/">
> >    AllowOverride None
> >    deny from all
> > </Location>
> > </IfModule>
> >
> ----------------------------------------------------------------------------------------------------------------------------------------
> >
> > 3) *server.xml *- I've changed the port for non-SSL HTTP/1.1 Connector
> > to 8081 because port 8080 is being used by an existing application.
> > HTTP/1.0 is not created.
> >
> >    <!-- Define a non-SSL HTTP/1.1 Connector on port 8081(From 8080) -->
> >    <Connector port="8081" maxHttpHeaderSize="8192"
> >               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
> >               enableLookups="false" redirectPort="8443"
> acceptCount="100"
> >               connectionTimeout="20000" disableUploadTimeout="true" />
> >
> >    <Connector port="8009"
> >               enableLookups="false" redirectPort="8443"
> > protocol="AJP/1.3" />
> >
> >    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
> port="8009"
> >        minProcessors="5" maxProcessors="75" acceptCount="10" debug="0"/>
> >
> >     <Context path="/jsp-examples" docBase="C;/Program Files/Apache
> > Group/apache-tomcat-5.5.17/webapps/jsp-examples/" debug="0"/>
> >
> >
> >
> > Any ideas?
> >
> > Cheers
> > Patrick
> >
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Need setting up Tomcat with Apache web-server

Posted by Rainer Jung <ra...@kippdata.de>.
You made a mistake when trying to post your workers.properties. You
posted the httpd.conf twice. Please post worker.properties.

The error situation looks strange. I would like to know, if you can
successfully send the same request to tomcats http conector. Even if you
don't want to use that connector in the end, its good to check your
installation and basic functionality with that one, before adding more
features and complexity with apache/mod_jk.

Regards,

Rainer

Patrick Fong schrieb:
> Hi
> 
> I am trying to setup Tomcat with Apache web-server. I know this is a
> common problem, but I've searched the mailing lists database and have
> not found a solution to my problem. I have a feeling this is a simple
> problem and not opening a vital port.
> 
> I'm running Apache2 (v2.0.59) with Tomcat (v5.5.17). Both Apache2 and
> Tomcat have been installed as services on my WinXP machine. I am looking
> for an open-source (free) alternative to Resin Caucho.
> 
> After setting up and trying to run JSPs with Tomcat, I get a 503 error
> with the following error printed in the log files -
> 
> [6124:5512] [info]  jk_ajp_common.c (941): (testWorker) Tomcat has
> forced a connection close for socket 824
> [6124:5512] [error] jk_ajp_common.c (1536): (testWorker) Tomcat is down
> or refused connection. No response has been sent to the client (yet)
> 
> I've included the changes I've made the specific configuration files
> 1) *Http.conf*
> 
> LoadModule jk_module modules/mod_jk.so
> 
> <IfModule mod_jk.c>
> JkWorkersFile "C:/Program Files/Apache
> Group/apache-tomcat-5.5.17/conf/workers.properties"
> JkLogFile c:/logs/tomcat/tomcat.log
> JkLogLevel info
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
> JkRequestLogFormat "%w %V %T"
> 
> Alias /jsp-examples "C:/Program Files/Apache
> Group/apache-tomcat-5.5.17/webapps/jsp-examples/"
> <Directory "C:/Program Files/Apache
> Group/apache-tomcat-5.5.17/webapps/jsp-examples/">
>        Options Indexes +FollowSymLinks
>        AllowOverride None
>        Allow from all
> </Directory>
> JkMount /jsp-examples/servlet/* testWorker
> JkMount /jsp-examples/*.jsp testWorker
> <Location "/jsp-examples/WEB-INF/">
>    AllowOverride None
>    deny from all
> </Location>
> </IfModule>
> ---------------------------------------------------------------------------------------------------------------------------------------- 
> 
> 2) *Worker.properties*
> <IfModule mod_jk.c>
> JkWorkersFile "C:/Program Files/Apache
> Group/apache-tomcat-5.5.17/conf/workers.properties"
> JkLogFile c:/logs/tomcat/tomcat.log
> JkLogLevel info
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
> JkRequestLogFormat "%w %V %T"
> 
> Alias /jsp-examples "C:/Program Files/Apache
> Group/apache-tomcat-5.5.17/webapps/jsp-examples/"
> <Directory "C:/Program Files/Apache
> Group/apache-tomcat-5.5.17/webapps/jsp-examples/">
>        Options Indexes +FollowSymLinks
>        AllowOverride None
>        Allow from all
> </Directory>
> JkMount /jsp-examples/servlet/* testWorker
> JkMount /jsp-examples/*.jsp testWorker
> <Location "/jsp-examples/WEB-INF/">
>    AllowOverride None
>    deny from all
> </Location>
> </IfModule>
> ---------------------------------------------------------------------------------------------------------------------------------------- 
> 
> 3) *server.xml *- I've changed the port for non-SSL HTTP/1.1 Connector
> to 8081 because port 8080 is being used by an existing application.
> HTTP/1.0 is not created.
> 
>    <!-- Define a non-SSL HTTP/1.1 Connector on port 8081(From 8080) -->
>    <Connector port="8081" maxHttpHeaderSize="8192"
>               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
>               enableLookups="false" redirectPort="8443" acceptCount="100"
>               connectionTimeout="20000" disableUploadTimeout="true" />
> 
>    <Connector port="8009"
>               enableLookups="false" redirectPort="8443"
> protocol="AJP/1.3" />
> 
>    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector" port="8009"
>        minProcessors="5" maxProcessors="75" acceptCount="10" debug="0"/>
> 
>     <Context path="/jsp-examples" docBase="C;/Program Files/Apache
> Group/apache-tomcat-5.5.17/webapps/jsp-examples/" debug="0"/>
> 
> 
> 
> Any ideas?
> 
> Cheers
> Patrick
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Need setting up Tomcat with Apache web-server

Posted by Patrick Fong <pf...@unimelb.edu.au>.
Yeah - I can't. Apache is currently used in the production server. Resin 
is the current Servlet Engine. An open source alternative is best.

Caldarale, Charles R wrote:
>> From: Patrick Fong [mailto:pfong@unimelb.edu.au] 
>> Subject: Need setting up Tomcat with Apache web-server
>>
>> Any ideas?
>>     
>
> Just one, but you may not like it: simplify your life by getting rid of
> httpd, unless you have a dire need for it.  Configure Tomcat to use
> ports 80 and 443 and let it serve your static content as well.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>   

RE: Need setting up Tomcat with Apache web-server

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Patrick Fong [mailto:pfong@unimelb.edu.au] 
> Subject: Need setting up Tomcat with Apache web-server
> 
> Any ideas?

Just one, but you may not like it: simplify your life by getting rid of
httpd, unless you have a dire need for it.  Configure Tomcat to use
ports 80 and 443 and let it serve your static content as well.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org