Hi,

After changing the timeout to 10 seconds it _seems_ to work. It was at cero so it could have run out of connections.

        It has been 6 hours of uptime. Much better.

        thank you for everything,

                Borja






On Mon, 19 Sep 2005, Yassine ELassad wrote:

here it is my one and  how i configured it on 5.0.28:

====
what should be done:
------------------------------
on your  Webserver (Apache):
there should be some Namensbasd Virtual Host
Websites, which should runs some Java Servlets
Apache have to foreward these request where they belon to (TC)


Tomcat Configuration:
---------------------
after installing jakarta-tomcat and apache2-jakarta-tomcat-connectors.

you should look for your tomcat_base/conf/server.xml
                                      ../jk2.properties

i eliminated every thing which is not needed and there is only
the server and the service which are needed to connect to apache

------------------------------ start ----------------------------------
<Server port="8005" shutdown="SHUTDOWN" debug="0">
       <Service name="Tomcat-Apache">
               <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
               <Connector className="org.apache.coyote.tomcat5.CoyoteConnector"
                                               port="8009"
                                               minProcessors="5"
                                               maxProcessors="75"
                                               enableLookups="true"
                                               redirectPort="8443"
                                               acceptCount="10"
                                               debug="0"
                                               connectionTimeout="20000"
                                               useURIValidationHack="false"
                                               
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
               <!-- While starting off, leave debugging high for help in diagn. 
-->
               <!-- When done, turn it back to 0 -->
               <Engine name="Apache" defaultHost="www.yourhost.foo" debug="9">
                       <Logger className="org.apache.catalina.logger.FileLogger"
                                               prefix="apache_log."
                                               suffix=".txt"
                                               timestamp="true"/>
                       <!-- Access log processes all requests for this virtual 
host. -->
                       <!-- Leave pattern="combined" for the most comprehensive 
logging -->
                       <Valve 
className="org.apache.catalina.valves.AccessLogValve"
                                               directory="logs"
                                               prefix="eddie_access_log."
                                               suffix=".txt"
                                               pattern="combined"
                                               resolveHosts="false"/>
                       <Host name="www.yourhost2.foo" debug="0"
                                       
appBase="/srv/www/htdocs/manfred/www.yourhost2.foo"
                                       unpackWARs="true" autoDeploy="true">
                               <Context path="" docBase="" debug="0"/>
                               <Valve 
className="org.apache.catalina.valves.AccessLogValve"
                                                       directory="logs"  
prefix="tomcat-yourhost2-foo_access_log."
                                                       suffix=".txt" pattern="combined" 
resolveHosts="false"/>
                       </Host>
                       <Host name="www.yourhost.foo" debug="0"
                                       appBase="/srv/www/htdocs/manfred/"
                                       unpackWARs="true" autoDeploy="true">
                               <Context path="" docBase="" debug="0"/>
                               <Valve 
className="org.apache.catalina.valves.AccessLogValve"
                                                       directory="logs"  
prefix="tomcat-yourhost-foo_access_log."
                                                       suffix=".txt" pattern="combined" 
resolveHosts="false"/>
                       </Host>
               </Engine>
       </Service>
</Server>
------------------------------- end ----------------------------------
jk2.properties:
-------------------------
uncoment these 2 lines
------------------------------ start ----------------------------------
handler.list=channelSocket,request
channelSocket.port=8009
------------------------------- ende ----------------------------------
TC config is now done

configuration of Apache:
------------------------
I assume you already installed jk on apache and its working

now look for your default  /etc/apache2/workers2.properties:
------------------------------ start ----------------------------------
# only at beginnin. In production uncomment it out
[logger.apache2]
level=ERROR
[shm]
file=/var/log/apache2/shm.file
size=1048576
# Example socket channel, override port and host.
[channel.socket:127.0.0.1:8009]
port=8009
host=127.0.0.1
# define the worker
[ajp13:127.0.0.1:8009]
channel=channel.socket:127.0.0.1:8009
# Uri mapping in the vhost configs
------------------------------- ende ----------------------------------
To avoid IPV6 comflict use  127.0.0.1 instead of localhost


