RE: Apache2/Tomcat55/mod_jk and Sticky Sessions

2005-07-19 Thread Dave Morrow
Thanks. That's actually the document I used as a reference.  I actually
fixed the issue.  The document references an Engine named Standalone
in the server.xml. With tomcat 5.5 I had to change the engine name is
Catalina 


David A. Morrow
Technical Systems Lead
Autodata Solutions Company
[EMAIL PROTECTED]
http://www.autodata.net
Tel: (519) 951-6079
Fax: (519) 451-6615 

 Poor planning on your part does not necessarily constitute an
emergency on my part! 

This message has originated from Autodata Solutions. The attached
material is the Confidential and Proprietary Information of Autodata
Solutions. This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please delete
this message and notify the Autodata system administrator at
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

-Original Message-
From: Robert F Hall [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 16, 2005 7:26 PM
To: Tomcat Users List
Subject: Re: Apache2/Tomcat55/mod_jk and Sticky Sessions

Dave,

Try a Google search for: Apache httpd sticky sessions.
One result that looks particularly useful:
http://raibledesigns.com/tomcat/

-Robert

Dave Morrow wrote:

Hi all.  I am attempting to setup a loadbalanced set of Tomcat5.5
servers behind an Apache2 server using mod_jk.  The application
developers have told me that the app will require sticky sessions.  I
have it all configured and working with the exception of the sticky
sessions.  I think my workers.properties is correct so there must be
something I am missing.  For testing, I created a JSP in the ROOT
application of each of the Tomcat servers which simply displays the
server name and SessionID.  The loadbalancing is working, but instead of
maintaining a session, it's flip-flopping between servers and thus
changing session ID's.

My workers.properties contains (note the localhost is in the opposite 
place on the other server);

worker.list= qatomcat1, qatomcat2, loadbalancer #
worker.qatomcat1.port=8009
worker.qatomcat1.host=qahost1
worker.qatomcat1.type=ajp13
worker.qatomcat1.lbfactor=100
worker.qatomcat1.local=0
#
worker.qatomcat2.port=8009
worker.qatomcat2.host=localhost
worker.qatomcat2.type=ajp13
worker.qatomcat2.lbfactor=100
worker.qatomcat2.local=1


David A. Morrow
Technical Systems Lead
Autodata Solutions Company
[EMAIL PROTECTED]
http://www.autodata.net
Tel: (519) 951-6079
Fax: (519) 451-6615

 Poor planning on your part does not necessarily constitute an 
emergency on my part! 

This message has originated from Autodata Solutions. The attached 
material is the Confidential and Proprietary Information of Autodata 
Solutions. This email and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom they are addressed. If you have received this email in 
error please delete this message and notify the Autodata system 
administrator at [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]


  



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


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



Re: Apache2/Tomcat55/mod_jk and Sticky Sessions

2005-07-16 Thread Robert F Hall

Dave,

Try a Google search for: Apache httpd sticky sessions.
One result that looks particularly useful: http://raibledesigns.com/tomcat/

-Robert

Dave Morrow wrote:


Hi all.  I am attempting to setup a loadbalanced set of Tomcat5.5 servers 
behind an Apache2 server using mod_jk.  The application developers have told me 
that the app will require sticky sessions.  I have it all configured and 
working with the exception of the sticky sessions.  I think my 
workers.properties is correct so there must be something I am missing.  For 
testing, I created a JSP in the ROOT application of each of the Tomcat servers 
which simply displays the server name and SessionID.  The loadbalancing is 
working, but instead of maintaining a session, it's flip-flopping between 
servers and thus changing session ID's.

My workers.properties contains (note the localhost is in the opposite place on 
the other server);

worker.list= qatomcat1, qatomcat2, loadbalancer #
worker.qatomcat1.port=8009
worker.qatomcat1.host=qahost1
worker.qatomcat1.type=ajp13
worker.qatomcat1.lbfactor=100
worker.qatomcat1.local=0
#
worker.qatomcat2.port=8009
worker.qatomcat2.host=localhost
worker.qatomcat2.type=ajp13
worker.qatomcat2.lbfactor=100
worker.qatomcat2.local=1


David A. Morrow
Technical Systems Lead
Autodata Solutions Company
[EMAIL PROTECTED]
http://www.autodata.net
Tel: (519) 951-6079
Fax: (519) 451-6615 


 Poor planning on your part does not necessarily constitute an emergency on my 
part! 

This message has originated from Autodata Solutions. The attached material is the 
Confidential and Proprietary Information of Autodata Solutions. This email and any 
files transmitted with it are confidential and intended solely for the use of the 
individual or entity to whom they are addressed. If you have received this email in 
error please delete this message and notify the Autodata system administrator at 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]


 




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



Re: Apache2+Tomcat5.5+mod_jk loadbalancing: Sticky sessions not working

2005-05-12 Thread Mladen Turk
Hi,
What is your session timeout on tomcat?
It might be that the session simply times out,
so the next tomcat is elected from the load
balancer.
Regards,
Mladen.
Edlira Kumbarÿe7e wrote:
Hello,
It
doesn't seem to work. Each time I refresh the page, it
get served from the same tomcat a couple of times,
then it gets served from the other tomcat, stays on
that tomcat a couple of refresh hits and then swiches
again. I can't see a pattern or figure out why this is
happening.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Apache2+Tomcat5.5+mod_jk loadbalancing: Sticky sessions not working

2005-05-12 Thread Kumbarÿffffffffffffffffe7e
Thank you for your reply.
I don't think it's the session timeout on tomcat
because, as I said in my previous message,I don't see
a pattern in the time pages are served from the same
tomcat. In other words, a page gets served from
tomcat1 maybe 4 times (each page refresh), then 2
times from tomcat2, then 3 times from tomcat1, without
a specific pattern.
Here's my tomcat1 server.xml file, if you can take a
look at it:
!-- Example Server Configuration File --
!-- Note that component elements are nested
corresponding to their
 parent-child relationships with each other --

!-- A Server is a singleton element that represents
the entire JVM,
 which may contain one or more Service
instances.  The Server
 listens for a shutdown command on the indicated
port.

 Note:  A Server is not itself a Container, so
you may not
 define subcomponents such as Valves or
Loggers at this level.
 --

Server port=8005 shutdown=SHUTDOWN
!-- Listener
className=org.apache.jk.config.ApacheConfig
modJk=C:/Program Files/Apache
Group/Apache2/modules/mod_jk.so /--

  !-- Comment these entries out to disable JMX MBeans
support used for the 
   administration web application --
  Listener
className=org.apache.catalina.mbeans.ServerLifecycleListener
/
  Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
/
  Listener
className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/

  !-- Global JNDI resources --
  GlobalNamingResources

!-- Test entry for demonstration purposes --
Environment name=simpleValue
type=java.lang.Integer value=30/

!-- Editable user database that can also be used
by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated
and saved
  
factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /

  /GlobalNamingResources

  !-- A Service is a collection of one or more
Connectors that share
   a single Container (and therefore the web
applications visible
   within that Container).  Normally, that
Container is an Engine,
   but this is not required.

   Note:  A Service is not itself a Container,
so you may not
   define subcomponents such as Valves or
Loggers at this level.
   --

  !-- Define the Tomcat Stand-Alone Service --
  Service name=Catalina

!-- A Connector represents an endpoint by which
requests are received
 and responses are returned.  Each Connector
passes requests on to the
 associated Container (normally an Engine)
for processing.

 By default, a non-SSL HTTP/1.1 Connector is
established on port 8080.
 You can also enable an SSL HTTP/1.1 Connector
on port 8443 by
 following the instructions below and
uncommenting the second Connector
 entry.  SSL support requires the following
