RE: JK2 crashes IIS

2004-11-23 Thread Hua Hou
After I uninstall and re-install IIS, the problem is fixed. Here is
another hint from a Tomcat user:

==
You've already enabled full debugging for the log
which is a good start. My log info was exactly the
same, although in my case only the ISAPI filter
crashed rather than all of IIS (in reality, I think
the ISAPI filter was forced to unload by IIS/Windows,
but the effect is the same). A restart of IIS would
reload the ISAPI fine. It would then examine/log every
incoming request until a match was found, indicating
that the request should be redirected; at this point
it would crash.

I felt that this was a permissions issue; either the
DLL was not allowed to execute correctly, or a new
socket could not be created. Using Windows Audit
Object Access could identify the denial, but
potentially auditing would have to be enabled for
multiple folders. Rather than turn Auditing on for
numerous folders, what we did was to use FileMon, a
very useful utility from SysInternals:
http://www.sysinternals.com/ntw2k/source/filemon.shtml

With FileMon running in the background, I restarted
IIS and checked that the isapi_redirect.log started to
grow. I then accessed a URL which caused (as expected)
the ISAPI to unload. FileMon pinpointed the file to
which access was being denied - and after all this
time, it was the isapi_redirect.dll !!!

We then enabled Auditing on this DLL and repeated the
test; this told us which NT user was being denied
access (FileMon doesn't include this level of detail).

The NT permissions on the DLL were correct, but IIS
had both Anonymous and Integrated Windows
authentication (aka NTLM) access enabled. The NT authentication was
correct, but IIS was trying Anonymous first, which was causing the ISAPI
to unload. By simply disabling Anonymous, so that only Integrated was
enabled, the ISAPI started working. One little tick box...

Whilst your problem may not be exactly the same, I
think some change has occurred in your set up to upset
the permissions. This may be due to a patch from
Microsoft, or some extra security (eg. URLScan), or
just a minor change in IIS which has had some
unexpected results.

=

-Original Message-
From: Hua Hou 
Sent: Friday, November 19, 2004 5:44 PM
To: Tomcat Users List
Subject: JK2 crashes IIS

I have been using IIS 5.1 with JK2 for more than 18 months. Then this
afternoon, suddenly JK2 starts to crash IIS. When I hit a web page, the
first time I got 500 error. If I refresh the page two more times, IIS
will crash.

In the jk2.log file, I can see those debug info:
[Fri Nov 19 17:09:18 2004] (debug ) [jk_isapi_plugin.c (288)]
HttpFilterProc started
[Fri Nov 19 17:09:18 2004] (debug ) [jk_isapi_plugin.c (346)]  In
HttpFilterProc Virtual Host redirection of hua.handango.com : 80
[Fri Nov 19 17:09:18 2004] (debug ) [jk_isapi_plugin.c (355)]
HttpFilterProc [/] is a servlet url - should redirect to lb:lb_local
[Fri Nov 19 17:09:18 2004] (debug ) [jk_isapi_plugin.c (421)]
HttpFilterProc check if [/] is pointing to the web-inf directory

No more debug info is printed after this line.

I browsed the internet and saw other people were also experiencing the
same problem, but nobody provided a feasible solution.

Anybody has any ideas?

Thanks.

Hua


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



JK2 crashes IIS

2004-11-19 Thread Hua Hou
I have been using IIS 5.1 with JK2 for more than 18 months. Then this
afternoon, suddenly JK2 starts to crash IIS. When I hit a web page, the
first time I got 500 error. If I refresh the page two more times, IIS
will crash.

In the jk2.log file, I can see those debug info:
[Fri Nov 19 17:09:18 2004] (debug ) [jk_isapi_plugin.c (288)]
HttpFilterProc started
[Fri Nov 19 17:09:18 2004] (debug ) [jk_isapi_plugin.c (346)]  In
HttpFilterProc Virtual Host redirection of hua.handango.com : 80
[Fri Nov 19 17:09:18 2004] (debug ) [jk_isapi_plugin.c (355)]
HttpFilterProc [/] is a servlet url - should redirect to lb:lb_local
[Fri Nov 19 17:09:18 2004] (debug ) [jk_isapi_plugin.c (421)]
HttpFilterProc check if [/] is pointing to the web-inf directory

No more debug info is printed after this line.

I browsed the internet and saw other people were also experiencing the
same problem, but nobody provided a feasible solution.

Anybody has any ideas?

Thanks.

Hua


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



Euro sign and Trademark sign not displaying properly

2004-10-18 Thread Hua Hou
All,

 

I am using Tomcat 4.1.24 and Oracle 10g on Windows XP environment. I am
facing a problem that euro sign and trade mark can not be displayed
properly on the web browser. 

 

These euro sign and trademark signs are read from Oracle using JDBC java
code. But when I display them on the web browser, I saw ? rather than
the actual sign.

 

When I dig deep into the problem, I found that after I read those signs
from Oracle with Oracle JDBC thin driver, the HEX code for those signs
are 3F, rather than 80 or 99 (for euro or for trademark sign
respectively).

 

When I was using SQL server before, all those signs were read and
displayed properly.

 

I have searched the Tomcat mailing list and the internet extensively,
but have not found any solution.

 

Any ideas?

 

Thanks.

 

Hua

 



RE: Can I configure Tomcat to send HTTP/1.1 200 OK rather than HTT P/1.1 200?

2003-10-22 Thread Hua Hou
Thank you for your reply. I am using Tomcat 4.1.24 and have to recompile the
code to append the reason phrase.

Thanks again.

Hua

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 21, 2003 5:03 PM
To: Tomcat Users List
Subject: Re: Can I configure Tomcat to send HTTP/1.1 200 OK rather than
HTT P/1.1 200?

Recompile the source. (But I thought the 4.1.27 also appended the status
text 
too)

http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6

 The individual values of the numeric status codes defined for HTTP/1.1,
and 
an example set of corresponding Reason-Phrase's, are presented below. The 
reason phrases listed here are only recommendations -- they MAY be replaced 
by local equivalents without affecting the protocol.

So OK is only a recommendation. It may actually be any word based on locale.

So the following is probably also valid:

HTTP/1.1 200 Roger

-Tim


Hua Hou wrote:
 I have a really picky browser that is expecting the OK after 200 when
 receiving HTTP response as:
 
 HTTP/1.1 200 OK
 
  
 
 Without the OK, the browser can NOT render the HTTP response correctly.
 
  
 
 I have two questions:
 
 (1) Is there a way to configure Tomcat to send OK after the 200 code
 when sending response header to browser?
 
 (2) According the HTTP 1.1 spec, is the OK required after the 200
code?
 



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



Can I configure Tomcat to send HTTP/1.1 200 OK rather than HTT P/1.1 200?

2003-10-21 Thread Hua Hou
I have a really picky browser that is expecting the OK after 200 when
receiving HTTP response as:

HTTP/1.1 200 OK

 

Without the OK, the browser can NOT render the HTTP response correctly.

 

I have two questions:

(1) Is there a way to configure Tomcat to send OK after the 200 code
when sending response header to browser?

(2) According the HTTP 1.1 spec, is the OK required after the 200 code?

 

Thank you very much for your great help!

 

Hua



jsp:include and case problem

2003-10-01 Thread Hua Hou
I am having a case problem with jsp:include. I am using Tomcat 4.1.24. Here
is the problem:

 

2 jsp: A.jsp, b.jsp

Inside b.jsp, I have jsp:include page=a.jsp/

In the browser, when I invoke b.jsp, A.jsp is compiled into a_jsp.java and
a_jsp.class.

 

My understanding is that jsp is case sensitive, which means A.jsp should
never be compiled into a_jsp.java and a_jsp.class, instead, Tomcat
should give 404 error. Is there way to prevent Tomcat from compiling
A.jsp into a_jsp.java when A.jsp is included using jsp:include?

 

Thank you for your great help!

 

Hua

 

 

 



MultipartRequest: unexpected end of part

2003-08-15 Thread Hua Hou
I'm using the latest oreilly class MultipartRequest to upload files into my
server. However, whenever I try to upload a big file (say,  100k), I got
the following exception. With smaller file ( 50k), it works fine. I browse
through the tomcat archive list, as well as google site, both indicate that
this bug should've fixed in Tomcat 4.1.24 version. Could somebody help me
out?

Here is the setting of my system:
Tomcat: 4.1.24
JDK: 1.4.1
IIS: 5.x
I am using JK2 connector.

Thanks and really appreciate!

Hua

java.io.IOException: unexpected end of part
at
com.oreilly.servlet.multipart.PartInputStream.fill(PartInputStream.java:100)
at
com.oreilly.servlet.multipart.PartInputStream.read(PartInputStream.java:183)
at
com.oreilly.servlet.multipart.PartInputStream.read(PartInputStream.java:156)
at com.oreilly.servlet.multipart.ParamPart.(ParamPart.java:49)
at
com.oreilly.servlet.multipart.MultipartParser.readNextPart(MultipartParser.j
ava:319)
at com.oreilly.servlet.MultipartRequest.(MultipartRequest.java:246)
at com.oreilly.servlet.MultipartRequest.(MultipartRequest.java:109)
at com.hhc.ProductAdminFileInfo.doPost(ProductAdminFileInfo.java:90)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:620)
at java.lang.Thread.run(Thread.java:534)


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