now you can start your URI mapping here is an examples which mapse servlet  to 
www.yourhost.foo
------------------------------ start ----------------------------------
[uri:www.yourhost.foo/servlet/*]
worker=ajp13:127.0.0.1:8009
------------------------------- ende ----------------------------------
now you should bind your workers2.properties to apache
create a small config
/etc/apache2/conf.d/mod_jk2.conf
and include it in apache.conf or httpd.conf

------------------------------ start ----------------------------------
#
# mod_jk2
#
<IfModule mod_jk2.c>
   JkSet config:file /etc/apache2/workers2.properties
</IfModule>
------------------------------- ende ----------------------------------
<VirtualHost yourhost.foo>
   ServerAdmin [EMAIL PROTECTED]
   ServerName www.yourhost.foo
   # needed for named virtual hosts
   UseCanonicalName On
   # DocumentRoot: The directory out of which you will serve your
   # documents. By default, all requests are taken from this directory,
   # but symbolic links and aliases may be used to point to other
   # locations.
   DocumentRoot /srv/www/htdocs/
   # Give all /servlet/* URLs to Tomcat
   <Location "/servlet/*">
       JkUriSet worker ajp13:127.0.0.1:8009
   </Location>
</VirtualHost>
------------------------------- ende ----------------------------------
----------------- start www.yourhost2.foo.conf --------------------
#
# www.knightsoft-net.mt:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost yourhost2.foo>
   ServerAdmin [EMAIL PROTECTED]
   ServerName www.yourhost2.foo
   # needed for named virtual hosts
   UseCanonicalName On
   # DocumentRoot: The directory out of which you will serve your
   # documents. By default, all requests are taken from this directory,
   # but symbolic links and aliases may be used to point to other
   # locations.
   DocumentRoot /srv/www/htdocs/manfred/www.yourhost2.foo/
   <Directory /srv/www/htdocs/manfred/www.yourhost2.foo/>
     Options +FollowSymLinks +Multiviews
     AllowOverride All
   </Directory>
   # Give all /servlet/* URLs to Tomcat
   <Location "/servlet/*">
       JkUriSet worker ajp13:127.0.0.1:8009
   </Location>
</VirtualHost>
------------------------------- ende ----------------------------------
restart apache and have fun :) i hope this helps if not drop a mail



====


-------- directBOX Reply ---------------
From: Borja Bravo Alférez ([EMAIL PROTECTED])
To: TomcatUsersList ([email protected])
Date: 19.09.2005 12:57:24

On Mon, 19 Sep 2005, Yassine ELassad wrote:

hi,

i think its just apache trying to connect to tomcat using JK while the
tomcat not confiigured to answer this request ?

since you execute your jsp on (8080)

i hope i understands your matter if not please try to be clearer about
it if you need help with connnecting apache <-mod_jk->tomcat i can
provides you some working configs TC5.x

regards Yassine



Thank you for your effort. I am sure there can be some configuration
issues. But I do not understand why it can connect during hours and
suddenly it can't. ( persistent connections? running out of something?
Making wild hypothesis is not too hard )

Anyway, Any kind of server.xml examples of connectors will be really
apreciated although I will prefer a 4.1 configuration.

My jk connector config is:

    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               acceptCount="300"
               bufferSize="2048"
               connectionTimeout="10000"
               debug="7"
               disableUploadTimeout="false"
               enableLookups="true"
               maxKeepAliveRequests="1000"
               maxProcessors="300"
               minProcessors="30"
               port="8009"
                protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
               proxyPort="0"
               redirectPort="8443"
               scheme="http"
               secure="false"
               tcpNoDelay="true"
               useURIValidationHack="false">

              <Factory 
className="org.apache.catalina.net.DefaultServerSocketFactory"/>
    </Connector>

( I am making changes quite often looking a stable configuration )

Regards,

        Borja

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__________________________________________________
Verpassen Sie keine eBay-Auktion und bieten Sie bequem
und schnell über das Telefon mit http://www.telefonbieten.de

Ihre eMails auf dem Handy lesen - ohne Zeitverlust - 24h/Tag
eMail, FAX, SMS, VoiceMail mit http://www.directbox.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




                                Borja Bravo Alférez

                                Representante de alumnos en el claustro
                                [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to