steps (see the SSL Config
 HOWTO in the Tomcat 5 documentation bundle
for more detailed
 instructions):
 * If your JDK version 1.3 or prior, download
and install JSSE 1.0.2 or
   later, and put the JAR files into
$JAVA_HOME/jre/lib/ext.
 * Execute:
 %JAVA_HOME%\bin\keytool -genkey -alias
tomcat -keyalg RSA (Windows)
 $JAVA_HOME/bin/keytool -genkey -alias
tomcat -keyalg RSA  (Unix)
   with a password value of changeit for
both the certificate and
   the keystore itself.

 By default, DNS lookups are enabled when a
web application calls
 request.getRemoteHost().  This can have an
adverse impact on
 performance, so you can disable it by setting
the
 enableLookups attribute to false.  When
DNS lookups are disabled,
 request.getRemoteHost() will return the
String version of the
 IP address of the remote client.
--

!-- Define a non-SSL HTTP/1.1 Connector on port
8080 --

Connector port=8080 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25
maxSpareThreads=75
   enableLookups=false
redirectPort=8443 acceptCount=100
   connectionTimeout=2
disableUploadTimeout=true /

!-- Note : To disable connection timeouts, set
connectionTimeout value
 to 0 --

!-- Note : To use gzip compression you could set the
following properties :

   compression=on 
   compressionMinSize=2048 
   noCompressionUserAgents=gozilla, traviata 
   compressableMimeType=text/html,text/xml
--

!-- Define a SSL HTTP/1.1 Connector on port 8443
--
!--
Connector port=8443 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25
maxSpareThreads=75
   enableLookups=false
disableUploadTimeout=true
   acceptCount=100 scheme=https
secure=true
   

Re: Apache2+Tomcat5.5+mod_jk loadbalancing: Sticky sessions not working

2005-05-12 Thread Mladen Turk
Edlira Kumbarÿe7e wrote:
I don't think it's the session timeout on tomcat
because, as I said in my previous message,I don't see
a pattern in the time pages are served from the same
tomcat. In other words, a page gets served from
tomcat1 maybe 4 times (each page refresh), then 2
times from tomcat2, then 3 times from tomcat1, without
a specific pattern.
Really have no idea.
What version of mod_jk you are using?
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Apache2+Tomcat5.5+mod_jk loadbalancing: Sticky sessions not working

2005-05-12 Thread Kumbarÿffffffffffffffffe7e
I'm using the binary version of mod_jk.
Apache v2.0.54
Tomcat v5.5
JK v1.2.12

Thank you,
Edlira
--- Mladen Turk [EMAIL PROTECTED] wrote:
 Edlira Kumbarÿe7e wrote:
  I don't think it's the session timeout on tomcat
  because, as I said in my previous message,I don't
 see
  a pattern in the time pages are served from the
 same
  tomcat. In other words, a page gets served from
  tomcat1 maybe 4 times (each page refresh), then 2
  times from tomcat2, then 3 times from tomcat1,
 without
  a specific pattern.
 
 Really have no idea.
 What version of mod_jk you are using?
 
 Regards,
 Mladen.
 

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

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



RE: apache2+tomcat5.0.19+mod_jk in-process

2004-05-27 Thread Dale, Matt

I think the problem is entirely on non-windows platforms. JVM autodetection doesnt 
even work unless on windows.

Ta
Matt

-Original Message-
From: Peter Rossbach [mailto:[EMAIL PROTECTED]
Sent: 26 May 2004 20:16
To: Tomcat Users List
Subject: Re: apache2+tomcat5.0.19+mod_jk in-process



Thist is my working example

a)  I used JVM autodetection
b) configured the jni channel
c)  add tools.jar for compiling jsp's

