servlet benchmarking vs cgi

2002-11-08 Thread Aryeh Katz
I have an apache module that interacts with the cgi environment (even going 
as far as exec'ing a cgi), and I just migrated this to a servlet in the hopes of 
improving performance.
Unfortunately, using ab to benchmark, the cgi won hands down. Performance 
in the servlet was 10 times worse (assuming 10 concurrent requests). This 
was also true when I requested the servlet from tomcat directly, although 
there was a SLIGHT improvement (only 6 times worse)

And yes, I am using some synchronized methods, but they should be very 
fast (if (val != null) return; else myval = val).

No database calls here, just simple cgi processing to render a page. Does 
anyone have any thoughts on how/where to look in improving the servlet's 
performance?
I am using apache 1.3.27, with mod_jk 1.2.1 beta, and tomcat 4.0.6.
---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: servlet benchmarking vs cgi

2002-11-08 Thread Aryeh Katz
 
 without more details about what the CGI and servlets do, it's going to
 be really hard for others to say how to improve or fix the
 performance.
OK. We have a security module that will draw a login screen under certain 
situations (not based on basic auth).
In order to accommodate customer look and feel, the login page is written as 
a CGI, so nobody is locked in to a particular login page.
 
 If you're doing tons of regexp in your CGI to do string templating,
 then the answer if obvious. perl regexp is screaming fast and trying
 to do string parsing in a servlet is not what it was designed to do.
Most of the time it's just a matter of constructing HTML code based on 
headers and cgi (and servlet equivalent) environment vars. Then send the 
page to the user as part of HttpServletResponse.
After the first time the page is generated, it is cached in the servlet to save 
processing calls.
Frankly, I tried to keep object creation to a minimum, used StringBuffers to 
append, and globals to store. Based on what has to be done, I think I coded 
efficiently.
I know I can/should use velocity for the same thing, but I'm hesitant to invest 
too much effort if I can't deploy due to performance reasons.
One more update, just to take threading out of the picture. Even with one 
request at a time, servlet performance was atrocious

Cgi
Time per request:   7.25 [ms] (mean)
Servlet
Time per request:   44.22 [ms] (mean)

---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: servlet benchmarking vs cgi

2002-11-08 Thread Aryeh Katz

 the question is, how are you constructing the HTML?  Are you opening a
 template file locally, and then using string replace? Or are you using
 XSL/XSLT with a stylesheet to do a stream parse/transform?
Neither.
Since I'm working with a simple login page, most of my text is strings, 
appended to a stringbuffer to create the login page.
That login page is then saved as a global, and retrieved for all subsequent 
requests.
The information that is unique in every user's request (one string)
is modified with a StringBuffer.replace in a tag that is recorded as part of the 
global login page.
output is done using the following psuedo code
is page cached
StringBuffer = cached page
replace tag
println(stringbuffer)
println(end of html page) (/FORM/HTML)

 What kind of system was the benchmark performed on. The page should
 only take 7-10ms properly written.  If you're never going to get more
 than 10 concurrent requests, you're probably not going to reach the
 point where threads provide benefit. Especially if it's pages that do
 not use databases or perform other processes which benefit from
 threading.

ab was on a freebsd box, servlet was on a redhat 6.2. As far as concurrent 
requests, I've got to be able to handle close to 100 requests, but as I said 
earlier I don't think threading is the issue as even single requests show very 
poor performance relative to a CGI.
Aryeh
---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: servlet benchmarking vs cgi

2002-11-08 Thread Aryeh Katz
  One more update, just to take threading out of the picture. Even
  with one request at a time, servlet performance was atrocious
 
  Cgi
  Time per request:   7.25 [ms] (mean)
  Servlet
  Time per request:   44.22 [ms] (mean)
 
 
 That's only 22 req/s. Either your servlet is really resource intensive
 (although you think it's not), or either there's a problem somewhere.
 
You forget one thing. I do have my own apache module in the middle, which 
is going to degrade performance (and yes, the cgi benchmarking was with 
my module in place).

 Did you try getting the max throughtput using another servlet ? If
 there's a performance problem with your servlet, you could use
 something like OptimizeIt to figure it improve it.
 
Thanks, I'll try it out.
Aryeh

---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: servlet benchmarking vs cgi

2002-11-08 Thread Aryeh Katz
 why are you not using JSP then.  this is what its designed for

The servlet doesn't just handle login. Login is just called most often, and is 
most expensive. 

---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: servlet benchmarking vs cgi

2002-11-08 Thread Aryeh Katz
 Did you try getting the max throughtput using another servlet ? If
 there's a performance problem with your servlet, you could use
 something like OptimizeIt to figure it improve it.
I downloaded OptimizeIt, ran it on my servlet and ran ab.
As expected most of the CPU time was in the AJP stuff, and most of the 
AJP stuff was in my servlet.
However, the majority of the processing being done was PrintWriter.flush. 
Contrary to some of the other posts here, I didn't see anything in 
StringBuffer.replace.
I'm basing this on the CPU profiler. If there is something else I should look at, 
please let me know.
Aryeh


---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: determining version of mod_jk

2002-11-06 Thread Aryeh Katz

 how can you tell what version of mod_jk you have installed on your
 system?

see jk/native/common/jk_version.h


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: determining version of mod_jk

2002-11-06 Thread Aryeh Katz
 how can you tell what version of mod_jk you have installed on your
 system?
One more way.
Unless you've changed the defaults, it will print the mod_jk version in (the 
apache) error_log on server startup

---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




RE: [Installation] silent install

2002-11-05 Thread Aryeh Katz
 I didn't author this original email, but I asked an earlier question
 regarding silent installs.  I am looking for functionality similar to
 the Java silent install listed here:
I assumed that's what the OP meant, until they added that they wanted
this for UNIX. Last I checked, install shield was a windows product. In which
case, the OP is going to have to be more specific (or follow John's advice re
shell scripts).
 http://java.sun.com/j2se/1.4/docs/guide/plugin/developer_guide/silent.
 html

 Tony

 -Original Message-
 From: Turner, John [mailto:JTurner;AAS.com]
 Sent: Tuesday, November 05, 2002 12:23 PM
 To: 'Tomcat Users List'
 Subject: RE: [Installation] silent install



 What do you mean by silent?

 John


  -Original Message-
  From: François Vallet [mailto:fvallet;infovista.com]
  Sent: Tuesday, November 05, 2002 12:05 PM
  To: 'Tomcat Users List'
  Subject: [Installation] silent install
 
 
  Who have been succeed to create a silent install of tomcat on
  both windows
  and Unix !
 
  Thanks in advance
 
  --
  To unsubscribe, e-mail:
  mailto:tomcat-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:tomcat-user-help;jakarta.apache.org
 

 --
 To unsubscribe, e-mail:
 mailto:tomcat-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
 mailto:tomcat-user-help;jakarta.apache.org


 --
 To unsubscribe, e-mail:
 mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional
 commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org



---
Aryeh Katz
VASCO
www.vasco.com


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: Installing and using manager app in 4.1.12

2002-11-05 Thread Aryeh Katz
snip
 
 The result is a blank white page and an error message that says FAIL
 - Unknown command /.
 
You're not missing anything, you just didn't issue a command. try doing a 
/list and see what happens :-).
Aryeh

