RE: Help with mod_jk2

2004-10-19 Thread tomcat
Hello Mark,

You said you place this in httpd.conf:
[uri:lvh/beg-servlets/servlet/*]
worker=ajp13:localhost:8009

[uri:lvh.mdeggers.org/beg-servlets/servlet/*]
worker=ajp13:localhost:8009

This looks like worker2 syntax. So this is the way to do it instead of
jkUriSets between the IfModule mod_jk2.so/IfModule

Plus everytime I use the word worker i get depricated notices suggesting
to use group instead.

Im trying to do multiple instances on different ports. the jkUriSet worked
great for the first one, but the second and third dont work. Im ending up
having to map every extension type in the workers2.properties which seems
totally wrong.

I will try your technique and see if i can get the second instance runnng
under ajp13...

Thanks!

John

 OK, I'm coming in a little late to this thread.  Here is my
 configuration for a typical web application using mod_jk2.so.

 I am running this on Fedora Core 2 with httpd 2.0.52 and Tomcat 5.0.28.

 httpd.conf
 ==

 #
 # general section - for all virtual hosts
 #
 LoadModule jk2_module modules/mod_jk2.so

 #
 # particular virtual host
 #
 VirtualHost *
   ServerName lvh.mdeggers.org
   ServerAlias lvh
   DocumentRoot /home/apache/lvh

   ErrorLog logs/lvh-error.log
   LogLevel warn
   CustomLog logs/lvh-access.log common

 #
 # Directory for application
 #
   Directory /home/tomcat/lvh/beg-servlets
  Options Indexes FollowSymlinks MultiViews
  AllowOverride None
  Order allow,deny
  Allow from 192.168.1
  Allow from 127.0.0.1
   /Directory

   Directory /home/tomcat/lvh/beg-servlets/WEB-INF
 AllowOverride None
 Deny from all
   /Directory

 #
 # Aliases
 #
   Alias /beg-servlets/   /home/tomcat/lvh/beg-servlets/

 workers2.properties
 ===
 [shm]
 file=/home/apache/logs/shm.file
 size=1048576

 # Alternate file logger
 [logger.file:0]
 level=ERROR
 file=${serverRoot}/logs/jk2.log

 [workerEnv:]
 info=Global server options
 timing=1
 debug=0
 logger=logger.file:0

 # Example socket channel, override port and host.
 [channel.socket:localhost:8009]
 port=8009
 host=127.0.0.1

 # define the worker
 [ajp13:localhost:8009]
 channel=channel.socket:localhost:8009

 #
 # could place the following in httpd.conf with JkUriSet
 #
 [uri:lvh/beg-servlets/servlet/*]
 worker=ajp13:localhost:8009

 [uri:lvh.mdeggers.org/beg-servlets/servlet/*]
 worker=ajp13:localhost:8009

 server.xml
 ==
 !-- local virtual host for testing virtual hosting access --
   Host name=lvh.mdeggers.org debug=0 appBase=/home/tomcat/lvh
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false

 !-- Aliases short name --
 Aliaslvh/Alias

 !-- access log for this virtual host --
 Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs  prefix=lvh-access. suffix=.log
pattern=common resolveHosts=false/

 !-- shared context log for this virtual host --
 Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=lvh. suffix=.log
 timestamp=true/

   /Host

 If the beg-servlets application had jsp files, then I would need to add
 the following lines to workers2.properties.

 [uri:lvh/beg-servlets/*.jsp]
 worker=ajp13:localhost:8009

 [uri:lvh.mdeggers.org/beg-servlets/*.jsp]
 worker=ajp13:localhost:8009

 The above configuration maps all jsp and servlets to Tomcat, while
 letting Apache httpd serve all other files.  I run both httpd and Tomcat
 in the same group (webgroup).  However, each server has its own user id.
 Marking the directories 750, and the files 640 solves the access
 problems.  In a production setting (this is a development server), I
 would probably recommend 550 and 440 for the permissions.  There's
 really no reason to allow write access.

 Alter the above for your host names and virtual host structure.  I run
 three virtual hosts on both httpd and Tomcat.  I am fixing to add ssl to
 this mix sometime in the near future.

 HTH

 /mde/


 -
 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: Help with mod_jk2

2004-10-19 Thread Mark Eggers

 Im trying to do multiple instances on different ports. the jkUriSet worked
 great for the first one, but the second and third dont work. Im ending up
 having to map every extension type in the workers2.properties which seems
 totally wrong.
 
 I will try your technique and see if i can get the second instance runnng
 under ajp13...

John,

I've not tried multiple instances of tomcat under multiple ports.  I'm
running a single instance of Tomcat on the same machine as I run
Apache.  I use virtual hosts in both.  That coupled with putting a
manager application for each virtual host seems to work pretty well.

I have not tried running multiple instances of Tomcat, either from the
same binary or from separate binaries.  I'm not sure this machine could
tolerate that.  I have mysql, postgresql, apache, tomcat with multiple
applications - all on a Dell 8200 with 768 MB of memory.

If you just need virtual hosts, then a a way that works for me is the
following:

httpd.conf
==
VirtualHost *
  ServerName fully.qualified.domain.name
  ServerRoot fully

  DocumentRoot /home/apache/fully

#
# other stuff for this virtual host
#
/VirtualHost

server.xml
===
!-- local virtual host for testing virtual hosting access --
Host name=fully.qualified.domain.name debug=0
  appBase=/home/tomcat/fully
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=false

!-- Aliases short name --
Aliasfully/Alias

!-- access log for this virtual host --
Valve className=org.apache.catalina.valves.AccessLogValve
   directory=logs  prefix=fully-access. suffix=.log
   pattern=common resolveHosts=false/

!-- shared context log for this virtual host --
Logger className=org.apache.catalina.logger.FileLogger
directory=logs  prefix=fully. suffix=.log
timestamp=true/

/Host

And in /home/tomcat/conf/Catalina, I have two subdirectories.

localhost
fully.qualified.domain.name

In these directories go the xml files.  You need balancer.xml. 
manager.xml gives you the manager application.  admin.xml gives you the
administrative application.  I've also put a ROOT.xml in the
fully.qualified.domain.name directory to point to /home/tomcat/fully.

workers2.properties
===
Since I'm running everything on a single host, there's really no need
for me to create multiple workers with different host names.  Everything
is local, and goes through ajp13:localhost:8009.

I suppose if I wanted to improve performance, I could try UNIX sockets. 
Unfortunately, that is not portable across platforms.  Since my goal is
to run identical development/deployment environments on Linux and
Windows, I tend to shy away from using platform-specific capabilities
(UNIX sockets, in-process).

With the exception of directory naming, I can (and do) run the same
environment on both Linux Fedora Core 2 and Windows/2000 Professional.

Add cygwin and a sed script on Windows, and I can convert my Linux
configuration files to Windows.  A similar sed script converts my
Windows configuration files back to Linux.  It's probably time to
rewrite the script in Perl, since managing multiple virtual hosts is
getting to be a bit messy.

Going back to the beginning:

1. What is your overall Tomcat goal?
   a) multiple hosts (real or virtual) ?
   b) load balancing ?

2. What is your overall Apache goal?
   a) static pages ?
   b) Apache httpd-specific functions ?

3. What is your overall environment goal?
   a) Single development or learning?
   b) Development environment?
   c) Model for small or large production site?
   d) Small or large production site?

Answering some of the above questions can help you decide how to
structure your Tomcat/Apache environment.

HTH

/mde/
just my two cents . . .



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



RE: Help with mod_jk2

2004-10-14 Thread Montz, James C. (James Tower)
 Just a simple questions, then an answer.

If you are front-ending Tomcat with a web server, why are you passing
things like .html, .gif, .jpg, etc. to Tomcat to process?  The web
server itself is a bit more efficient in handling this content.

Secondly, what web server front end are you using?

On Apache2/Tomcat4.1/mod_jk2, workers2.properties only defines my
workers, I set URI matching in my Apache Virtual Hosts Config;

Add something similar to the following for each vhost (copy  pasts is a
wonderful thing).

VirtualHost myhost.com:80
...
 Location /*.jsp
JkUriSet worker ajp13:localhost:8201
  /Location
 Location /*.do
JkUriSet worker ajp13:localhost:8201
  /Location
 Location /servlet/*
JkUriSet worker ajp13:localhost:8201
  /Location
 Location /servlets/*
JkUriSet worker ajp13:localhost:8201
  /Location
 Location /WEB-INF/ 
AllowOverride None
deny from all
 /Location
/VirtualHost

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 14, 2004 9:08 AM
To: Tomcat Users List
Subject: Help with mod_jk2 

Hello all,

I have gotten mod_jk2 working just fine for multiple instances of tomcat
and jvm. However, could one of you jk2 experts help me streamline this?
worker2.properties is a pain for each instance. Is there a way to set it
so that all processes are processed by tomcat instead of having the list
every single uri mapping?

Heres example of a set of entries in my workers2.properties for one
instance:
[channel.socket:groupname]
info=ajp13 forwarding to privatejvm.com
debug=0
group=groupname
port=8059
host=localhost

[ajp13:groupname]
channel:channel.socket:groupname
group=groupname

[uri:domain1.com:80/*.html]
group=ajp13:groupname

[uri:domain1.com:80/*.jsp]
group=ajp13:groupname

[uri:domain1.com:80/*.xml]
group=ajp13:groupname

[uri:domain1.com:80/*.do]
group=ajp13:groupname

[uri:domain1.com:80/*.gif]
group=ajp13:groupname

[uri:domain1.com:80/*.jpg]
group=ajp13:groupname

[uri:domain1.com:80/*.png]
group=ajp13:groupname

[uri:domain1.com:80/servlet/*]
group=ajp13:groupname

[uri:domain1.com:80/manager/*]
context=/manager
group=ajp13:groupname

[uri:domain1.com:80/admin/*]
context=/admin
group=ajp13:groupname

[uri:domain1.com:80/servlets-examples/*]
context=/servlets-examples
group=ajp13:groupname

[uri:www.domain1.com:80/*.html]
group=ajp13:groupname

[uri:www.domain1.com:80/*.jsp]
group=ajp13:groupname

[uri:www.domain1.com:80/*.xml]
group=ajp13:groupname

[uri:www.domain1.com:80/*.do]
group=ajp13:groupname

[uri:www.domain1.com:80/*.gif]
group=ajp13:groupname

[uri:www.domain1.com:80/*.jpg]
group=ajp13:groupname

[uri:www.domain1.com:80/*.png]
group=ajp13:groupname

[uri:www.domain1.com:80/servlet/*]
group=ajp13:groupname

[uri:www.domain1.com:80/manager/*]
context=/manager
group=ajp13:groupname

[uri:www.domain1.com:80/admin/*]
context=/admin
group=ajp13:groupname

[uri:www.domain1.com:80/servlets-examples/*]
context=/servlets-examples
group=ajp13:groupname


then I have to do the above for domain2.com with different group name
and
port#

Am I doing this right? It seems like a lot of entries compared to the
old
mod_jk.

Thanks in advance!

John

-
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: Help with mod_jk2

2004-10-14 Thread tomcat
Yes apache. Well, I thought it strange too that it wasnt passing the html,
gif etc unless i added it to the workers2. So I can put this jkUriSet in
the apache file. -nice Ill try this. This is what I did for mod_jk, but
those jkmounts no longer worked in apache2.

Thanks!

John


  Just a simple questions, then an answer.

 If you are front-ending Tomcat with a web server, why are you passing
 things like .html, .gif, .jpg, etc. to Tomcat to process?  The web
 server itself is a bit more efficient in handling this content.

 Secondly, what web server front end are you using?

 On Apache2/Tomcat4.1/mod_jk2, workers2.properties only defines my
 workers, I set URI matching in my Apache Virtual Hosts Config;

 Add something similar to the following for each vhost (copy  pasts is a
 wonderful thing).

 VirtualHost myhost.com:80
 ...
  Location /*.jsp
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /*.do
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /servlet/*
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /servlets/*
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /WEB-INF/ 
 AllowOverride None
 deny from all
  /Location
 /VirtualHost

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 14, 2004 9:08 AM
 To: Tomcat Users List
 Subject: Help with mod_jk2

 Hello all,

 I have gotten mod_jk2 working just fine for multiple instances of tomcat
 and jvm. However, could one of you jk2 experts help me streamline this?
 worker2.properties is a pain for each instance. Is there a way to set it
 so that all processes are processed by tomcat instead of having the list
 every single uri mapping?

 Heres example of a set of entries in my workers2.properties for one
 instance:
 [channel.socket:groupname]
 info=ajp13 forwarding to privatejvm.com
 debug=0
 group=groupname
 port=8059
 host=localhost

 [ajp13:groupname]
 channel:channel.socket:groupname
 group=groupname

 [uri:domain1.com:80/*.html]
 group=ajp13:groupname

 [uri:domain1.com:80/*.jsp]
 group=ajp13:groupname

 [uri:domain1.com:80/*.xml]
 group=ajp13:groupname

 [uri:domain1.com:80/*.do]
 group=ajp13:groupname

 [uri:domain1.com:80/*.gif]
 group=ajp13:groupname

 [uri:domain1.com:80/*.jpg]
 group=ajp13:groupname

 [uri:domain1.com:80/*.png]
 group=ajp13:groupname

 [uri:domain1.com:80/servlet/*]
 group=ajp13:groupname

 [uri:domain1.com:80/manager/*]
 context=/manager
 group=ajp13:groupname

 [uri:domain1.com:80/admin/*]
 context=/admin
 group=ajp13:groupname

 [uri:domain1.com:80/servlets-examples/*]
 context=/servlets-examples
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.html]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.jsp]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.xml]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.do]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.gif]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.jpg]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.png]
 group=ajp13:groupname

 [uri:www.domain1.com:80/servlet/*]
 group=ajp13:groupname

 [uri:www.domain1.com:80/manager/*]
 context=/manager
 group=ajp13:groupname

 [uri:www.domain1.com:80/admin/*]
 context=/admin
 group=ajp13:groupname

 [uri:www.domain1.com:80/servlets-examples/*]
 context=/servlets-examples
 group=ajp13:groupname


 then I have to do the above for domain2.com with different group name
 and
 port#

 Am I doing this right? It seems like a lot of entries compared to the
 old
 mod_jk.

 Thanks in advance!

 John

 -
 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]



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



RE: Help with mod_jk2

2004-10-14 Thread tomcat
Hello,

Using jkUriSet I get this now:
[Thu Oct 14 10:57:32 2004] [notice] uriEnv.setAttribute() the worker
directive is deprecated. Use 'group' instead.

(I removed all the uri mapping for that instance in workers2)

And tomcat isnt getting routed to port 80.

Any ideas?

Thanks!

  Just a simple questions, then an answer.

 If you are front-ending Tomcat with a web server, why are you passing
 things like .html, .gif, .jpg, etc. to Tomcat to process?  The web
 server itself is a bit more efficient in handling this content.

 Secondly, what web server front end are you using?

 On Apache2/Tomcat4.1/mod_jk2, workers2.properties only defines my
 workers, I set URI matching in my Apache Virtual Hosts Config;

 Add something similar to the following for each vhost (copy  pasts is a
 wonderful thing).

 VirtualHost myhost.com:80
 ...
  Location /*.jsp
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /*.do
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /servlet/*
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /servlets/*
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /WEB-INF/ 
 AllowOverride None
 deny from all
  /Location
 /VirtualHost

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 14, 2004 9:08 AM
 To: Tomcat Users List
 Subject: Help with mod_jk2

 Hello all,

 I have gotten mod_jk2 working just fine for multiple instances of tomcat
 and jvm. However, could one of you jk2 experts help me streamline this?
 worker2.properties is a pain for each instance. Is there a way to set it
 so that all processes are processed by tomcat instead of having the list
 every single uri mapping?

 Heres example of a set of entries in my workers2.properties for one
 instance:
 [channel.socket:groupname]
 info=ajp13 forwarding to privatejvm.com
 debug=0
 group=groupname
 port=8059
 host=localhost

 [ajp13:groupname]
 channel:channel.socket:groupname
 group=groupname

 [uri:domain1.com:80/*.html]
 group=ajp13:groupname

 [uri:domain1.com:80/*.jsp]
 group=ajp13:groupname

 [uri:domain1.com:80/*.xml]
 group=ajp13:groupname

 [uri:domain1.com:80/*.do]
 group=ajp13:groupname

 [uri:domain1.com:80/*.gif]
 group=ajp13:groupname

 [uri:domain1.com:80/*.jpg]
 group=ajp13:groupname

 [uri:domain1.com:80/*.png]
 group=ajp13:groupname

 [uri:domain1.com:80/servlet/*]
 group=ajp13:groupname

 [uri:domain1.com:80/manager/*]
 context=/manager
 group=ajp13:groupname

 [uri:domain1.com:80/admin/*]
 context=/admin
 group=ajp13:groupname

 [uri:domain1.com:80/servlets-examples/*]
 context=/servlets-examples
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.html]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.jsp]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.xml]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.do]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.gif]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.jpg]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.png]
 group=ajp13:groupname

 [uri:www.domain1.com:80/servlet/*]
 group=ajp13:groupname

 [uri:www.domain1.com:80/manager/*]
 context=/manager
 group=ajp13:groupname

 [uri:www.domain1.com:80/admin/*]
 context=/admin
 group=ajp13:groupname

 [uri:www.domain1.com:80/servlets-examples/*]
 context=/servlets-examples
 group=ajp13:groupname


 then I have to do the above for domain2.com with different group name
 and
 port#

 Am I doing this right? It seems like a lot of entries compared to the
 old
 mod_jk.

 Thanks in advance!

 John

 -
 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]



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



RE: Help with mod_jk2

2004-10-14 Thread tomcat
Ok I got it working by adding the opening and closing IfModule mod_jk2.c

I didnt think those worked with apache2.

Still have problem, How do you handle the images? Images dont show up. Do
I need to add jkuriset for images?

Thanks you guys have been most helpful!

John

 Hello,

 Using jkUriSet I get this now:
 [Thu Oct 14 10:57:32 2004] [notice] uriEnv.setAttribute() the worker
 directive is deprecated. Use 'group' instead.

 (I removed all the uri mapping for that instance in workers2)

 And tomcat isnt getting routed to port 80.

 Any ideas?

 Thanks!

  Just a simple questions, then an answer.

 If you are front-ending Tomcat with a web server, why are you passing
 things like .html, .gif, .jpg, etc. to Tomcat to process?  The web
 server itself is a bit more efficient in handling this content.

 Secondly, what web server front end are you using?

 On Apache2/Tomcat4.1/mod_jk2, workers2.properties only defines my
 workers, I set URI matching in my Apache Virtual Hosts Config;

 Add something similar to the following for each vhost (copy  pasts is a
 wonderful thing).

 VirtualHost myhost.com:80
 ...
  Location /*.jsp
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /*.do
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /servlet/*
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /servlets/*
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /WEB-INF/ 
 AllowOverride None
 deny from all
  /Location
 /VirtualHost

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 14, 2004 9:08 AM
 To: Tomcat Users List
 Subject: Help with mod_jk2

 Hello all,

 I have gotten mod_jk2 working just fine for multiple instances of tomcat
 and jvm. However, could one of you jk2 experts help me streamline this?
 worker2.properties is a pain for each instance. Is there a way to set it
 so that all processes are processed by tomcat instead of having the list
 every single uri mapping?

 Heres example of a set of entries in my workers2.properties for one
 instance:
 [channel.socket:groupname]
 info=ajp13 forwarding to privatejvm.com
 debug=0
 group=groupname
 port=8059
 host=localhost

 [ajp13:groupname]
 channel:channel.socket:groupname
 group=groupname

 [uri:domain1.com:80/*.html]
 group=ajp13:groupname

 [uri:domain1.com:80/*.jsp]
 group=ajp13:groupname

 [uri:domain1.com:80/*.xml]
 group=ajp13:groupname

 [uri:domain1.com:80/*.do]
 group=ajp13:groupname

 [uri:domain1.com:80/*.gif]
 group=ajp13:groupname

 [uri:domain1.com:80/*.jpg]
 group=ajp13:groupname

 [uri:domain1.com:80/*.png]
 group=ajp13:groupname

 [uri:domain1.com:80/servlet/*]
 group=ajp13:groupname

 [uri:domain1.com:80/manager/*]
 context=/manager
 group=ajp13:groupname

 [uri:domain1.com:80/admin/*]
 context=/admin
 group=ajp13:groupname

 [uri:domain1.com:80/servlets-examples/*]
 context=/servlets-examples
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.html]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.jsp]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.xml]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.do]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.gif]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.jpg]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.png]
 group=ajp13:groupname

 [uri:www.domain1.com:80/servlet/*]
 group=ajp13:groupname

 [uri:www.domain1.com:80/manager/*]
 context=/manager
 group=ajp13:groupname

 [uri:www.domain1.com:80/admin/*]
 context=/admin
 group=ajp13:groupname

 [uri:www.domain1.com:80/servlets-examples/*]
 context=/servlets-examples
 group=ajp13:groupname


 then I have to do the above for domain2.com with different group name
 and
 port#

 Am I doing this right? It seems like a lot of entries compared to the
 old
 mod_jk.

 Thanks in advance!

 John

 -
 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]



 -
 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: Help with mod_jk2

2004-10-14 Thread Montz, James C. (James Tower)
I set the Apache Vhost DocumentRoot to the same directory where the JSP
pages reside;

i.e.

DocumentRoot /home/tomcatapp/webapps/ROOT

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 14, 2004 1:22 PM
To: Tomcat Users List
Subject: RE: Help with mod_jk2

Ok I got it working by adding the opening and closing IfModule
mod_jk2.c

I didnt think those worked with apache2.

Still have problem, How do you handle the images? Images dont show up.
Do
I need to add jkuriset for images?

Thanks you guys have been most helpful!

John

 Hello,

 Using jkUriSet I get this now:
 [Thu Oct 14 10:57:32 2004] [notice] uriEnv.setAttribute() the worker
 directive is deprecated. Use 'group' instead.

 (I removed all the uri mapping for that instance in workers2)

 And tomcat isnt getting routed to port 80.

 Any ideas?

 Thanks!

  Just a simple questions, then an answer.

 If you are front-ending Tomcat with a web server, why are you passing
 things like .html, .gif, .jpg, etc. to Tomcat to process?  The web
 server itself is a bit more efficient in handling this content.

 Secondly, what web server front end are you using?

 On Apache2/Tomcat4.1/mod_jk2, workers2.properties only defines my
 workers, I set URI matching in my Apache Virtual Hosts Config;

 Add something similar to the following for each vhost (copy  pasts
is a
 wonderful thing).

 VirtualHost myhost.com:80
 ...
  Location /*.jsp
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /*.do
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /servlet/*
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /servlets/*
 JkUriSet worker ajp13:localhost:8201
   /Location
  Location /WEB-INF/ 
 AllowOverride None
 deny from all
  /Location
 /VirtualHost

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 14, 2004 9:08 AM
 To: Tomcat Users List
 Subject: Help with mod_jk2

 Hello all,

 I have gotten mod_jk2 working just fine for multiple instances of
tomcat
 and jvm. However, could one of you jk2 experts help me streamline
this?
 worker2.properties is a pain for each instance. Is there a way to set
it
 so that all processes are processed by tomcat instead of having the
list
 every single uri mapping?

 Heres example of a set of entries in my workers2.properties for one
 instance:
 [channel.socket:groupname]
 info=ajp13 forwarding to privatejvm.com
 debug=0
 group=groupname
 port=8059
 host=localhost

 [ajp13:groupname]
 channel:channel.socket:groupname
 group=groupname

 [uri:domain1.com:80/*.html]
 group=ajp13:groupname

 [uri:domain1.com:80/*.jsp]
 group=ajp13:groupname

 [uri:domain1.com:80/*.xml]
 group=ajp13:groupname

 [uri:domain1.com:80/*.do]
 group=ajp13:groupname

 [uri:domain1.com:80/*.gif]
 group=ajp13:groupname

 [uri:domain1.com:80/*.jpg]
 group=ajp13:groupname

 [uri:domain1.com:80/*.png]
 group=ajp13:groupname

 [uri:domain1.com:80/servlet/*]
 group=ajp13:groupname

 [uri:domain1.com:80/manager/*]
 context=/manager
 group=ajp13:groupname

 [uri:domain1.com:80/admin/*]
 context=/admin
 group=ajp13:groupname

 [uri:domain1.com:80/servlets-examples/*]
 context=/servlets-examples
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.html]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.jsp]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.xml]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.do]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.gif]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.jpg]
 group=ajp13:groupname

 [uri:www.domain1.com:80/*.png]
 group=ajp13:groupname

 [uri:www.domain1.com:80/servlet/*]
 group=ajp13:groupname

 [uri:www.domain1.com:80/manager/*]
 context=/manager
 group=ajp13:groupname

 [uri:www.domain1.com:80/admin/*]
 context=/admin
 group=ajp13:groupname

 [uri:www.domain1.com:80/servlets-examples/*]
 context=/servlets-examples
 group=ajp13:groupname


 then I have to do the above for domain2.com with different group name
 and
 port#

 Am I doing this right? It seems like a lot of entries compared to the
 old
 mod_jk.

 Thanks in advance!

 John

 -
 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]



 -
 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]


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



RE: Help with mod_jk2

2004-10-14 Thread Mark Eggers
OK, I'm coming in a little late to this thread.  Here is my
configuration for a typical web application using mod_jk2.so.

I am running this on Fedora Core 2 with httpd 2.0.52 and Tomcat 5.0.28.

httpd.conf
==

#
# general section - for all virtual hosts
#
LoadModule jk2_module modules/mod_jk2.so

#
# particular virtual host
#
VirtualHost *
  ServerName lvh.mdeggers.org
  ServerAlias lvh
  DocumentRoot /home/apache/lvh

  ErrorLog logs/lvh-error.log
  LogLevel warn
  CustomLog logs/lvh-access.log common

#
# Directory for application
#
  Directory /home/tomcat/lvh/beg-servlets
 Options Indexes FollowSymlinks MultiViews
 AllowOverride None
 Order allow,deny
 Allow from 192.168.1
 Allow from 127.0.0.1
  /Directory

  Directory /home/tomcat/lvh/beg-servlets/WEB-INF
AllowOverride None
Deny from all
  /Directory

#
# Aliases
#
  Alias /beg-servlets/   /home/tomcat/lvh/beg-servlets/

workers2.properties
===
[shm]
file=/home/apache/logs/shm.file
size=1048576

# Alternate file logger
[logger.file:0]
level=ERROR
file=${serverRoot}/logs/jk2.log

[workerEnv:]
info=Global server options
timing=1
debug=0
logger=logger.file:0

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

#
# could place the following in httpd.conf with JkUriSet
#
[uri:lvh/beg-servlets/servlet/*]
worker=ajp13:localhost:8009

[uri:lvh.mdeggers.org/beg-servlets/servlet/*]
worker=ajp13:localhost:8009

server.xml
==
!-- local virtual host for testing virtual hosting access --
  Host name=lvh.mdeggers.org debug=0 appBase=/home/tomcat/lvh
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

!-- Aliases short name --
Aliaslvh/Alias

!-- access log for this virtual host --
Valve className=org.apache.catalina.valves.AccessLogValve
   directory=logs  prefix=lvh-access. suffix=.log
   pattern=common resolveHosts=false/

!-- shared context log for this virtual host --
Logger className=org.apache.catalina.logger.FileLogger
directory=logs  prefix=lvh. suffix=.log
timestamp=true/

  /Host

If the beg-servlets application had jsp files, then I would need to add
the following lines to workers2.properties.

[uri:lvh/beg-servlets/*.jsp]
worker=ajp13:localhost:8009

[uri:lvh.mdeggers.org/beg-servlets/*.jsp]
worker=ajp13:localhost:8009

The above configuration maps all jsp and servlets to Tomcat, while
letting Apache httpd serve all other files.  I run both httpd and Tomcat
in the same group (webgroup).  However, each server has its own user id.
Marking the directories 750, and the files 640 solves the access
problems.  In a production setting (this is a development server), I
would probably recommend 550 and 440 for the permissions.  There's
really no reason to allow write access.

Alter the above for your host names and virtual host structure.  I run
three virtual hosts on both httpd and Tomcat.  I am fixing to add ssl to
this mix sometime in the near future.

HTH

/mde/


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



Re: Help with mod_jk2 + Coyote connector + Apache 2 + TC 4.1.24

2003-07-31 Thread Eric J. Pinnell
Hi,

Try playing with the connectionTimout setting in your server.xml.  By
default it is set at 0.  Try using 12.  Also experiment with -1.

I have found that the connector resets every once in a while with a 0.
With 12 the connection doesn't reset but times out.

I have heard that a -1 means it niether times out or resets, but I haven't
tried it.

-e

On Thu, 31 Jul 2003, Mauricio [iso-8859-1] Nuñez wrote:

 Hi

 Someone can help me, please

 My configuration is the following:

 1) load balancer ( Hardware )
 2) 2 Apache2 using mod_jk2 (RedHat 9)
 3) 2 Tomcat4 listen at 8009 using Coyote Connector (RedHat 9) jdk sun 1.4.2
 4) 1 Mysql server. (Redhat 7.2 , Mysql 4.0.13)

 Our monitor alerts about a 15s timeout after 2-3 hours of activity, but i
 can't get the exact problem. Any help, tip, solution, etc :-)
 The Apaches show MaxClients rearched, but incrementing this number not seem a
 good idea.
 The workaround is reboot Tomcats, to release the connections ajp13, but i need
 a better solution

 TIA

 Mauricio


 From my httpd.conf

 IfModule worker.c
 ServerLimit 16
 StartServers 2
 MaxClients 400
 MinSpareThreads 25
 MaxSpareThreads 75
 ThreadsPerChild 25
 MaxRequestsPerChild  0
 /IfModule

 From my workers2.properties:

 [channel.apr:tomcat5]
 tomcatId=tomcat5
 port=8009
 host=10.0.0.22
 timeout=2
 group=lb

 [channel.apr:tomcat6]
 tomcatId=tomcat6
 port=8009
 host=10.0.0.23
 timeout=2
 group=lb

 [lb:lb]
 timeout=5
 recovery=30
 attempts=2
 debug=0

 From my server.xml

 Connector
 className=org.apache.coyote.tomcat4.CoyoteConnector
 port=8009 minProcessors=5 maxProcessors=512
 enableLookups=false redirectPort=8443
 acceptCount=100 debug=0 connectionTimeout=0
 useURIValidationHack=false
 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/









 -
 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: Help with mod_jk2 + Coyote connector + Apache 2 + TC 4.1.24

2003-07-31 Thread Mauricio Nuñez
Thanks. Yesterday i change thats setting from 1 to 0, assuming the 
persistence of the ajp13 protocol. I'll try your suggestion.

I'll try with jvm bea jrockit also. 

12 = 2 min.
That's mean 2 min of inactivity?

Someone can explain how analize data from a kill -3 ( thread dump ) .
I can see nothing rare.

TIA

Mauricio


El Jue 31 Jul 2003 12:30, Eric J. Pinnell escribió:
 Hi,

 Try playing with the connectionTimout setting in your server.xml.  By
 default it is set at 0.  Try using 12.  Also experiment with -1.

 I have found that the connector resets every once in a while with a 0.
 With 12 the connection doesn't reset but times out.

 I have heard that a -1 means it niether times out or resets, but I haven't
 tried it.

 -e

 On Thu, 31 Jul 2003, Mauricio [iso-8859-1] Nuñez wrote:
  Hi
 
  Someone can help me, please
 
  My configuration is the following:
 
  1) load balancer ( Hardware )
  2) 2 Apache2 using mod_jk2 (RedHat 9)
  3) 2 Tomcat4 listen at 8009 using Coyote Connector (RedHat 9) jdk sun
  1.4.2 4) 1 Mysql server. (Redhat 7.2 , Mysql 4.0.13)
 
  Our monitor alerts about a 15s timeout after 2-3 hours of activity, but i
  can't get the exact problem. Any help, tip, solution, etc :-)
  The Apaches show MaxClients rearched, but incrementing this number not
  seem a good idea.
  The workaround is reboot Tomcats, to release the connections ajp13, but i
  need a better solution
 
  TIA
 
  Mauricio
 
 
  From my httpd.conf
 
  IfModule worker.c
  ServerLimit 16
  StartServers 2
  MaxClients 400
  MinSpareThreads 25
  MaxSpareThreads 75
  ThreadsPerChild 25
  MaxRequestsPerChild  0
  /IfModule
 
  From my workers2.properties:
 
  [channel.apr:tomcat5]
  tomcatId=tomcat5
  port=8009
  host=10.0.0.22
  timeout=2
  group=lb
 
  [channel.apr:tomcat6]
  tomcatId=tomcat6
  port=8009
  host=10.0.0.23
  timeout=2
  group=lb
 
  [lb:lb]
  timeout=5
  recovery=30
  attempts=2
  debug=0
 
  From my server.xml
 
  Connector
  className=org.apache.coyote.tomcat4.CoyoteConnector
  port=8009 minProcessors=5 maxProcessors=512
  enableLookups=false redirectPort=8443
  acceptCount=100 debug=0 connectionTimeout=0
  useURIValidationHack=false
  protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/
 
 
 
 
 
 
 
 
 
  -
  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]


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



Re: Help with mod_jk2 + Coyote connector + Apache 2 + TC 4.1.24

2003-07-31 Thread Eric J. Pinnell
 Someone can explain how analize data from a kill -3 ( thread dump ) .
 I can see nothing rare.


Google for this.  You could write a book about this subject and I don't
think this is the right place to do it.

Basically it's used to see if threads are blocked or hanging on a piece of
code.  If you are experiencing this you will notice that you have a bunch
of threads all stuck in one place and then one that's just a little bit
further along.  Typically that's the one all the other threads are waiting
on to finish up whatever it's doing so they can move forward.  Find out
what it's doing and debug that code/DB call/whatever.

-e

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



Re: Help: JNI, mod_jk2 , Apache 2 not working

2003-02-11 Thread liug
Another happy Microsoft Windows user :)
I tried exactly same config as you did (see my other post) but
it just doesn't want to work on Linux :(

Frank

Rahul Bhargava [EMAIL PROTECTED] wrote:
 Found my problem after building a debug build of mod_jk2 and going thru the
 debugger. It
 was failing to create a shm slot b'cos I didn't have a shm config block!!
 Even though I was not
 running a multi-proc server, just a single proc yet ...#4%^
 documentation...

 [shm:]
 info=Scoreboard. Required for reconfiguration and status with multiprocess
 servers
 file=${serverRoot}/logs/jk2.shm
 size=100
 debug=99
 disabled=0

 _
 Rahul Bhargava
 - Original Message -
 From: Robo code [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Saturday, February 08, 2003 10:45 PM
 Subject: RE: Help: JNI, mod_jk2 , Apache 2 not working


 |
 | Hi Jimmy,
 |
 | I have solved some of the problems you are facing. I can get Apache
 | to startTomcat via JNI cleanly. The TomcatStarter problem was solved
 | by putting $TOMCAT/bin/tomcat-jni.jar on the path. I have couple
 | of startup servlets which were correctly loaded. I use Cactus so had
 | to put the log4j*.jar on $TOMCAT/server/lib, once I did that all
 | my startup servlets came up fine.
 |
 | But when I hit Apache with a request meant for a Tomcat hosted
 JSP/Servlet,
 | I get the error below. I tried Apache 2.0.43 since the
 | pre-built mod_jk2.dll on Tomcat site was compiled with 2.0.43 and I
 | get the same error. Attached are the jk2 and worker2 files.
 |
 | Note standalone Tomcat works fine with the web.xml etc. So the culprit
 | must be worker2 or jk2 properties file. Can't seem to find any docs
 | on the syntax of these two files. Can you send your files. Mine
 | are attached.
 |
 | No matter what I do, always the same msg in Apache errors.log. Close
 | to giving up on jk2 and planning on trying jk or mod_webapps. It
 | seems most people are not running Apache2+TC4 in-process. I would hate
 | to loose performance by going out of process, but if none of the JNI
 | modes work that I guess will be the last resort
 |
 | [rahul@PC653933 ~/1Apache2/logs]$ tail -f error.log
 | [Sat Feb 08 22:33:14 2003] [notice] Parent: Created child process 3380
 | [Sat Feb 08 22:33:14 2003] [error] shm.init(): No file
 | [Sat Feb 08 22:33:14 2003] [notice] Child 3380: Child process is running
 | [Sat Feb 08 22:33:17 2003] [error] shm.init(): No file
 | [Sat Feb 08 22:33:17 2003] [error] mod_jk child init 1 0
 | [Sat Feb 08 22:33:17 2003] [notice] Child 3380: Acquired the start mutex.
 | [Sat Feb 08 22:33:17 2003] [notice] Child 3380: Starting 250 worker
 threads.
 | 0 [Thread-1] INFO modeler.Registry  - Loading registry information
 | 30 [Thread-1] INFO modeler.Registry  - Creating new Registry instance
 | 812 [Thread-1] INFO modeler.Registry  - Creating MBeanServer
 | [Sat Feb 08 22:34:33 2003] [error] workerEnv.init() create slot epStat.0
 | failed
 | [Sat Feb 08 22:34:34 2003] [error] lb.service() worker failed 12 for
 | ajp13:j
 | ni
 | [Sat Feb 08 22:34:34 2003] [error] lb.service() unrecoverable error...
 | [Sat Feb 08 22:34:34 2003] [error] mod_jk.handler() Error connecting to
 | tomcat 1
 | 2
 |
 | Thanks,
 | Rahul.
 |
 | From: jcubic [EMAIL PROTECTED]
 | Reply-To: Tomcat Users List [EMAIL PROTECTED]
 | To: Tomcat Users List [EMAIL PROTECTED]
 | Subject: RE: Help: JNI, mod_jk2 , Apache 2 not working
 | Date: Sat, 8 Feb 2003 10:59:23 -0800
 | 
 | I just got Apache 2.0.44 and Tomat 4.1 working with a little twist. I
 think
 | we are trying to accomplish the same thing. I think server.xml is not the
 | culprit. jk2.properties and worker2.properties are. Also web.xml in
 Tomcat
 | home as well as the webapp could affect servlet and jps execution. What
 do
 | your jk2.properties and worker2.propeties look like?
 | 
 | My problem is that I cannot get Tomcat fired up properly from Apache
 | without
 | first running Tomcat manually. I keep on getting 'HTTP Status 503 -
 Servlet
 | invoker is currently unavailable' error if I don't run Tomcat first. Of
 | course this would defeat the purpose of using Tomcat as worker from
 Apache.
 | 
 | My other problem is that I cannot get org/apache/jk/apr/TomcatStarter
 | started properly unless I specify whole bunch of jar files using
 classpath
 | in [vm:] directory. It looks like jvm that Apache runs have trouble with
 | class path in my environment. But I don't know how to set it. I am
 | interested in knowing how you get TomcatStarter working.
 | 
 | Other than those 2 problems, my Apache can serve up html, jsp, as well as
 | servlet in my webapp fine.
 | 
 | Jimmy
 | Redmond, Washington
 | 
 | 
 | [jcubic]  -Original Message-
 | From: Rahul Bhargava [mailto:[EMAIL PROTECTED]]
 | Sent: Saturday, February 08, 2003 8:59 AM
 | To: [EMAIL PROTECTED]
 | Subject: Help: JNI, mod_jk2 , Apache 2 not working
 | 
 | 
 |Re-posting with the relevant files attached.
 | 
 |Keep

Re: Help: JNI, mod_jk2 , Apache 2 not working

2003-02-09 Thread Rahul Bhargava
Found my problem after building a debug build of mod_jk2 and going thru the
debugger. It
was failing to create a shm slot b'cos I didn't have a shm config block!!
Even though I was not
running a multi-proc server, just a single proc yet ...#4%^
documentation...

[shm:]
info=Scoreboard. Required for reconfiguration and status with multiprocess
servers
file=${serverRoot}/logs/jk2.shm
size=100
debug=99
disabled=0

_
Rahul Bhargava
- Original Message -
From: Robo code [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, February 08, 2003 10:45 PM
Subject: RE: Help: JNI, mod_jk2 , Apache 2 not working


|
| Hi Jimmy,
|
| I have solved some of the problems you are facing. I can get Apache
| to startTomcat via JNI cleanly. The TomcatStarter problem was solved
| by putting $TOMCAT/bin/tomcat-jni.jar on the path. I have couple
| of startup servlets which were correctly loaded. I use Cactus so had
| to put the log4j*.jar on $TOMCAT/server/lib, once I did that all
| my startup servlets came up fine.
|
| But when I hit Apache with a request meant for a Tomcat hosted
JSP/Servlet,
| I get the error below. I tried Apache 2.0.43 since the
| pre-built mod_jk2.dll on Tomcat site was compiled with 2.0.43 and I
| get the same error. Attached are the jk2 and worker2 files.
|
| Note standalone Tomcat works fine with the web.xml etc. So the culprit
| must be worker2 or jk2 properties file. Can't seem to find any docs
| on the syntax of these two files. Can you send your files. Mine
| are attached.
|
| No matter what I do, always the same msg in Apache errors.log. Close
| to giving up on jk2 and planning on trying jk or mod_webapps. It
| seems most people are not running Apache2+TC4 in-process. I would hate
| to loose performance by going out of process, but if none of the JNI
| modes work that I guess will be the last resort
|
| [rahul@PC653933 ~/1Apache2/logs]$ tail -f error.log
| [Sat Feb 08 22:33:14 2003] [notice] Parent: Created child process 3380
| [Sat Feb 08 22:33:14 2003] [error] shm.init(): No file
| [Sat Feb 08 22:33:14 2003] [notice] Child 3380: Child process is running
| [Sat Feb 08 22:33:17 2003] [error] shm.init(): No file
| [Sat Feb 08 22:33:17 2003] [error] mod_jk child init 1 0
| [Sat Feb 08 22:33:17 2003] [notice] Child 3380: Acquired the start mutex.
| [Sat Feb 08 22:33:17 2003] [notice] Child 3380: Starting 250 worker
threads.
| 0 [Thread-1] INFO modeler.Registry  - Loading registry information
| 30 [Thread-1] INFO modeler.Registry  - Creating new Registry instance
| 812 [Thread-1] INFO modeler.Registry  - Creating MBeanServer
| [Sat Feb 08 22:34:33 2003] [error] workerEnv.init() create slot epStat.0
| failed
| [Sat Feb 08 22:34:34 2003] [error] lb.service() worker failed 12 for
| ajp13:j
| ni
| [Sat Feb 08 22:34:34 2003] [error] lb.service() unrecoverable error...
| [Sat Feb 08 22:34:34 2003] [error] mod_jk.handler() Error connecting to
| tomcat 1
| 2
|
| Thanks,
| Rahul.
|
| From: jcubic [EMAIL PROTECTED]
| Reply-To: Tomcat Users List [EMAIL PROTECTED]
| To: Tomcat Users List [EMAIL PROTECTED]
| Subject: RE: Help: JNI, mod_jk2 , Apache 2 not working
| Date: Sat, 8 Feb 2003 10:59:23 -0800
| 
| I just got Apache 2.0.44 and Tomat 4.1 working with a little twist. I
think
| we are trying to accomplish the same thing. I think server.xml is not the
| culprit. jk2.properties and worker2.properties are. Also web.xml in
Tomcat
| home as well as the webapp could affect servlet and jps execution. What
do
| your jk2.properties and worker2.propeties look like?
| 
| My problem is that I cannot get Tomcat fired up properly from Apache
| without
| first running Tomcat manually. I keep on getting 'HTTP Status 503 -
Servlet
| invoker is currently unavailable' error if I don't run Tomcat first. Of
| course this would defeat the purpose of using Tomcat as worker from
Apache.
| 
| My other problem is that I cannot get org/apache/jk/apr/TomcatStarter
| started properly unless I specify whole bunch of jar files using
classpath
| in [vm:] directory. It looks like jvm that Apache runs have trouble with
| class path in my environment. But I don't know how to set it. I am
| interested in knowing how you get TomcatStarter working.
| 
| Other than those 2 problems, my Apache can serve up html, jsp, as well as
| servlet in my webapp fine.
| 
| Jimmy
| Redmond, Washington
| 
| 
| [jcubic]  -Original Message-
| From: Rahul Bhargava [mailto:[EMAIL PROTECTED]]
| Sent: Saturday, February 08, 2003 8:59 AM
| To: [EMAIL PROTECTED]
| Subject: Help: JNI, mod_jk2 , Apache 2 not working
| 
| 
|Re-posting with the relevant files attached.
| 
|Keep getting the error  from mod_jk2 about Error connecting to tomcat
| 12.
| 
|Using Apache 2.0.44 with Tomcat 4.1.18 on Win2K. Checked my config
1000
| times everything looks
|good. Is this a know issue ? Is there ant doc/reference on
| workers2.properties ?
| 
|Attached are my config files

RE: Help: JNI, mod_jk2 , Apache 2 not working

2003-02-08 Thread jcubic
I just got Apache 2.0.44 and Tomat 4.1 working with a little twist. I think
we are trying to accomplish the same thing. I think server.xml is not the
culprit. jk2.properties and worker2.properties are. Also web.xml in Tomcat
home as well as the webapp could affect servlet and jps execution. What do
your jk2.properties and worker2.propeties look like?

My problem is that I cannot get Tomcat fired up properly from Apache without
first running Tomcat manually. I keep on getting 'HTTP Status 503 - Servlet
invoker is currently unavailable' error if I don't run Tomcat first. Of
course this would defeat the purpose of using Tomcat as worker from Apache.

My other problem is that I cannot get org/apache/jk/apr/TomcatStarter
started properly unless I specify whole bunch of jar files using classpath
in [vm:] directory. It looks like jvm that Apache runs have trouble with
class path in my environment. But I don't know how to set it. I am
interested in knowing how you get TomcatStarter working.

Other than those 2 problems, my Apache can serve up html, jsp, as well as
servlet in my webapp fine.

Jimmy
Redmond, Washington


[jcubic]  -Original Message-
From: Rahul Bhargava [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 08, 2003 8:59 AM
To: [EMAIL PROTECTED]
Subject: Help: JNI, mod_jk2 , Apache 2 not working


  Re-posting with the relevant files attached.

  Keep getting the error  from mod_jk2 about Error connecting to tomcat
12.

  Using Apache 2.0.44 with Tomcat 4.1.18 on Win2K. Checked my config 1000
times everything looks
  good. Is this a know issue ? Is there ant doc/reference on
workers2.properties ?

  Attached are my config files.

  [Sat Feb 08 00:14:04 2003] [notice] Parent: Created child process 3316
  Apache.exe: Could not determine the server's fully qualified domain name,
using
  192.168.1.2 for ServerName
  [Sat Feb 08 00:14:04 2003] [error] shm.init(): No file
  [Sat Feb 08 00:14:04 2003] [notice] Child 3316: Child process is running
  [Sat Feb 08 00:14:04 2003] [notice] jk2_init() Found child 3316 in
scoreboard sl
  ot 0
  [Sat Feb 08 00:14:04 2003] [notice] vm.init(): Jni lib: C:\Program
Files\Java\j2
  re1.4.1_01\bin\client\jvm.dll
  [Sat Feb 08 00:14:04 2003] [notice] vm.open2() done
  [Sat Feb 08 00:14:04 2003] [notice] jni.validate() class=
org/apache/jk/apr/Tomc
  atStarter
  [Sat Feb 08 00:14:04 2003] [notice] Loaded org/apache/jk/apr/TomcatStarter
  [Sat Feb 08 00:14:05 2003] [notice] jni.init() setting
stdout=C:/servers/Apache2
  /logs/stdout.log...
  [Sat Feb 08 00:14:05 2003] [notice] jni.init() setting
stderr=C:/servers/Apache2
  /logs/stderr.log...
  [Sat Feb 08 00:14:05 2003] [notice] jni.init() ARG start
  [Sat Feb 08 00:14:05 2003] [notice] jni.init() calling main()...
  [Sat Feb 08 00:14:05 2003] [notice] jni.validate() class=
org/apache/jk/apr/Tomc
  atStarter
  [Sat Feb 08 00:14:05 2003] [notice] Loaded org/apache/jk/apr/TomcatStarter
  [Sat Feb 08 00:14:05 2003] [notice] jni.init() disabling the non init hook
worker
  [Sat Feb 08 00:14:05 2003] [error] shm.init(): No file
  [Sat Feb 08 00:14:05 2003] [notice] workerEnv.init() ok
C:/servers/Apache2/conf/
  workers2.properties
  [Sat Feb 08 00:14:06 2003] [error] mod_jk child init 1 0
  [Sat Feb 08 00:14:06 2003] [notice] Child 3316: Acquired the start mutex.
  [Sat Feb 08 00:14:06 2003] [notice] Child 3316: Starting 250 worker
threads.
  [Sat Feb 08 00:14:45 2003] [error] workerEnv.init() create slot epStat.0
failed
  [Sat Feb 08 00:14:45 2003] [error] lb.service() worker failed 12 for
ajp13:j
  ni
  [Sat Feb 08 00:14:45 2003] [error] lb.service() unrecoverable error...
  [Sat Feb 08 00:14:45 2003] [notice] vm.detach() ok
  [Sat Feb 08 00:14:45 2003] [error] mod_jk.handler() Error connecting to
tomcat 1
  2
  [Sat Feb 08 00:14:47 2003] [notice] lb.getWorker() All workers in error
state, u
  se the one with oldest error
  [Sat Feb 08 00:14:47 2003] [error] workerEnv.init() create slot epStat.0
failed
  [Sat Feb 08 00:14:47 2003] [error] lb.service() worker failed 12 for
ajp13:j
  ni
  [Sat Feb 08 00:14:47 2003] [error] lb.service() unrecoverable error...
  [Sat Feb 08 00:14:47 2003] [notice] vm.detach() ok
  [Sat Feb 08 00:14:47 2003] [error] mod_jk.handler() Error connecting to
tomcat 1
  2
  __

  _
  Rahul Bhargava



RE: Help: JNI, mod_jk2 , Apache 2 not working

2003-02-08 Thread Robo code

Hi Jimmy,

I have solved some of the problems you are facing. I can get Apache
to startTomcat via JNI cleanly. The TomcatStarter problem was solved
by putting $TOMCAT/bin/tomcat-jni.jar on the path. I have couple
of startup servlets which were correctly loaded. I use Cactus so had
to put the log4j*.jar on $TOMCAT/server/lib, once I did that all
my startup servlets came up fine.

But when I hit Apache with a request meant for a Tomcat hosted JSP/Servlet, 
I get the error below. I tried Apache 2.0.43 since the
pre-built mod_jk2.dll on Tomcat site was compiled with 2.0.43 and I
get the same error. Attached are the jk2 and worker2 files.

Note standalone Tomcat works fine with the web.xml etc. So the culprit
must be worker2 or jk2 properties file. Can't seem to find any docs
on the syntax of these two files. Can you send your files. Mine
are attached.

No matter what I do, always the same msg in Apache errors.log. Close
to giving up on jk2 and planning on trying jk or mod_webapps. It
seems most people are not running Apache2+TC4 in-process. I would hate
to loose performance by going out of process, but if none of the JNI
modes work that I guess will be the last resort

[rahul@PC653933 ~/1Apache2/logs]$ tail -f error.log
[Sat Feb 08 22:33:14 2003] [notice] Parent: Created child process 3380
[Sat Feb 08 22:33:14 2003] [error] shm.init(): No file
[Sat Feb 08 22:33:14 2003] [notice] Child 3380: Child process is running
[Sat Feb 08 22:33:17 2003] [error] shm.init(): No file
[Sat Feb 08 22:33:17 2003] [error] mod_jk child init 1 0
[Sat Feb 08 22:33:17 2003] [notice] Child 3380: Acquired the start mutex.
[Sat Feb 08 22:33:17 2003] [notice] Child 3380: Starting 250 worker threads.
0 [Thread-1] INFO modeler.Registry  - Loading registry information
30 [Thread-1] INFO modeler.Registry  - Creating new Registry instance
812 [Thread-1] INFO modeler.Registry  - Creating MBeanServer
[Sat Feb 08 22:34:33 2003] [error] workerEnv.init() create slot epStat.0 
failed
[Sat Feb 08 22:34:34 2003] [error] lb.service() worker failed 12 for 
ajp13:j
ni
[Sat Feb 08 22:34:34 2003] [error] lb.service() unrecoverable error...
[Sat Feb 08 22:34:34 2003] [error] mod_jk.handler() Error connecting to 
tomcat 1
2

Thanks,
Rahul.

From: jcubic [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: RE: Help: JNI, mod_jk2 , Apache 2 not working
Date: Sat, 8 Feb 2003 10:59:23 -0800

I just got Apache 2.0.44 and Tomat 4.1 working with a little twist. I think
we are trying to accomplish the same thing. I think server.xml is not the
culprit. jk2.properties and worker2.properties are. Also web.xml in Tomcat
home as well as the webapp could affect servlet and jps execution. What do
your jk2.properties and worker2.propeties look like?

My problem is that I cannot get Tomcat fired up properly from Apache 
without
first running Tomcat manually. I keep on getting 'HTTP Status 503 - Servlet
invoker is currently unavailable' error if I don't run Tomcat first. Of
course this would defeat the purpose of using Tomcat as worker from Apache.

My other problem is that I cannot get org/apache/jk/apr/TomcatStarter
started properly unless I specify whole bunch of jar files using classpath
in [vm:] directory. It looks like jvm that Apache runs have trouble with
class path in my environment. But I don't know how to set it. I am
interested in knowing how you get TomcatStarter working.

Other than those 2 problems, my Apache can serve up html, jsp, as well as
servlet in my webapp fine.

Jimmy
Redmond, Washington


[jcubic]  -Original Message-
From: Rahul Bhargava [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 08, 2003 8:59 AM
To: [EMAIL PROTECTED]
Subject: Help: JNI, mod_jk2 , Apache 2 not working


  Re-posting with the relevant files attached.

  Keep getting the error  from mod_jk2 about Error connecting to tomcat
12.

  Using Apache 2.0.44 with Tomcat 4.1.18 on Win2K. Checked my config 1000
times everything looks
  good. Is this a know issue ? Is there ant doc/reference on
workers2.properties ?

  Attached are my config files.

  [Sat Feb 08 00:14:04 2003] [notice] Parent: Created child process 3316
  Apache.exe: Could not determine the server's fully qualified domain 
name,
using
  192.168.1.2 for ServerName
  [Sat Feb 08 00:14:04 2003] [error] shm.init(): No file
  [Sat Feb 08 00:14:04 2003] [notice] Child 3316: Child process is running
  [Sat Feb 08 00:14:04 2003] [notice] jk2_init() Found child 3316 in
scoreboard sl
  ot 0
  [Sat Feb 08 00:14:04 2003] [notice] vm.init(): Jni lib: C:\Program
Files\Java\j2
  re1.4.1_01\bin\client\jvm.dll
  [Sat Feb 08 00:14:04 2003] [notice] vm.open2() done
  [Sat Feb 08 00:14:04 2003] [notice] jni.validate() class=
org/apache/jk/apr/Tomc
  atStarter
  [Sat Feb 08 00:14:04 2003] [notice] Loaded 
org/apache/jk/apr/TomcatStarter
  [Sat Feb 08 00:14:05 2003] [notice] jni.init() setting
stdout=C:/servers/Apache2
  /logs/stdout.log...
  [Sat Feb 08 00:14