[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess

[vm:]
info=Parameters used to load a JVM in the server process
#OPT=-Xdebug -Xnoagent 
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
OPT=-Xmx32m
OPT=-Xms32m
OPT=-Djava.home=D:/java/j2sdk1.4.2_03
OPT=-Dcatalina.home=D:/tomcat/develop/tomcat5/jakarta-tomcat-5/build
OPT=-Djava.class.path=D:/java/j2sdk1.4.2_03/lib/tools.jar;D:/tomcat/develop/tomcat5/jakarta-tomcat-5/build/server/lib/tomcat-jni.jar;D:/tomcat/develop/tomcat5/jakarta-tomcat-5/bin/jmx.jar;D:/tomcat/develop/tomcat5/jakarta-tomcat-5/build/bin/bootstrap.jar
disabled=0

[worker.jni:onStartup]
info=Command to be executed by the VM on startup. This one will start 
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=startd
disabled=0
stdout=${serverRoot}/logs/stdout.log
stderr=${serverRoot}/logs/stderr.log

[worker.jni:onShutdown]
info=Command to be executed by the VM on shutdown. This one will stop 
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=stopd
disabled=0


I hope this help.

regards
peter

Timothy Suh schrieb:

I am now using Tomcat5.0.25 as you suggested but still getting same 
error. I don't think Apache is even getting to the part where it starts 
calling Tomcat (TomcatStarter) because the same error is generated when 
I completely remove Tomcat5.0.25 binary distribution from my machine.
I am thinking the solution is in my workers2.properties file but not 
sure what it is.

Here is my configuration:

$APACHE_HOME/modules
   mod_jk2.so (built from source)
   linjkjni.so (built from source)
$APACHE_HOME/conf
   workers2.properties
$TOMCAT_HOME/conf
   jk2.properties

workers2.properties contain (some unrelated properties omitted)

[uriMap:]

[shm:]
disabled=1

[channel.jni:jni]
disabled=0

[status:]

[vm:]
JVM=/j2sdk-1.4.2_03/jre/lib/i386/server/libjvm.so
OPT=-server
OPT=-Dtomcat.home=TOMCATHOME
OPT=-Dcatalina.home=TOMCATHOME
OPT=-Xnoclassgc
OPT=-Xcheck:jni
OPT=-verbose
classpath=TOMCATHOME/bin/bootstrap.jar
classpath=TOMCATHOME/common/lib/jmx.jar
classpath=TOMCATHOME/server/lib/commons-modeler.jar
classpath=TOMCATHOME/server/lib/tomcat-jni.jar
classpath=TOMCATHOME/common/lib/servlet-api.jar
OPT=-Xrs

[worker.jni:onStartup]
class=org/apache/jk/apr/TomcatStarter
ARG=startd
disabled=0

[worker.jni:onShutdown]
class=org/apache/jk/apr/TomcatStarter
ARG=stopd
disabled=0

Peter Rossbach wrote on 5/26/2004, 12:27 PM:

  Hello Timothy,
 
  the JNI integration works only with Tomcat Release greater 5.0.20
  and the commands changed to (startd and stopd)
 
  used the coming Tomcat 5.0.25 it is very stable.
  (Must add jmx.jar to your classpath)
 


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



  




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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent Ltd. You must take full responsibility for virus checking this email and 
any attachments.
Please note that the content of this email or any of its attachments may contain data 
that falls within the scope of the Data Protection Acts and that you must ensure that 
any handling or processing of such data by you is fully compliant with the terms and 
provisions of the Data Protection Act 1984 and 1998.


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

Re: apache2+tomcat5.0.19+mod_jk in-process

2004-05-26 Thread Peter Rossbach
Hello Timothy,
the JNI integration works only with Tomcat Release greater 5.0.20
and the commands changed to (startd and stopd)
used the coming Tomcat 5.0.25 it is very stable.
(Must add jmx.jar to your classpath)
Regards
Peter
Timothy Suh schrieb:
Subject: apache2+tomcat5.0.19+mod_jk2 in-process
Date: 5/26/2004, 11:19 AM
From: Timothy Suh [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Organization: AOL
Can someone help me with setting up apache2 to start tomcat5 in-process 
using mod_jk2? out-of-process was straight forward but I am having tough 
time starting in-process. I believe i have workers2 and jk2.properties 
set up correctly. I also compiledlinked mod_jk2 on my platform (linux). 
I searched everywhere but cannot find anyone who has this working.

The erorr msgs are:
[Wed May 26 11:15:46 2004] [notice] vm.open2() done
[Wed May 26 11:15:46 2004] [error] workerEnv.initChannel() init failed 
for channel.jni:jni
[Wed May 26 11:15:46 2004] [notice] workerJni.Init() Skipping 
initialization for the 1893 1893
[Wed May 26 11:15:46 2004] [error] workerEnv.initWorkers() init failed 
for worker.jni:onStartup
[Wed May 26 11:15:46 2004] [notice] workerJni.Init() Skipping 
initialization for the 1893 1893
[Wed May 26 11:15:46 2004] [error] workerEnv.initWorkers() init failed 
for worker.jni:onShutdown

Your help is monstrously appreciated.

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

 



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


Re: apache2+tomcat5.0.19+mod_jk in-process

2004-05-26 Thread Timothy Suh
I am now using Tomcat5.0.25 as you suggested but still getting same 
error. I don't think Apache is even getting to the part where it starts 
calling Tomcat (TomcatStarter) because the same error is generated when 
I completely remove Tomcat5.0.25 binary distribution from my machine.
I am thinking the solution is in my workers2.properties file but not 
sure what it is.

Here is my configuration:

$APACHE_HOME/modules
   mod_jk2.so (built from source)
   linjkjni.so (built from source)
$APACHE_HOME/conf
   workers2.properties
$TOMCAT_HOME/conf
   jk2.properties

workers2.properties contain (some unrelated properties omitted)

[uriMap:]

[shm:]
disabled=1

[channel.jni:jni]
disabled=0

[status:]

[vm:]
JVM=/j2sdk-1.4.2_03/jre/lib/i386/server/libjvm.so
OPT=-server
OPT=-Dtomcat.home=TOMCATHOME
OPT=-Dcatalina.home=TOMCATHOME
OPT=-Xnoclassgc
OPT=-Xcheck:jni
OPT=-verbose
classpath=TOMCATHOME/bin/bootstrap.jar
classpath=TOMCATHOME/common/lib/jmx.jar
classpath=TOMCATHOME/server/lib/commons-modeler.jar
classpath=TOMCATHOME/server/lib/tomcat-jni.jar
classpath=TOMCATHOME/common/lib/servlet-api.jar
OPT=-Xrs

[worker.jni:onStartup]
class=org/apache/jk/apr/TomcatStarter
ARG=startd
disabled=0

[worker.jni:onShutdown]
class=org/apache/jk/apr/TomcatStarter
ARG=stopd
disabled=0

Peter Rossbach wrote on 5/26/2004, 12:27 PM:

  Hello Timothy,
 
  the JNI integration works only with Tomcat Release greater 5.0.20
  and the commands changed to (startd and stopd)
 
  used the coming Tomcat 5.0.25 it is very stable.
  (Must add jmx.jar to your classpath)
 


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



RE: apache2+tomcat5.0.19+mod_jk in-process

2004-05-26 Thread Dale, Matt

I've spent a lot of time on this and still not managed to get it working. I can 
actually get the tomcat started inprocess and access it through port 8080 but I get 
the same errors as you have here and cant access it through the JNI channel.

The only thing I can think that it could be is to do with the threads and processes 
settings in httpd.conf but i've not heard any success stories at all on non windows 
platforms despite asking on this list several times.

Ta
Matt

-Original Message-
From: Timothy Suh [mailto:[EMAIL PROTECTED]
Sent: 26 May 2004 17:06
To: [EMAIL PROTECTED]
Subject: apache2+tomcat5.0.19+mod_jk in-process



Subject: apache2+tomcat5.0.19+mod_jk2 in-process
Date: 5/26/2004, 11:19 AM
From: Timothy Suh [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Organization: AOL

Can someone help me with setting up apache2 to start tomcat5 in-process 
using mod_jk2? out-of-process was straight forward but I am having tough 
time starting in-process. I believe i have workers2 and jk2.properties 
set up correctly. I also compiledlinked mod_jk2 on my platform (linux). 
I searched everywhere but cannot find anyone who has this working.

The erorr msgs are:

[Wed May 26 11:15:46 2004] [notice] vm.open2() done
[Wed May 26 11:15:46 2004] [error] workerEnv.initChannel() init failed 
for channel.jni:jni
[Wed May 26 11:15:46 2004] [notice] workerJni.Init() Skipping 
initialization for the 1893 1893
[Wed May 26 11:15:46 2004] [error] workerEnv.initWorkers() init failed 
for worker.jni:onStartup
[Wed May 26 11:15:46 2004] [notice] workerJni.Init() Skipping 
initialization for the 1893 1893
[Wed May 26 11:15:46 2004] [error] workerEnv.initWorkers() init failed 
for worker.jni:onShutdown

Your help is monstrously appreciated.



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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent Ltd. You must take full responsibility for virus checking this email and 
any attachments.
Please note that the content of this email or any of its attachments may contain data 
that falls within the scope of the Data Protection Acts and that you must ensure that 
any handling or processing of such data by you is fully compliant with the terms and 
provisions of the Data Protection Act 1984 and 1998.


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

Re: apache2+tomcat5.0.19+mod_jk in-process

2004-05-26 Thread Peter Rossbach
Thist is my working example
a)  I used JVM autodetection
b) configured the jni channel
c)  add tools.jar for compiling jsp's
[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess
[vm:]
info=Parameters used to load a JVM in the server process
#OPT=-Xdebug -Xnoagent 
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
OPT=-Xmx32m
OPT=-Xms32m
OPT=-Djava.home=D:/java/j2sdk1.4.2_03
OPT=-Dcatalina.home=D:/tomcat/develop/tomcat5/jakarta-tomcat-5/build
OPT=-Djava.class.path=D:/java/j2sdk1.4.2_03/lib/tools.jar;D:/tomcat/develop/tomcat5/jakarta-tomcat-5/build/server/lib/tomcat-jni.jar;D:/tomcat/develop/tomcat5/jakarta-tomcat-5/bin/jmx.jar;D:/tomcat/develop/tomcat5/jakarta-tomcat-5/build/bin/bootstrap.jar
disabled=0

[worker.jni:onStartup]
info=Command to be executed by the VM on startup. This one will start 
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=startd
disabled=0
stdout=${serverRoot}/logs/stdout.log
stderr=${serverRoot}/logs/stderr.log

[worker.jni:onShutdown]
info=Command to be executed by the VM on shutdown. This one will stop 
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=stopd
disabled=0

I hope this help.
regards
peter
Timothy Suh schrieb:
I am now using Tomcat5.0.25 as you suggested but still getting same 
error. I don't think Apache is even getting to the part where it starts 
calling Tomcat (TomcatStarter) because the same error is generated when 
I completely remove Tomcat5.0.25 binary distribution from my machine.
I am thinking the solution is in my workers2.properties file but not 
sure what it is.

Here is my configuration:
$APACHE_HOME/modules
  mod_jk2.so (built from source)
  linjkjni.so (built from source)
$APACHE_HOME/conf
  workers2.properties
$TOMCAT_HOME/conf
  jk2.properties
workers2.properties contain (some unrelated properties omitted)
[uriMap:]
[shm:]
disabled=1
[channel.jni:jni]
disabled=0
[status:]
[vm:]
JVM=/j2sdk-1.4.2_03/jre/lib/i386/server/libjvm.so
OPT=-server
OPT=-Dtomcat.home=TOMCATHOME
OPT=-Dcatalina.home=TOMCATHOME
OPT=-Xnoclassgc
OPT=-Xcheck:jni
OPT=-verbose
classpath=TOMCATHOME/bin/bootstrap.jar
classpath=TOMCATHOME/common/lib/jmx.jar
classpath=TOMCATHOME/server/lib/commons-modeler.jar
classpath=TOMCATHOME/server/lib/tomcat-jni.jar
classpath=TOMCATHOME/common/lib/servlet-api.jar
OPT=-Xrs
[worker.jni:onStartup]
class=org/apache/jk/apr/TomcatStarter
ARG=startd
disabled=0
[worker.jni:onShutdown]
class=org/apache/jk/apr/TomcatStarter
ARG=stopd
disabled=0
Peter Rossbach wrote on 5/26/2004, 12:27 PM:
 Hello Timothy,

 the JNI integration works only with Tomcat Release greater 5.0.20
 and the commands changed to (startd and stopd)

 used the coming Tomcat 5.0.25 it is very stable.
 (Must add jmx.jar to your classpath)

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

 


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


RE: Apache2 and mod_jk

2003-01-08 Thread Turner, John

Yep.  

1. For Apache 2, you don't need AddModule

2. Unless it's a typo, your workers.properties says the Ajp13Connector is on
8009, yet your server.xml has it on 8008.

3. You don't have a Context element in server.xml, unless you left it out
when pasting.

If 2 is a typo, and 8009 is used for both, all is good.  If 3 is deliberate,
please post your Context entry and the contents of mod_jk.conf.

John

 -Original Message-
 From: Bill [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 08, 2003 9:24 AM
 To: tomcat user
 Subject: Apache2 and mod_jk
 
 
 I've been holding off on posting on my problem because there 
 have been a
 wealth of posts on this topic.  However, the advice/suggestions I have
 seen havent led me to a working system.
 
 I'm trying to setup Tomcat 4.0.6 and HTTPD Server 2.0 using mod_jk. 
 I've followed instructions for this task from several sources and
 nothing seems to be working.
 
 Here are the steps I followed:
 
 1)  Added the following to httpd.conf:
 
 LoadModule jk_module modules/mod_jk.so
 
 This step also says to add the AddModule directive.  This 
 directive does
 not exist for 2.0 nor was I able to find an analogous directive to
 replace it.
 
 2)  I have the following in 
 /usr/local/tomcat/conf/jk/workers.properties
 
 workers.list= ajp13
 worker.ajp13.type=ajp13
 
 worker.ajp13.host=192.168.1.250
 worker.ajp13.port=8009
 
 worker.ajp13.cachesize=10
 worker.ajp13.cache_timeout=600
 worker.ajp13.socket_keepalive=1
 worker.ajp13.socket_timeout=300
 
   
 3)  I have the following in httpd.conf:
 
 JkWorkersFile /usr/local/tomcat/conf/jk/workers.properties
 JkLogFile /usr/local/apache2/log/mod_jk.log
 JkLogLevel info
 JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
 JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
 JkRequestLogFormat %w %V %T
 
 Include /usr/local/tomcat/conf/auto/mod_jk.conf
 
 4) Here is my server.xml entry:
 
 Server port=8005 shutdown=SHUTDOWN debug=0
 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig/
 
 Service name=Tomcat-Apache
 
  Connector className=org.apache.ajp.tomcat4.Ajp13Connector
 port=8008 minProcessors=5 maxProcessors=75
 enableLookups=true
 acceptCount=10 debug=0/
 
  Engine name=Apache defaultHost=192.168.1.250 debug=0
 appBase=webapps
   
   Logger className=org.apache.catalina.logger.FileLogger
   prefix=apache_log. suffix=.txt
   timestamp=true/
   Realm className=org.apache.catalina.realm.MemoryRealm /
 
   Host name=192.168.1.250 debug=0 appBase=webapps 
   unpackWARs=true
 
   Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
 append=true/
 
 Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs prefix=192.168.1.250_access_log.
   suffix=.txt pattern=common/
   /Host
 /Engine
   /Service
 /Server
   
 No errors show up in the access log but the following error 
 shows up in
 the host log ($TOMCAT_HOME/logs/apache_log.2003-01-08.txt):
 
 2003-01-08 13:07:57 Ajp13Processor[8008][4] [Ajp13] incomplete read,
 waited #-1 got only 0
 
 And this is what I get in catalina.log:
 
 Unable to open config file
 Starting service Tomcat-Apache
 Apache Tomcat/4.0.6
 Unable to open config file
 BAD packet 18245
 In: : [B@45fde0 4/21540
 47 45 54 20 00 00 00 00 00 00 00 00 00 00 00 00  | GET.
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | 
 snip
 This goes on forever so I only included to the first few lines of the
 first packet...
 
 Any ideas what I missed?  I did a web search on the error and got a
 couple of hits but none of them panned out.  
 
 Thanks
 
 -b
 
 
   
 
 
 
 
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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




RE: Apache2 and mod_jk

2003-01-08 Thread PELOQUIN,JEFFREY (HP-Boise,ex1)
One potential problem is that you have 8009 in your workers.properties file 
but have 8008 in the your server.xml  

-Original Message-
From: Bill [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 7:24 AM
To: tomcat user
Subject: Apache2 and mod_jk


I've been holding off on posting on my problem because there have been a
wealth of posts on this topic.  However, the advice/suggestions I have
seen havent led me to a working system.

I'm trying to setup Tomcat 4.0.6 and HTTPD Server 2.0 using mod_jk. 
I've followed instructions for this task from several sources and
nothing seems to be working.

Here are the steps I followed:

1)  Added the following to httpd.conf:

LoadModule jk_module modules/mod_jk.so

This step also says to add the AddModule directive.  This directive does
not exist for 2.0 nor was I able to find an analogous directive to
replace it.

2)  I have the following in /usr/local/tomcat/conf/jk/workers.properties