---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




RE: MBeans exception and mod_jk

2002-11-05 Thread Aryeh Katz
 
 Moving Tomcat might help, but if you are getting an apache 404, that
 means that Apache doesn't know what to do with
 http://localhost/examples, even though your httpd.conf clearly has a
 virtual host for localhost and the requisite JkMount statements.
 
Not so fast. His JkMount command doesn't have anything for /examples/* !. It 
might be just that simple.
Aryeh

---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




RE: Exception while starting up a Tomcat server

2002-11-04 Thread Aryeh Katz
I just took a look at the dtd 

http://java.sun.com/dtd/web-app_2_3.dtd
snip
   res-ref-namejdbc/Questions/res-ref-name
   res-ref-typejavax.sql.DataSource/res-ref-type
res-authContainer/res-auth
  ^
According to the dtd the above line must be before res-ref-name.
Aryeh

---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: Tomcat 4.1.12, Apache 2.0.43, Win/2K

2002-11-04 Thread Aryeh Katz
snip
 
 The order of the LoadModule statements is important.
 This works:
I wonder if you set the load order (as per the following document
http://httpd.apache.org/docs-2.0/developer/hooks.html - the part
about controlling the hook order at the end) if you get any different
behavior. Apache 2 doesn't have to follow the LoadModule order if
you code it right.
If this works, you could probably submit a patch to the tomcat people