stdout log file for Tomcat Windows Service

2003-06-06 Thread Hua Hou
I am running Tomcat 4.1.24 as Windows Service in production environment. I
have a server_stdout.log file for logging the stdout. However, I have two
problems with this log file:

(1) I added -verbose:gc option as the JVM option when install the Windows
service, however, no GC info is logged in this file. How can I make GC info
to be logged in this file? 
(2) Every time when I restart the service, this file will be overwritten. Is
there a way to prevent this?

Thank you for your help!

Hua

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



RE: Tomcat Memory leaks!

2003-06-04 Thread Hua Hou
Which JDK version are you using? If you are using JDK1.4.1_02, you might
have a memory leak problem (bug#4724129). Try to switch to JDK1.3.1_07 and
see whether you still have the same problem.

My 2 cents.


-Original Message-
From: Robert Abbate [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2003 10:06 PM
To: [EMAIL PROTECTED]
Subject: Tomcat Memory leaks!
Importance: High

Hi. It seems Tomcat (4.1.24) has a major memory leak, and I wanted to bring
it to the developers attention so they can check it out.

I run a shared hosting server (Mandrake 8.2, Apache 1.3) with virtual hosts.
I have 1 Gig of RAM and about 50 virtual hosts and yet I keep getting Out of
Memory errors!

I have made numerous adjustments to memory allocations, yet nothing helps.
Here's an example of what I've done:

CATALINA_OPTS=-Xmx64mb
and
CATALINA_OPTS=-Xmx1028mb

I can furnish my server.xml file upon request or anything else you may need
to fix the problem.

Thanks
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.483 / Virus Database: 279 - Release Date: 5/19/2003


-
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: -Xincgc, -Xms600, -Xmx600

2003-06-03 Thread Hua Hou
I was experiencing similar problem with Tomcat 4.1.24 + JDK1.4.1_02. When
turning on -verbose:gc, I found that when the memory usage reaches the
-Xmx setting, Full GC will kick in and try to claim the unused memory back.
However, because of the JDK1.4.1_02 memory leak bug, the Full GC keeps
running for 200 cycles (continuously) (which hangs the whole system for
quite some time) and eventually I got Out-of-Memory error.

My fix to this problem was to replace the setLength() method in StringBuffer
(JDK1.4.1_02) with the setLength() method in JDK1.3.1_07 version and place
the customized StringBuffer.class file under Tomcat-Home\common\endorsed
directory and now the problem goes away. 

Of course, there are too many factors to your problems and these are just my
2 cents.

Hua

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2003 10:16 AM
To: Tomcat Users List
Subject: RE: -Xincgc, -Xms600, -Xmx600


Howdy,

I question whether this is a memory issue. Even if you use 600MB, why
does
tomcat run at 100% cpu forever??? Shouldn't the gc finish???

GC may finish and immediately restart if memory is still full.  That
would keep CPU usage pegged.

I have had this same problem with Tomcat for quite some time too. It
seems
to be an issue with Tomcat installed as a service ... or possibly some
issue with the jk connector. 

Both of those seem to be reasonable theories.

I am using jdk1.3.1_07. I know that people upgraded to jdk1.4 and the
problem persists ... so it's probably not a JVM issue.

I don't think that's a possible conclusion without significant further
investigation.  There are simply too many variables, too many difference
between JDK 1.3.x and 1.4.x, and people vs your specific situation.

Can you see if it's actually GC that's using the CPU?  If not, what is?
One way to find out is to ctrl-break your tomcat when it's using 100%
CPU.  You will get output showing what exactly every thread in the VM
was doing.

Yoav Shapira



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


-
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: -Xincgc, -Xms600, -Xmx600

2003-06-03 Thread Hua Hou
One correction: 
  Package the StringBuffer.class into a jar file and put the jar file under
Tomcat-Home\common\endorsed directory. Tomcat will not pick up class file
from that directory, only jar files.



-Original Message-
From: Hua Hou 
Sent: Monday, June 02, 2003 11:10 AM
To: 'Tomcat Users List'
Subject: RE: -Xincgc, -Xms600, -Xmx600

I was experiencing similar problem with Tomcat 4.1.24 + JDK1.4.1_02. When
turning on -verbose:gc, I found that when the memory usage reaches the
-Xmx setting, Full GC will kick in and try to claim the unused memory back.
However, because of the JDK1.4.1_02 memory leak bug, the Full GC keeps
running for 200 cycles (continuously) (which hangs the whole system for
quite some time) and eventually I got Out-of-Memory error.

My fix to this problem was to replace the setLength() method in StringBuffer
(JDK1.4.1_02) with the setLength() method in JDK1.3.1_07 version and place
the customized StringBuffer.class file under Tomcat-Home\common\endorsed
directory and now the problem goes away. 

Of course, there are too many factors to your problems and these are just my
2 cents.

Hua

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2003 10:16 AM
To: Tomcat Users List
Subject: RE: -Xincgc, -Xms600, -Xmx600


Howdy,

I question whether this is a memory issue. Even if you use 600MB, why
does
tomcat run at 100% cpu forever??? Shouldn't the gc finish???

GC may finish and immediately restart if memory is still full.  That
would keep CPU usage pegged.

I have had this same problem with Tomcat for quite some time too. It
seems
to be an issue with Tomcat installed as a service ... or possibly some
issue with the jk connector. 

Both of those seem to be reasonable theories.

I am using jdk1.3.1_07. I know that people upgraded to jdk1.4 and the
problem persists ... so it's probably not a JVM issue.

I don't think that's a possible conclusion without significant further
investigation.  There are simply too many variables, too many difference
between JDK 1.3.x and 1.4.x, and people vs your specific situation.

Can you see if it's actually GC that's using the CPU?  If not, what is?
One way to find out is to ctrl-break your tomcat when it's using 100%
CPU.  You will get output showing what exactly every thread in the VM
was doing.

Yoav Shapira



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


-
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: Tomcat STILL freezing - time to look at another app server?

2003-05-29 Thread Hua Hou
Tomcat may be freezing when it's doing full GC. I've been watching this by
turning on -verbose:gc option. Sometimes it was taking Tomcat 3 minutes to
perform the full GC, during which period Tomcat will be freezing, all
requests will be queued and not processed.



-Original Message-
From: Chong Yu Meng [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 28, 2003 9:43 AM
To: Tomcat Users List
Subject: Re: Tomcat STILL freezing - time to look at another app server?

I always tell the younger engineers that computers are sentient beings 
in so far as they can smell fear and inexperience. A newly hired 
engineer may run into trouble even if he followed the step by step 
instructions to the letter. And strange stuff can happen to him/her on 
shift.

But on to your problem : I'm thinking maybe the system is doing garbage 
collection at the time it freezes ...? Do you hear the hard disk 
thrashing about for a long time during those freezes ? It's happened to 
me before. The trouble with garbage collection is that you never know 
when it will kick in.

The only other time I encountered freezing was with my Abit motherboard 
(this is the dual-Celeron motherboard that had the design flaw of an 
under-powered capacitor). If you are using this motherboard, your best 
bet is to throw it away. I've never bought anything from Abit after that.

Regards,
pascal chong



Hunter, Sandra wrote:

Well this issue continues. Code has been commented, logged, oracle
permissions all tickety boo, no locks.

It really is intermittent, and in my opinion seems to be somewhat related
to
network traffic. I talked to one of the tech guys and he seemed to think I
was nuts.

It never happens at night or on the weekends when I am pretty much the only
one on the network.

Does that sound possible to any one with more experience than I?

Although we moved it to the live server we had some install problems there
and so I am still running off my dev machine. It is just a regular P4 with
about 1600mhz and 256 ram. Do you think the freezing will cease when
running
off the server? 

And on the other subject: have any of you tried other app servers out
there?
Do you have any opinions? Tomcat seems to be the industry standard but if I
can't resolve this freezing issue I might get some pressure to try some
different technology.

-Original Message-
From: Hunter, Sandra [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 16, 2003 2:52 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat Freezing?

The lock may be an issue: I'll run that past our DBA but that's the only
thing I haven't looked at.
We have actually moved the app to another machine to see if that makes any
difference. 
If anyone gets a bright idea I would love to hear it!
Puzzled Sandra

  



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