workers.list= ajp13
worker.ajp13.type=ajp13

worker.ajp13.host=192.168.1.250
worker.ajp13.port=8009

worker.ajp13.cachesize=10
worker.ajp13.cache_timeout=600
worker.ajp13.socket_keepalive=1
worker.ajp13.socket_timeout=300


3)  I have the following in httpd.conf:

JkWorkersFile /usr/local/tomcat/conf/jk/workers.properties
JkLogFile /usr/local/apache2/log/mod_jk.log
JkLogLevel info
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T

Include /usr/local/tomcat/conf/auto/mod_jk.conf

4) Here is my server.xml entry:

Server port=8005 shutdown=SHUTDOWN debug=0
Listener className=org.apache.ajp.tomcat4.config.ApacheConfig/

Service name=Tomcat-Apache

 Connector className=org.apache.ajp.tomcat4.Ajp13Connector
port=8008 minProcessors=5 maxProcessors=75
enableLookups=true
acceptCount=10 debug=0/

 Engine name=Apache defaultHost=192.168.1.250 debug=0
appBase=webapps

  Logger className=org.apache.catalina.logger.FileLogger
  prefix=apache_log. suffix=.txt
  timestamp=true/
  Realm className=org.apache.catalina.realm.MemoryRealm /

  Host name=192.168.1.250 debug=0 appBase=webapps 
unpackWARs=true

Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
append=true/

Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs prefix=192.168.1.250_access_log.
suffix=.txt pattern=common/
  /Host
/Engine
  /Service
/Server

No errors show up in the access log but the following error shows up in
the host log ($TOMCAT_HOME/logs/apache_log.2003-01-08.txt):

2003-01-08 13:07:57 Ajp13Processor[8008][4] [Ajp13] incomplete read,
waited #-1 got only 0

And this is what I get in catalina.log:

Unable to open config file
Starting service Tomcat-Apache
Apache Tomcat/4.0.6
Unable to open config file
BAD packet 18245
In: : [B@45fde0 4/21540
47 45 54 20 00 00 00 00 00 00 00 00 00 00 00 00  | GET.
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | 
snip
This goes on forever so I only included to the first few lines of the
first packet...

Any ideas what I missed?  I did a web search on the error and got a
couple of hits but none of them panned out.  

Thanks

-b










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

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




RE: Apache2 and mod_jk

2003-01-08 Thread Bill
The port designation was a typo in the file.  Thanks for catching that,
however it doesnt seemed to have made a difference.

  
Here are the contexts I have defined currently:
  
  Context path=
   docBase=ROOT
   debug=0
  /Context
  Context path=/tomcat-docs
   docBase=tomcat-docs
   reloadable=true
   debug=0
  /Context
  Context path=/examples
   docBase=examples
   reloadable=true
   debug=0
  /Context
  Context path=/mrccores
   docBase=mrccores
   reloadable=true
   debug=0
   trusted=false
  /Context
These are all defined after the AccessLogValve definition and before the
/Host tag.

Here is the contents of of mod_jk.conf (minus the !IfModule block) :

VirtualHost 192.168.1.250
ServerName 192.168.1.250

JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /webdav ajp13
JkMount /webdav/* ajp13

JkMount /tomcat-docs ajp13
JkMount /tomcat-docs/* ajp13

JkMount /manager ajp13
JkMount /manager/* ajp13

JkMount /mrccores ajp13
JkMount /mrccores/* ajp13
/VirtualHost
  

On Wed, 2003-01-08 at 19:35, Turner, John wrote:
 
 Yep.  
 
 1. For Apache 2, you don't need AddModule
 
 2. Unless it's a typo, your workers.properties says the Ajp13Connector is on
 8009, yet your server.xml has it on 8008.
 
 3. You don't have a Context element in server.xml, unless you left it out
 when pasting.
 
 If 2 is a typo, and 8009 is used for both, all is good.  If 3 is deliberate,
 please post your Context entry and the contents of mod_jk.conf.
 
 John
 
  -Original Message-
  From: Bill [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, January 08, 2003 9:24 AM
  To: tomcat user
  Subject: Apache2 and mod_jk
  
  
  I've been holding off on posting on my problem because there 
  have been a
  wealth of posts on this topic.  However, the advice/suggestions I have
  seen havent led me to a working system.
  
  I'm trying to setup Tomcat 4.0.6 and HTTPD Server 2.0 using mod_jk. 
  I've followed instructions for this task from several sources and
  nothing seems to be working.
  
  Here are the steps I followed:
  
  1)  Added the following to httpd.conf:
  
  LoadModule jk_module modules/mod_jk.so
  
  This step also says to add the AddModule directive.  This 
  directive does
  not exist for 2.0 nor was I able to find an analogous directive to
  replace it.
  
  2)  I have the following in 
  /usr/local/tomcat/conf/jk/workers.properties
  
  workers.list= ajp13
  worker.ajp13.type=ajp13
  
  worker.ajp13.host=192.168.1.250
  worker.ajp13.port=8009
  
  worker.ajp13.cachesize=10
  worker.ajp13.cache_timeout=600
  worker.ajp13.socket_keepalive=1
  worker.ajp13.socket_timeout=300
  
  
  3)  I have the following in httpd.conf:
  
  JkWorkersFile /usr/local/tomcat/conf/jk/workers.properties
  JkLogFile /usr/local/apache2/log/mod_jk.log
  JkLogLevel info
  JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
  JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
  JkRequestLogFormat %w %V %T
  
  Include /usr/local/tomcat/conf/auto/mod_jk.conf
  
  4) Here is my server.xml entry:
  
  Server port=8005 shutdown=SHUTDOWN debug=0
  Listener className=org.apache.ajp.tomcat4.config.ApacheConfig/
  
  Service name=Tomcat-Apache
  
   Connector className=org.apache.ajp.tomcat4.Ajp13Connector
  port=8008 minProcessors=5 maxProcessors=75
  enableLookups=true
  acceptCount=10 debug=0/
  
   Engine name=Apache defaultHost=192.168.1.250 debug=0
  appBase=webapps
  
Logger className=org.apache.catalina.logger.FileLogger
prefix=apache_log. suffix=.txt
timestamp=true/
Realm className=org.apache.catalina.realm.MemoryRealm /
  
Host name=192.168.1.250 debug=0 appBase=webapps 
  unpackWARs=true
  
  Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
  append=true/
  
  Valve className=org.apache.catalina.valves.AccessLogValve
  directory=logs prefix=192.168.1.250_access_log.
  suffix=.txt pattern=common/
/Host
  /Engine
/Service
  /Server
  
  No errors show up in the access log but the following error 
  shows up in
  the host log ($TOMCAT_HOME/logs/apache_log.2003-01-08.txt):
  
  2003-01-08 13:07:57 Ajp13Processor[8008][4] [Ajp13] incomplete read,
  waited #-1 got only 0
  
  And this is what I get in catalina.log:
  
  Unable to open config file
  Starting service Tomcat-Apache
  Apache Tomcat/4.0.6
  Unable to open config file
  BAD packet 18245
  In: : [B@45fde0 4/21540
  47 45 54 20 00 00 00 00 00 00 00 00 00 00 00 00  | GET.
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | 
  snip
  This goes on forever so I only included to the first few lines of the
  first 

RE: Apache2 and mod_jk

2003-01-08 Thread Turner, John

OK. 

What URL are you trying to access?  http://192.168.1.250/mrccores/some.jsp?
What are the contents of the JK logs and the Catalina logs?

Those unable to open config file messages are very strange, as is bad
read.  How much editing have you done to the default configuration files?  

John


 -Original Message-
 From: Bill [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 08, 2003 9:59 AM
 To: Tomcat Users List
 Subject: RE: Apache2 and mod_jk
 
 
 The port designation was a typo in the file.  Thanks for 
 catching that,
 however it doesnt seemed to have made a difference.
 
   
 Here are the contexts I have defined currently:
   
   Context path=
docBase=ROOT
debug=0
   /Context
   Context path=/tomcat-docs
docBase=tomcat-docs
reloadable=true
debug=0
   /Context
   Context path=/examples
docBase=examples
reloadable=true
debug=0
   /Context
   Context path=/mrccores
docBase=mrccores
reloadable=true
debug=0
trusted=false
   /Context
 These are all defined after the AccessLogValve definition and 
 before the
 /Host tag.
 
 Here is the contents of of mod_jk.conf (minus the !IfModule block) :
 
 VirtualHost 192.168.1.250
 ServerName 192.168.1.250
 
 JkMount /examples ajp13
 JkMount /examples/* ajp13
 
 JkMount /webdav ajp13
 JkMount /webdav/* ajp13
 
 JkMount /tomcat-docs ajp13
 JkMount /tomcat-docs/* ajp13
 
 JkMount /manager ajp13
 JkMount /manager/* ajp13
 
 JkMount /mrccores ajp13
 JkMount /mrccores/* ajp13
 /VirtualHost
   
 
 On Wed, 2003-01-08 at 19:35, Turner, John wrote:
  
  Yep.  
  
  1. For Apache 2, you don't need AddModule
  
  2. Unless it's a typo, your workers.properties says the 
 Ajp13Connector is on
  8009, yet your server.xml has it on 8008.
  
  3. You don't have a Context element in server.xml, unless 
 you left it out
  when pasting.
  
  If 2 is a typo, and 8009 is used for both, all is good.  If 
 3 is deliberate,
  please post your Context entry and the contents of mod_jk.conf.
  
  John
  
   -Original Message-
   From: Bill [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, January 08, 2003 9:24 AM
   To: tomcat user
   Subject: Apache2 and mod_jk
   
   
   I've been holding off on posting on my problem because there 
   have been a
   wealth of posts on this topic.  However, the 
 advice/suggestions I have
   seen havent led me to a working system.
   
   I'm trying to setup Tomcat 4.0.6 and HTTPD Server 2.0 
 using mod_jk. 
   I've followed instructions for this task from several sources and
   nothing seems to be working.
   
   Here are the steps I followed:
   
   1)  Added the following to httpd.conf:
   
   LoadModule jk_module modules/mod_jk.so
   
   This step also says to add the AddModule directive.  This 
   directive does
   not exist for 2.0 nor was I able to find an analogous directive to
   replace it.
   
   2)  I have the following in 
   /usr/local/tomcat/conf/jk/workers.properties
   
   workers.list= ajp13
   worker.ajp13.type=ajp13
   
   worker.ajp13.host=192.168.1.250
   worker.ajp13.port=8009
   
   worker.ajp13.cachesize=10
   worker.ajp13.cache_timeout=600
   worker.ajp13.socket_keepalive=1
   worker.ajp13.socket_timeout=300
   
 
   3)  I have the following in httpd.conf:
   
   JkWorkersFile /usr/local/tomcat/conf/jk/workers.properties
   JkLogFile /usr/local/apache2/log/mod_jk.log
   JkLogLevel info
   JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
   JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
   JkRequestLogFormat %w %V %T
   
   Include /usr/local/tomcat/conf/auto/mod_jk.conf
   
   4) Here is my server.xml entry:
   
   Server port=8005 shutdown=SHUTDOWN debug=0
   Listener 
 className=org.apache.ajp.tomcat4.config.ApacheConfig/
   
   Service name=Tomcat-Apache
   
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8008 minProcessors=5 maxProcessors=75
   enableLookups=true
   acceptCount=10 debug=0/
   
Engine name=Apache defaultHost=192.168.1.250 
 debug=0
   appBase=webapps
 
 Logger className=org.apache.catalina.logger.FileLogger
 prefix=apache_log. suffix=.txt
 timestamp=true/
 Realm className=org.apache.catalina.realm.MemoryRealm /
   
 Host name=192.168.1.250 debug=0 appBase=webapps 
 unpackWARs=true
   
 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
   append=true/
   
   Valve 
 className=org.apache.catalina.valves.AccessLogValve
   directory=logs 
 prefix=192.168.1.250_access_log.
 suffix=.txt pattern=common/
 /Host
   /Engine
 /Service
   /Server
 
   No errors show up in the access log

RE: Apache2 and mod_jk

2003-01-08 Thread Bill
John
 
 What URL are you trying to access?  http://192.168.1.250/mrccores/some.jsp?

I've been testing using http://192.168.1.250/examples .  That url gets a
500 error. I figured if I got the example app working the rest would
fall into place...

 What are the contents of the JK logs and the Catalina logs?

There is absolutely nothing in the JK logs.  I included an excerpt of
the catalina.log file in the original message.  Besides the normal
startup and shutdown stuff there is the unable to open config file and
then there is a ton of packet data that corresponds to the bad reads in
the host_log file.

 Those unable to open config file messages are very strange, as is bad
 read.  How much editing have you done to the default configuration files?  

This bugs me too.  Not so much the bad reads but the unable to
read...  

What files in particular are you referring too?  The only file I can
really thing of that I did a ton of editing too is server.xml.  You saw
the changes I made to apache-tomcat and I removed the standalone config.

 
  -Original Message-
  From: Bill [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, January 08, 2003 9:59 AM
  To: Tomcat Users List
  Subject: RE: Apache2 and mod_jk
  
  
  The port designation was a typo in the file.  Thanks for 
  catching that,
  however it doesnt seemed to have made a difference.
  

  Here are the contexts I have defined currently:

Context path=
 docBase=ROOT
 debug=0
/Context
Context path=/tomcat-docs
 docBase=tomcat-docs
 reloadable=true
 debug=0
/Context
Context path=/examples
 docBase=examples
 reloadable=true
 debug=0
/Context
Context path=/mrccores
 docBase=mrccores
 reloadable=true
 debug=0
 trusted=false
/Context
  These are all defined after the AccessLogValve definition and 
  before the
  /Host tag.
  
  Here is the contents of of mod_jk.conf (minus the !IfModule block) :
  
  VirtualHost 192.168.1.250
  ServerName 192.168.1.250
  
  JkMount /examples ajp13
  JkMount /examples/* ajp13
  
  JkMount /webdav ajp13
  JkMount /webdav/* ajp13
  
  JkMount /tomcat-docs ajp13
  JkMount /tomcat-docs/* ajp13
  
  JkMount /manager ajp13
  JkMount /manager/* ajp13
  
  JkMount /mrccores ajp13
  JkMount /mrccores/* ajp13
  /VirtualHost

  
  On Wed, 2003-01-08 at 19:35, Turner, John wrote:
   
   Yep.  
   
   1. For Apache 2, you don't need AddModule
   
   2. Unless it's a typo, your workers.properties says the 
  Ajp13Connector is on
   8009, yet your server.xml has it on 8008.
   
   3. You don't have a Context element in server.xml, unless 
  you left it out
   when pasting.
   
   If 2 is a typo, and 8009 is used for both, all is good.  If 
  3 is deliberate,
   please post your Context entry and the contents of mod_jk.conf.
   
   John
   
-Original Message-
From: Bill [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 9:24 AM
To: tomcat user
Subject: Apache2 and mod_jk


I've been holding off on posting on my problem because there 
have been a
wealth of posts on this topic.  However, the 
  advice/suggestions I have
seen havent led me to a working system.

I'm trying to setup Tomcat 4.0.6 and HTTPD Server 2.0 
  using mod_jk. 
I've followed instructions for this task from several sources and
nothing seems to be working.

Here are the steps I followed:

1)  Added the following to httpd.conf:

LoadModule jk_module modules/mod_jk.so

This step also says to add the AddModule directive.  This 
directive does
not exist for 2.0 nor was I able to find an analogous directive to
replace it.

2)  I have the following in 
/usr/local/tomcat/conf/jk/workers.properties

workers.list= ajp13
worker.ajp13.type=ajp13

worker.ajp13.host=192.168.1.250
worker.ajp13.port=8009

worker.ajp13.cachesize=10
worker.ajp13.cache_timeout=600
worker.ajp13.socket_keepalive=1
worker.ajp13.socket_timeout=300


3)  I have the following in httpd.conf:

JkWorkersFile /usr/local/tomcat/conf/jk/workers.properties
JkLogFile /usr/local/apache2/log/mod_jk.log
JkLogLevel info
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T

Include /usr/local/tomcat/conf/auto/mod_jk.conf

4) Here is my server.xml entry:

Server port=8005 shutdown=SHUTDOWN debug=0
Listener 
  className=org.apache.ajp.tomcat4.config.ApacheConfig/

Service name=Tomcat-Apache

 Connector className=org.apache.ajp.tomcat4.Ajp13Connector

RE: Apache2 and mod_jk

2003-01-08 Thread Turner, John

I was referring to server.xml and httpd.conf.  Just for grins, can you put
the default server.xml back?  You don't have to change anything for
/examples, there is a JK-compatible Connector on port 8009 enabled by
default.

John


 -Original Message-
 From: Bill [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 08, 2003 10:30 AM
 To: Tomcat Users List
 Subject: RE: Apache2 and mod_jk
 
 
 John
  
  What URL are you trying to access?  
 http://192.168.1.250/mrccores/some.jsp?
 
 I've been testing using http://192.168.1.250/examples .  That 
 url gets a
 500 error. I figured if I got the example app working the rest would
 fall into place...
 
  What are the contents of the JK logs and the Catalina logs?
 
 There is absolutely nothing in the JK logs.  I included an excerpt of
 the catalina.log file in the original message.  Besides the normal
 startup and shutdown stuff there is the unable to open 
 config file and
 then there is a ton of packet data that corresponds to the 
 bad reads in
 the host_log file.
 
  Those unable to open config file messages are very 
 strange, as is bad
  read.  How much editing have you done to the default 
 configuration files?  
 
 This bugs me too.  Not so much the bad reads but the unable to
 read...  
 
 What files in particular are you referring too?  The only file I can
 really thing of that I did a ton of editing too is 
 server.xml.  You saw
 the changes I made to apache-tomcat and I removed the 
 standalone config.
 
  
   -Original Message-
   From: Bill [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, January 08, 2003 9:59 AM
   To: Tomcat Users List
   Subject: RE: Apache2 and mod_jk
   
   
   The port designation was a typo in the file.  Thanks for 
   catching that,
   however it doesnt seemed to have made a difference.
   
 
   Here are the contexts I have defined currently:
 
 Context path=
  docBase=ROOT
  debug=0
 /Context
 Context path=/tomcat-docs
  docBase=tomcat-docs
  reloadable=true
  debug=0
 /Context
 Context path=/examples
  docBase=examples
  reloadable=true
  debug=0
 /Context
 Context path=/mrccores
  docBase=mrccores
  reloadable=true
  debug=0
  trusted=false
 /Context
   These are all defined after the AccessLogValve definition and 
   before the
   /Host tag.
   
   Here is the contents of of mod_jk.conf (minus the 
 !IfModule block) :
   
   VirtualHost 192.168.1.250
   ServerName 192.168.1.250
   
   JkMount /examples ajp13
   JkMount /examples/* ajp13
   
   JkMount /webdav ajp13
   JkMount /webdav/* ajp13
   
   JkMount /tomcat-docs ajp13
   JkMount /tomcat-docs/* ajp13
   
   JkMount /manager ajp13
   JkMount /manager/* ajp13
   
   JkMount /mrccores ajp13
   JkMount /mrccores/* ajp13
   /VirtualHost
 
   
   On Wed, 2003-01-08 at 19:35, Turner, John wrote:

Yep.  

1. For Apache 2, you don't need AddModule

2. Unless it's a typo, your workers.properties says the 
   Ajp13Connector is on
8009, yet your server.xml has it on 8008.

3. You don't have a Context element in server.xml, unless 
   you left it out
when pasting.

If 2 is a typo, and 8009 is used for both, all is good.  If 
   3 is deliberate,
please post your Context entry and the contents of mod_jk.conf.

John

 -Original Message-
 From: Bill [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 08, 2003 9:24 AM
 To: tomcat user
 Subject: Apache2 and mod_jk
 
 
 I've been holding off on posting on my problem because there 
 have been a
 wealth of posts on this topic.  However, the 
   advice/suggestions I have
 seen havent led me to a working system.
 
 I'm trying to setup Tomcat 4.0.6 and HTTPD Server 2.0 
   using mod_jk. 
 I've followed instructions for this task from several 
 sources and
 nothing seems to be working.
 
 Here are the steps I followed:
 
 1)  Added the following to httpd.conf:
 
 LoadModule jk_module modules/mod_jk.so
 
 This step also says to add the AddModule directive.  This 
 directive does
 not exist for 2.0 nor was I able to find an analogous 
 directive to
 replace it.
 
 2)  I have the following in 
 /usr/local/tomcat/conf/jk/workers.properties
 
 workers.list= ajp13
 worker.ajp13.type=ajp13
 
 worker.ajp13.host=192.168.1.250
 worker.ajp13.port=8009
 
 worker.ajp13.cachesize=10
 worker.ajp13.cache_timeout=600
 worker.ajp13.socket_keepalive=1
 worker.ajp13.socket_timeout=300
 
   
 3)  I have the following in httpd.conf:
 
 JkWorkersFile /usr/local/tomcat/conf/jk

Re: Apache2 + Tomcat4.0.1 + mod_jk

2002-01-23 Thread Falcon cheetah

And where would you get 4.0.2b2
I can only see 4.0?

--- Craig R. McClanahan [EMAIL PROTECTED] wrote:
 
 
 On Wed, 23 Jan 2002, Marc G. Fournier wrote:
 
  Date: Wed, 23 Jan 2002 14:26:10 -0400 (AST)
  From: Marc G. Fournier [EMAIL PROTECTED]
  Reply-To: Tomcat Users List
 [EMAIL PROTECTED]
  To: Tomcat Users List
 [EMAIL PROTECTED]
  Subject: Re: Apache2 + Tomcat4.0.1 + mod_jk
 
 
  This may be so, but my understanding is that you
 can't use mod_jk for
  *Tomcat 4.x* ... so I think you need to install
 mod_webapp for
  Apache2-Tomcat4.x, and leave mod_jk ther for
 Apache2-Tomcat3.x ...
 
 
 Your understanding is not correct -- mod_jk is also
 supported under 4.x,
 and the Java side of it is included (with many bug
 fixes) in the 4.0.2b2
 release.
 
 Craig
 
 
 
 
  On Wed, 23 Jan 2002, Falcon cheetah wrote:
 
   Are you sure about that? Because both the doc
 that I
   used and others on apache site say that you CAN
 use
   mod_jk for both 1.3 and 2.0!
  
   Any idea?
  
   --- Marc G. Fournier [EMAIL PROTECTED] wrote:
   
mod_jk is for Tomcat 3.x ... mod_webapp is for
Tomcat 4.x ... wrong module
:(
   
   
On Wed, 23 Jan 2002, Falcon cheetah wrote:
   
 Greetings,

 I managed to install the above subject on my
 RH
Linux
 7.1. I am downloaded the latest
 apache2.0.28beta
 together with tomcat 4.0.1. Built apache
 according
to
 the instructions. I followed instructions
 found on

   
  

http://www.iris.dti.ne.jp/~u-osamu/indexlinux72jdk140.html
 I followed the instructions to the extent. I
commented
 out the ssl part.

 When I typed ./apachectl configtest, it gave
 me
error
 that it can not recognize AddModule in

 LoadModule jk_module modules/mod_jk.so
 #AddModule mod_jk.c

 So I commented it out. My understanding is
 that I
need
 AddModule in order for Apache to load
 mod_jk,
 otherwise there not be communication between
apache2
 and tomcat4.

 I changed the port for ajp13 from 8009 to
 8006
since I
 have tomcat 3.2 running on the same machine.

 I am able to communicate with Apache on port
 8002,
it
 serves files fine. I can also get tomcat to
 serve
jsp
 on 8003. But when I try to access jsp files
 on the
 apache port it gives me page not found! and
 in the
 error log I find [Wed Jan 23 12:31:36 2002]
 [warn]
 [client local_ip] handler jakarta-servlet
 not
found
 for: carts.jsp, referer:

   
  

http://localhost:8002/examples/jsp/sessions/carts.html


 Is the AddModule causing the problem?
 Also when I look at the localhost_log.txt
 file I
find
 an exception for every context available. An
example
 is :
 2002-01-23 12:02:56
 StandardWrapper[/tomcat-docs:JkServlet]:
 Marking
 servlet JkServlet as unavailable
 2002-01-23 12:02:56
 StandardContext[/tomcat-docs]:
 Servlet /tomcat-docs threw load() exception
 javax.servlet.ServletException: Wrapper
 cannot
find
 servlet class
 org.apache.ajp.tomcat4.JkServlet or
a
 class it depends on
 at

   
  

org.apache.catalina.core.StandardWrapper.load(Unknown
 Source)
 at

   
  

org.apache.catalina.core.StandardContext.loadOnStartup(Unknown
 Source)

 Why is it complaining about JkServlet? I
 made sure
to
 have tomcat-ajp.jar in the server/lib
 directory,
and
 made sure the class is there.

 I read somewhere that apache2 does not work
 with
apxs,
 is that ture?

 I also noticed that in some of the source
 code the
 developers are using methods that only
 appeared in
JDK
 1.3, an example is
 Socket.setKeepAlive(boolean). I
 replaced that, since I am running jdk 1.2.2
 to
 Socket.setSOTimeOut(0);

 I know am asking several questions but hope
someone
 will find an answer for me.

 Thank you.




 __
 Do You Yahoo!?
 Send FREE video emails in Yahoo! Mail!
 http://promo.yahoo.com/videomail/

 --
 To unsubscribe:
   
 mailto:[EMAIL PROTECTED]
 For additional commands:
mailto:[EMAIL PROTECTED]
 Troubles with the list:
mailto:[EMAIL PROTECTED]


   
   
--
To unsubscribe:
 
=== message truncated ===


__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: TC Re: Apache2 + Tomcat4.0.1 + mod_jk

2002-01-23 Thread Kirby Vandivort

http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.2-b2/

On Wed, Jan 23, 2002 at 11:00:50AM -0800, Falcon cheetah wrote:
 And where would you get 4.0.2b2
 I can only see 4.0?
 
 --- Craig R. McClanahan [EMAIL PROTECTED] wrote:
  
  
  On Wed, 23 Jan 2002, Marc G. Fournier wrote:
  
   Date: Wed, 23 Jan 2002 14:26:10 -0400 (AST)
   From: Marc G. Fournier [EMAIL PROTECTED]
   Reply-To: Tomcat Users List
  [EMAIL PROTECTED]
   To: Tomcat Users List
  [EMAIL PROTECTED]
   Subject: Re: Apache2 + Tomcat4.0.1 + mod_jk
  
  
   This may be so, but my understanding is that you
  can't use mod_jk for
   *Tomcat 4.x* ... so I think you need to install
  mod_webapp for
   Apache2-Tomcat4.x, and leave mod_jk ther for
  Apache2-Tomcat3.x ...
  
  
  Your understanding is not correct -- mod_jk is also
  supported under 4.x,
  and the Java side of it is included (with many bug
  fixes) in the 4.0.2b2
  release.
  
  Craig
  
  
  
  
   On Wed, 23 Jan 2002, Falcon cheetah wrote:
  
Are you sure about that? Because both the doc
  that I
used and others on apache site say that you CAN
  use
mod_jk for both 1.3 and 2.0!
   
Any idea?
   
--- Marc G. Fournier [EMAIL PROTECTED] wrote:

 mod_jk is for Tomcat 3.x ... mod_webapp is for
 Tomcat 4.x ... wrong module
 :(


 On Wed, 23 Jan 2002, Falcon cheetah wrote:

  Greetings,
 
  I managed to install the above subject on my
  RH
 Linux
  7.1. I am downloaded the latest
  apache2.0.28beta
  together with tomcat 4.0.1. Built apache
  according
 to
  the instructions. I followed instructions
  found on
 

   
 
 http://www.iris.dti.ne.jp/~u-osamu/indexlinux72jdk140.html
  I followed the instructions to the extent. I
 commented
  out the ssl part.
 
  When I typed ./apachectl configtest, it gave
  me
 error
  that it can not recognize AddModule in
 
  LoadModule jk_module modules/mod_jk.so
  #AddModule mod_jk.c
 
  So I commented it out. My understanding is
  that I
 need
  AddModule in order for Apache to load
  mod_jk,
  otherwise there not be communication between
 apache2
  and tomcat4.
 
  I changed the port for ajp13 from 8009 to
  8006
 since I
  have tomcat 3.2 running on the same machine.
 
  I am able to communicate with Apache on port
  8002,
 it
  serves files fine. I can also get tomcat to
  serve
 jsp
  on 8003. But when I try to access jsp files
  on the
  apache port it gives me page not found! and
  in the
  error log I find [Wed Jan 23 12:31:36 2002]
  [warn]
  [client local_ip] handler jakarta-servlet
  not
 found
  for: carts.jsp, referer:
 

   
 
 http://localhost:8002/examples/jsp/sessions/carts.html
 
 
  Is the AddModule causing the problem?
  Also when I look at the localhost_log.txt
  file I
 find
  an exception for every context available. An
 example
  is :
  2002-01-23 12:02:56
  StandardWrapper[/tomcat-docs:JkServlet]:
  Marking
  servlet JkServlet as unavailable
  2002-01-23 12:02:56
  StandardContext[/tomcat-docs]:
  Servlet /tomcat-docs threw load() exception
  javax.servlet.ServletException: Wrapper
  cannot
 find
  servlet class
  org.apache.ajp.tomcat4.JkServlet or
 a
  class it depends on
  at
 

   
 
 org.apache.catalina.core.StandardWrapper.load(Unknown
  Source)
  at
 

   
 
 org.apache.catalina.core.StandardContext.loadOnStartup(Unknown
  Source)
 
  Why is it complaining about JkServlet? I
  made sure
 to
  have tomcat-ajp.jar in the server/lib
  directory,
 and
  made sure the class is there.
 
  I read somewhere that apache2 does not work
  with
 apxs,
  is that ture?
 
  I also noticed that in some of the source
  code the
  developers are using methods that only
  appeared in
 JDK
  1.3, an example is
  Socket.setKeepAlive(boolean). I
  replaced that, since I am running jdk 1.2.2
  to
  Socket.setSOTimeOut(0);
 
  I know am asking several questions but hope
 someone
  will find an answer for me.
 
  Thank you.
 
 
 
 
  __
  Do You Yahoo!?
  Send FREE video emails in Yahoo! Mail!
  http://promo.yahoo.com/videomail/
 
  --
  To unsubscribe:

  mailto:[EMAIL PROTECTED]
  For additional commands:
 mailto:[EMAIL PROTECTED]
  Troubles with the list:
 mailto:[EMAIL PROTECTED]
 
 


 --
 To unsubscribe:
  
 === message truncated ===
 
 
 __
 Do You Yahoo!?
 Send FREE video emails in Yahoo! Mail!
 http://promo.yahoo.com/videomail/
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto

Re: Apache2 + Tomcat4.0.1 + mod_jk

2002-01-23 Thread Craig R. McClanahan



On Wed, 23 Jan 2002, Falcon cheetah wrote:

 Date: Wed, 23 Jan 2002 11:00:50 -0800 (PST)
 From: Falcon cheetah [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: Apache2 + Tomcat4.0.1 + mod_jk

 And where would you get 4.0.2b2
 I can only see 4.0?


It's listed under Milestone Builds on the Jakarta website's standard
binary downloads page:

http://jakarta.apache.org/site/binindex.html

Craig


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Apache2 + Tomcat4.0.1 + mod_jk code changes

2002-01-23 Thread Falcon cheetah

in this file :
/tmp/jakarta/connectors/util/java/org/apache/tomcat/util/buf/HexUtils.java

changed byte[] to char[]

in this file: 
/tmp/jakarta/connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Connector.java
 
// commented it out since it is jdk1.3 based
   socket.setKeepAlive(true);
using this instead  socket.setSoTimeout(0);
 
and that was in order to build tomcat-ajp.jar for
4.0.1 snapshot of jan-22.

Is that some bug that I sumbled on? Is it fixed in the
newer releases? I am not sure if either will cause a
problem in my instance of the server.




__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]