Aryeh
 
 #
 # Adding mod_jk2
 #
 LoadModule jk2_module modules/mod_jk2.dll
 #
 # Adding mod_perl
 #
 LoadModule perl_module modules/mod_perl.so
 PerlRequire C:/Apache2/conf/extra.pl
 
 The following FAILS to load mod_jk2:
 
 #
 # Adding mod_perl
 #
 LoadModule perl_module modules/mod_perl.so
 PerlRequire C:/Apache2/conf/extra.pl
 #
 # Adding mod_jk2
 #
 LoadModule jk2_module modules/mod_jk2.dll
 

---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )

2002-10-31 Thread Aryeh Katz
First of all
Please post ONLY the relevant part of your httpd.conf, we don't need to 
know all your LoadModules lines
Second,
   Your are using ajp12, and that isn't included in your worker.list, and even if 
it were, it probably would using 8007 (ajp12) unless you change your 
worker.properties
Aryeh

 worker.list=ajp13
   ^^^
 
 
 worker.ajp12.port=8007
  ^
 worker.ajp12.host=localhost
 worker.ajp12.type=ajp12

 
 JkMount /examples/servlet/* ajp12
 JkMount /examples/*.jsp ajp12
---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )

2002-10-31 Thread Aryeh Katz

 Sorry. will remember next time. I have uncommented ajp12 and it hasn't
 changed anything.
 

  JkMount /examples/servlet/* ajp12
  JkMount /examples/*.jsp ajp12

As John pointed out, (and I left in to show your config), you need to change 
the JkMount to use the ajp13 worker. e.g

JkMount /examples/servlet/* ajp13


 ---
 Aryeh Katz
 VASCO
 www.vasco.com
 
 
 --
 To unsubscribe, e-mail:
 mailto:tomcat-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
 mailto:tomcat-user-help;jakarta.apache.org
 
 
 --
 To unsubscribe, e-mail:  
 mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional
 commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
 


---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )

2002-10-31 Thread Aryeh Katz
 for everything? I ask because I didn't have to do this for the Linux
 to Linux or w2k to w2k setups.
 
shrug
Your subject stated that you were using ajp13. We generally answer
questions based on the information given.

 Would I ever use JkMount /examples/servlet/* ajp13 ?
I assume you mean apj12?
As long as ajp12 is working for you, there is no reason not to use it (even if 
ajp13 is recommended). However, you must make sure that you have the 
correct listener (port 8007) if you are going to use it.

---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )

2002-10-31 Thread Aryeh Katz
 Ok
 
 I just configures it to use ajp12 instead of ajp13. And now it works.
 Now I am really confused.
First of all, in order for anyone to help you further, you should 
really specify EXACTLY what you did (preferably with a screen scrape 
so any typos can be caught), instead of saying it.
Second of all, the fact that you were able to connect using ajp12,
that would seem to indicate that you had some kind of configuration 
error with ajp13.
The easiest way to determine why would be to look at the 
tomcat log files (and maybe the apache log files). I'm sure that 
something will pop up if you set the logging high enough

---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: mod_jk ap_get_ctx problem?!

2002-10-28 Thread Aryeh Katz
snip
 Cannot load /etc/httpd/libexec/mod_jk-1.3-noeapi.so into server:
 /etc/httpd/libexec/mod_jk-1.3-noeapi.so: undefined symbol: ap_ctx_get
 
I tried this myself and got the same error. This means that mod_jk was built 
with a version of apache that is not binary compatible with 1.3.27.
Try building mod_jk, or using an older version of apache.
Aryeh
---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




RE: Apache Tomcat on different hosts

2002-10-23 Thread Aryeh Katz
 Thanks. In the workers.properties file, what does ps=/ mean ?
 
Path separator

---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: mod_jk problem

2002-10-21 Thread Aryeh Katz
 Re,
 
 thanks for your help.
 
 You can find in attach file : config and log.
 
your error_log file seems to state the problem.
Tomcat couldn't bind to 8080 (it's already in use)
Try renaming the port and see in that helps.
Aryeh


---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: Ok people

2002-10-18 Thread Aryeh Katz
 Give him a hint as to what information to bring to a follow-up and
 where to look?
 
Reading your other post, I'd have to say that your reply here is right on the money 
(note: I did include a URL with my response :-)).

However, in fairness to the people who post here, why should they have to tell someone 
to look at, say, google.
The odds are excellent that the problem any poster is facing is addressed somewhere, 
by someone, and it can be found with some research.
Granted, that's not the easy way to go, and sometimes, there IS no available answer. 
All I was trying to say (which George pointed out) is that the way the question 
is asked has a lot to do with how (and if) it's answered, and trying to point to the 
OP what they did wrong.
I still can't answer his (Lior should be a him) question, but I can make it more 
likely that other people will
---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: Ok people

2002-10-18 Thread Aryeh Katz
 Limited knowledge, and often confusion, doesn't attribute to questions
 being asked in the same way that you, who have that knowledge, would
 like things phrased. I don't need people to gang up on me and tell me
 that I'm being rude and arrogant in the way I ask things (and been
 riding me every chance that specific person got), or refer me to
 idiots guide to asking questions. It's not fair and I'm not going to
 be discouraged by that kind of initimidation. 
 
I just looked at one of  your unanswered posts. Even though I'm not expert, I can tell 
you why it wasn't answered.
You mentioned that you couldn't get iis 4 to speak to tomcat, and asked to help figure 
out why.
There was no information in that post as to why it fails.

Nobody can see why it's failing.

Assuming you've followed everything at 
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/ajp.html
regarding IIS, nobody has any way of knowing WHY it's not working.
So what do you expect people to do?

---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




RE: [Configuring] Tomcat 4.1.12 apache 1.3.26 jk2

2002-10-18 Thread Aryeh Katz
 I use mod_JK not jk2 !
 But if you have a good url to how to use jk2 instead of jk I will be
 pleased to try it !

Sorry about this, stupid email client doesn't reply to list.
Problem was caused by the lack of a LoadModule line.
resolved by adding:
LoadModule jk_module libexec/mod_jk.so
Aryeh

  -Original Message-
  From: Turner, John [mailto:JTurner;AAS.com]
  Sent: vendredi 18 octobre 2002 15:44
  To: 'Tomcat Users List'
  Subject: RE: [Configuring] Tomcat 4.1.12  apache 1.3.26  jk2
 
 
  I don't think JK2 uses JkWorkersFile.
 
  John
 
   -Original Message-
   From: François Vallet [mailto:fvallet;infovista.com]
   Sent: Friday, October 18, 2002 9:43 AM
   To: 'Tomcat Users List'
   Subject: RE: [Configuring] Tomcat 4.1.12  apache 1.3.26  jk2
  
  
   Ok thanks!
   But i've followed the tutorial...
   And I have this error when I startup apache
   invalid command jkworkersfile :(
  
   Do you know why ?
  
  
-Original Message-
From: Hendrik Coetzee [mailto:hendrik;mantisnet.co.za]
Sent: vendredi 18 octobre 2002 09:50
To: 'Tomcat Users List'
Subject: RE: [Configuring] Tomcat 4.1.12  apache 1.3.26  jk2
   
Hi François
   
Found this site - has a couple of very good how-to's.  Check it
out, maybe it will help...
   
http://www.galatea.com/flashguides/index
   
   
   
Hendrik Coetzee
   
   
-Original Message-
From: François Vallet [mailto:fvallet;infovista.com]
Sent: 18 October 2002 09:36 AM
To: 'Tomcat Users List'
Subject: [Configuring] Tomcat 4.1.12  apache 1.3.26  jk2
   
   
Hello Guys
   
Do you know if it we can associate apache 1.3.26 -JK2-
   Tomcat 4.1.12
   
If YES
Do you have a good url where there is a pretty good
documentation to
install them ?
   
Else
What is wrong !
   
Thanks in advance
François
   
   
 -Original Message-
 From: David Scott [mailto:dascott;mindspring.com]
 Sent: vendredi 18 octobre 2002 05:00
 To: Tomcat Users List
 Subject: Configuring log files in Tomcat 4.1

 I get an annoying SSL warning in catalina.out on every
   request if the
 client is not authenticated by certificate, which in our
   application
 means every request.  I would love to configure logging
   to (a) not log
 this warning message and (b) call catalina.out something
   else.  The
docs
 aren't much help in this.  Does anyone have any specifics
   on how I can
 configure log files and redirect System.out and
   System.err messages?

 I'm using Tomcat 4.1.12.

 Thanks.

 David


 --
 To unsubscribe, e-mail:
mailto:tomcat-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org
   
--
To unsubscribe, e-mail:
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org
   
   
   
--
To unsubscribe, e-mail:
   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
   mailto:tomcat-user-help;jakarta.apache.org
  
   --
   To unsubscribe, e-mail:
  mailto:tomcat-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:tomcat-user-help;jakarta.apache.org
 
  --
  To unsubscribe, e-mail:
 mailto:tomcat-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
 mailto:tomcat-user-help;jakarta.apache.org

 --
 To unsubscribe, e-mail:
 mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional
 commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org



---
Aryeh Katz
VASCO
www.vasco.com


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: Error Loading mod_jk.dll

2002-10-18 Thread Aryeh Katz
 Environment:
 Tomcat 4.0.4
 Apache 2.0.43 with SSL
 Win 2K – SP3
 mod_jk = mod_jk-2.0.42.dll (renamed to mod_jk.dll)

I think this is your problem
There might be binary incompatability between 2.0.42 and
2.0.43.
Try a 2.0.42 server, and see if it works (otherwise, build mod_jk
against the 2.0.43 source).
Aryeh

---
Aryeh Katz
VASCO
www.vasco.com


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: Error Loading mod_jk.dll

2002-10-18 Thread Aryeh Katz
Try the mirror site for apache 2.0.42
http://www.ibiblio.org/pub/packages/infosystems/WWW/servers/apache/httpd/binaries/win32/
 Now that presents a little problem.  The only version of Apache/2 I
 can find for Win32 is 2.0.43 and the only version of mod_jk I can find
 is 2.0.42.  I am a Java developer and do not have access to a Windows
 c/c++ compiler, so I can't build my own version of either Apache or
 mod_jk.  Does anyone have a version of mod_jk that works with Apache
 2.0.43 and Tomcat 4.0.4?
 
 Thanks,
 
 Jim Urban - [EMAIL PROTECTED]
 Park City Solutions Inc.
 Clinical Connectivity Suite Product Manager
 Suite 295
 500 Park Blvd.
 Itasca, IL  60143
 Voice:  (630) 250-3045 x106
 Fax:  (630) 250-3046
 
 CONFIDENTIALITY NOTICE
 This message and any included attachments are from Park City Solutions
 Inc. and are intended only for the entity to which it is addressed.
 The contained information is confidential and privileged material. If
 you are not the intended recipient, you are hereby notified that any
 use, dissemination, or copying of this communication is strictly
 prohibited and may be unlawful. If you have received this
 communication in error please notify the sender of the delivery error
 by e-mail or call Park City Solutions Inc. corporate offices at (435)
 654-0621
 
 -Original Message-
 From: Aryeh Katz [mailto:aryeh;vasco.com]
 Sent: Friday, October 18, 2002 1:14 PM
 To: Tomcat-User (E-mail); [EMAIL PROTECTED]
 Subject: Re: Error Loading mod_jk.dll
 
  Environment:
  Tomcat 4.0.4
  Apache 2.0.43 with SSL
  Win 2K - SP3
  mod_jk = mod_jk-2.0.42.dll (renamed to mod_jk.dll)
 
 I think this is your problem
 There might be binary incompatability between 2.0.42 and
 2.0.43.
 Try a 2.0.42 server, and see if it works (otherwise, build mod_jk
 against the 2.0.43 source). Aryeh
 
 ---
 Aryeh Katz
 VASCO
 www.vasco.com
 
 
 --
 To unsubscribe, e-mail:  
 mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional
 commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
 


---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: Apache 1.3.27, Tomcat 4.0.6, mod_JK, and Virtual Hosts

2002-10-16 Thread Aryeh Katz

snip
 I'm clear as to how to set up Apache, but not clear as to how to set
 up Tomcat's server.xml file to read those directories as separate
 sites.  Also, I'm not clear what files need to be put where to get
 JSP's to work (having attempted to move the examples into a virtual
 host's examples directory). Any help on this would be a huge help.
I'm new at this myself, so someone out there might correct me, but this is what I 
understand from the docs.
Each JkMount specifies a worker to handle that request. Apache then forwards requests 
based on URI to the correct worker.
If your virtual hosts use different workers, apache forwards the request to the 
correct worker. Thus, tomcat doesn't have to determine the virtual host, apache does 
that for you.
---
Aryeh Katz
VASCO   
www.vasco.com   


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




JkLogLevel problem - linux

2002-10-16 Thread Aryeh Katz

I'm getting some weird behavior using JkLogLevel, and I'm wondering if 
anyone has seen this before.
As this results in a server crash, this is probably a developer issue, but 
someone here may have something to say...
I have a third party module. If I load this third party module, the web server 
crashes on startup. Once I comment out the JkLogLevel line, it starts up fine.
Note: JkLogFile must also be set in order for the JkLogLevel to crash

Without the third party module, JkLogLevel works fine.

Here is a stack trace
#0  0x4000af61 in _dl_debug_state () at dl-debug.c:56
#1  0x4014a136 in _dl_close (map=0x80da598) at dl-close.c:195
#2  0x40068430 in dlclose_doit (handle=0x80da598) at dlclose.c:26
#3  0x4000ac7b in _dl_catch_error (errstring=0x4006a080, 
operate=0x40068418 dlclose_doit, args=0x80da598) at dl-error.c:141
#4  0x400688b9 in _dlerror_run (operate=0x40068418 dlclose_doit, 
args=0x80da598) at dlerror.c:125
#5  0x400683fe in dlclose (handle=0x80da598) at dlclose.c:32
#6  0x808a2a0 in ap_os_dso_unload (handle=0x80da598) at os.c:142
#7  0x8067450 in unload_module (modi=0x80cf2f4) at mod_so.c:185
#8  0x8069aee in run_cleanups (c=0x80d090c) at alloc.c:1723
#9  0x80682fd in ap_clear_pool (a=0x80cef1c) at alloc.c:538
#10 0x8079313 in standalone_main (argc=2, argv=0xba84)
at http_main.c:5066
#11 0x8079c23 in main (argc=2, argv=0xba84) at http_main.c:5456

---
Aryeh Katz
VASCO   
www.vasco.com   


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




servlet mapping help

2002-10-15 Thread Aryeh Katz

I'm trying to integrate mod_jk and tomcat.
My httpd.conf file has the following mapping

JkMount /examples/servlets/* worker1

and I see the following in my jk log file (at debug)

[Tue Oct 15 11:52:17 2002]  [jk_uri_worker_map.c (321)]: Into  
jk_uri_worker_map_t::uri_worker_map_open, match rule
/examples/servlets/=worker1 was added [Tue Oct 15 11:52:17 2002] 
[jk_uri_worker_map.c (408)]: Into
jk_uri_worker_map_t::uri_worker_map_open, there are 1 rules [Tue Oct
15 11:52:17 2002]  [jk_uri_worker_map.c (422)]:
jk_uri_worker_map_t::uri_worker_map_open, done [Tue Oct 15 11:52:20
2002]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker [Tue Oct 15 11:52:20 2002] 
[jk_uri_worker_map.c (477)]: Attempting to map URI
'/examples/servlets/HelloWorldExample' [Tue Oct 15 11:52:20 2002] 
[jk_uri_worker_map.c (502)]: jk_uri_worker_map_t::map_uri_to_worker,
Found a context match worker1 - /examples/servlets/ [Tue Oct 15
11:52:20 2002]  [jk_worker.c (132)]: Into wc_get_worker_for_name
worker1 [Tue Oct 15 11:52:20 2002]  [jk_worker.c (136)]:
wc_get_worker_for_name, done did not found a worker

Why is my worker getting lost? Do I have some kind of 
misconfiguration?

---
Aryeh Katz
VASCO   
www.vasco.com

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




Re: servlet mapping help

2002-10-15 Thread Aryeh Katz

 Hello Aryeh,
 
 The proper syntax is:
 
 JkMount /examples/servlets/* ajp13
 
 You define the protocol, not a worker after the mount pattern.
This did not help matters. Even after changing httpd.conf and 
workers.properties, I get the same behavior.
Just one question. Can you point me to documentation that says it's
the protocol, not the worker? The web page
http://jakarta.apache.org/tomcat/tomcat-4.1-
doc/jk2/jk/aphowto.html#mod_jk%20Directives seems to imply it's the
worker, along with the mod_jk comments (lines 660 and 1412 in v 
4.0.6), that state it's a worker. Thanks for your help. 
Aryeh 
  Jake
 Tuesday, October 15, 2002, 11:03:01 AM, you wrote:   AK I'm trying
to integrate mod_jk and tomcat.  AK My httpd.conf file has the
following mapping   AK JkMount /examples/servlets/* worker1   
AK
and I see the following in my jk log file (at debug)   AK [Tue Oct
15 11:52:17 2002]  [jk_uri_worker_map.c (321)]: Into   

 AK jk_uri_worker_map_t::uri_worker_map_open, match rule AK
 /examples/servlets/=worker1 was added [Tue Oct 15 11:52:17 2002] 
AK
 [jk_uri_worker_map.c (408)]: Into AK
 jk_uri_worker_map_t::uri_worker_map_open, there are 1 rules [Tue 
Oct
 AK 15 11:52:17 2002]  [jk_uri_worker_map.c (422)]: AK
 jk_uri_worker_map_t::uri_worker_map_open, done [Tue Oct 15 11:52:20
 AK 2002]  [jk_uri_worker_map.c (460)]: Into AK
 jk_uri_worker_map_t::map_uri_to_worker [Tue Oct 15 11:52:20 2002] 
AK
 [jk_uri_worker_map.c (477)]: Attempting to map URI AK
 '/examples/servlets/HelloWorldExample' [Tue Oct 15 11:52:20 2002] 
AK
 [jk_uri_worker_map.c (502)]: 
jk_uri_worker_map_t::map_uri_to_worker,
 AK Found a context match worker1 - /examples/servlets/ [Tue Oct 
15
 AK 11:52:20 2002]  [jk_worker.c (132)]: Into 
wc_get_worker_for_name
 AK worker1 [Tue Oct 15 11:52:20 2002]  [jk_worker.c (136)]: AK
 wc_get_worker_for_name, done did not found a worker
 
 AK Why is my worker getting lost? Do I have some kind of 
 AK misconfiguration?

---
Aryeh Katz
VASCO   
www.vasco.com   

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




RE: servlet mapping help

2002-10-15 Thread Aryeh Katz

 
 You didn't have to change workers.properties at all.
 
snip
 So, you should have a line like this in httpd.conf:
 
 JkMount /examples/servlets/* ajp13
 
 And a few lines like this in workers.properties:
 
 worker.list=some-name
 worker.some-name.port=8009
 worker.some-name.host=your.host.com
 worker.some-name.type=ajp13
 
I believe, I just don't see :-).
Netstat shows a listener on 8009.
Connecting to same url port 8080 behaves just fine.
Only when I do a regular http request do I see problems (http error code 500, 
with the did not find a worker message in my jk log file).

Here is my ajp13 snippet from server.xml

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

---
Aryeh Katz
VASCO   
www.vasco.com   


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




RE: servlet mapping help

2002-10-15 Thread Aryeh Katz

 
 I would post the relevant section of httpd.conf (not the whole thing,
 please) with the JkMount statements, and the contents of your
 workers.properties file.  Also, which version of Apache and Tomcat you

httpd.conf (main server, not virt)

JkWorkersFile /jakarta-tomcat-4.0.6/conf/workers.properties
JkLogFile /usr/local/apaservlet/logs/mod_jk.log
JkLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkMount /examples/servlet/* ajp13

workers.properties

workers.tomcat_home=/jakarta-tomcat-4.0.6
workers.java_home=/jdk1.3.1_05
ps=/
workers.list=ajp13
workers.ajp13.port=8009
workers.ajp13.host=correct.server.name
workers.ajp13.type=ajp13

apache = 1.3.27
jakarta = 4.0.6

---
Aryeh Katz
VASCO   
www.vasco.com   


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




RE: servlet mapping help

2002-10-15 Thread Aryeh Katz

snip
  workers.list=ajp13
  workers.ajp13.port=8009
  workers.ajp13.host=correct.server.name
  workers.ajp13.type=ajp13
 
  apache = 1.3.27
  jakarta = 4.0.6
 
 This is different from what you had previously.  So what is/isn't
 happening now, and what (error) messages are you seeing in the logs?

mod_jk.log
[Tue Oct 15 15:07:59 2002]  [jk_uri_worker_map.c (502)]: 
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 -
 /examples/servlet/
[Tue Oct 15 15:07:59 2002]  [jk_worker.c (132)]: Into 
wc_get_worker_for_name ajp13
[Tue Oct 15 15:07:59 2002]  [jk_worker.c (136)]: 
wc_get_worker_for_name, done did not found a worker

error log
nothing!

access log

192.168.43.222 - - [15/Oct/2002:15:07:59 -0400] GET 
/examples/servlet/CookieExample HTTP/1.1 500 608

To my feeble brain, this sounds like apache is trying to render the 
page, instead of forwarding to tomcat, so I get the 500. Tomcat 
SHOULD be able to handle the request (netstat confirms I still have 
an 09 listener).

The only other thing I can think of, is I dl'ed the source for mod_jk 
and built it myself, and I see that it declares itself a beta for the 
version I dl'ed (mod_jk/1.2.1-beta-1). Are there any known issues 
with this mod_jk?

---
Aryeh Katz
VASCO   
www.vasco.com   


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




RE: servlet mapping help

2002-10-15 Thread Aryeh Katz

 Should've noticed it the first time around, but all of these above
 four lines should have worker instead of workers.
 
Cut and paste will do that to you every time (I set the home attr).
Thanks for all the help.
Now I'm going to go back and see how much of my orig config I had to change.
I suspect that I could have kept everything the way it was.
I'll update the list with my findings.

---
Aryeh Katz
VASCO   
www.vasco.com   


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




mod_jk config

2002-10-15 Thread Aryeh Katz

Just to follow through with my current config, which is behaving like a champ.

workers.properties (complete):

worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=FQDN.mydomain.com
worker.worker1.type=ajp13

httpd.conf (LoadModule omitted)

JkWorkersFile /jakarta-tomcat-4.0.6/conf/workers.properties
JkLogFile /usr/local/apaservlet/logs/mod_jk.log
JkLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkMount /examples/servlet/* worker1

This last line DOES work. JkMount does NOT take a protocol, it takes a worker name.
The following like from jk.log shows why this works:

[Tue Oct 15 15:53:16 2002]  [jk_worker.c (162)]: wc_create_worker, about to create 
instance worker1 of ajp13

server.xml

no changes (other than to make sure that ajp13 was enabled)

Hopefully someone on this list will have learnt from my mistake, and type worker!
Aryeh
---
Aryeh Katz
VASCO   
www.vasco.com   


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