RE: HANDLER THREAD PROBLEM
Your are doing a request to the port that talks to apache and tomcat talk to.. That is not a protocol like http, it is the ajp protocol.. You have to do a request to http:// or http://:8080. Mvgr, Martin > -Original Message- > From: Juan Andres Sanin Pineda [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 06, 2001 5:03 AM > To: [EMAIL PROTECTED] > Subject: HANDLER THREAD PROBLEM > > > > Hi. > > I startup tomcat and every thing es ok. > > but when I try to access http://:8007 > in the console view the follow IOException: > > HANDLER THREAD PROBLEM: java.io.IOException: Stream broken > java.io.IOException: Stream broken > at > org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRe > quest(Ajp12ConnectionHandler.java:426) > at > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.process > Connection(Ajp12ConnectionHandler.java:147) > at > org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) > at > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) > at java.lang.Thread.run(Thread.java:484) > > > what happen? > > thanks! > > Juan > >
Re: HANDLER THREAD PROBLEM: java.net.SocketException Invalid argument
I finally figured it out. The problem is with the version of java I was using: (Kaffe Virtual MachineCopyright (c) 1996-2000Transvirtual Technologies, Inc. All rights reservedEngine: Just-in-time v3 Version: 1.0.6 Java Version: 1.1) After pointing Tomcat to: {java version "1.3.0"Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)} everything worked fine. Easy fix, sometimes you forget to look at those simple things first. Michael Mikolajczyk - Original Message - From: Michael Mikolajczyk To: [EMAIL PROTECTED] Sent: Thursday, February 15, 2001 12:30 PM Subject: HANDLER THREAD PROBLEM: java.net.SocketException Invalid argument I am using Linux RedHat 7.0, Tomcat 3.2.1, Apache 1.3.14-3and I get an exception when I try to route the requestto tomcat through Apache. The error is as following # HANDLER THREAD PROBLEM: java.net.SocketException: Invalid argumentjava.net.SocketException: Invalid argument at java.net.PlainSocketImpl.socketSetOption(PlainSocketImpl.java:native) at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:158) at java.net.Socket.setSoLinger(Socket.java:106) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:122) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:325) Thank you for your help. Mike Mikolajczyk
RE: Handler Thread Problem
Yes, it has nothing to do with HTTP requests. (8080 default.) >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<< On 2/3/01, 6:42:47 PM, Nael Mohammad <[EMAIL PROTECTED]> wrote regarding RE: Handler Thread Problem: > You're right, I figured that out, that Apache makes the request for 8007 to > tomcat. So tomcat is listening to 8007 from apache. > Thanks, > Now time to conquer cocoon.!!! > -Original Message----- > From: Chris Janicki [mailto:[EMAIL PROTECTED]] > Sent: Saturday, February 03, 2001 6:41 PM > To: [EMAIL PROTECTED] > Subject: Re: Handler Thread Problem > I think port 8007 is used for connection to Apache. Are you trying to > use it as a regular web service port? > Original Message dated 2/3/01, 6:58:01 PM > Author: Nael Mohammad <[EMAIL PROTECTED]> > Re: Handler Thread Problem: > Community, > I'm getting the following error message when a request comes in for port > 8007? > I know I have to include some sort of threading instructions for tomcat > to handle the request. The only problem I have is how do I know what is > the proper thread handling scheme? Any thoughts, idea's or tip's is > greatly appreciated. > 2001-02-03 14:52:02 - Ajp12Interceptor: HANDLER THREAD PROBLE > M - java.io.IOException: Stream broken > at > org.apache.tomcat.modules.server.Ajp12.readNextRequest(Ajp12.java:300 > ) > at > org.apache.tomcat.modules.server.AJP12Request.readNextRequest(Ajp12In > terceptor.java:223) > at > org.apache.tomcat.modules.server.Ajp12Interceptor.processConnection(A > jp12Interceptor.java:186) > at > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java > :426) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP > ool.java:497) > at java.lang.Thread.run(Thread.java:484) > Regards, > Nael > Neomar, Inc > Product Support > [EMAIL PROTECTED] > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Handler Thread Problem
You're right, I figured that out, that Apache makes the request for 8007 to tomcat. So tomcat is listening to 8007 from apache. Thanks, Now time to conquer cocoon.!!! -Original Message- From: Chris Janicki [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 03, 2001 6:41 PM To: [EMAIL PROTECTED] Subject: Re: Handler Thread Problem I think port 8007 is used for connection to Apache. Are you trying to use it as a regular web service port? Original Message dated 2/3/01, 6:58:01 PM Author: Nael Mohammad <[EMAIL PROTECTED]> Re: Handler Thread Problem: Community, I'm getting the following error message when a request comes in for port 8007? I know I have to include some sort of threading instructions for tomcat to handle the request. The only problem I have is how do I know what is the proper thread handling scheme? Any thoughts, idea's or tip's is greatly appreciated. 2001-02-03 14:52:02 - Ajp12Interceptor: HANDLER THREAD PROBLE M - java.io.IOException: Stream broken at org.apache.tomcat.modules.server.Ajp12.readNextRequest(Ajp12.java:300 ) at org.apache.tomcat.modules.server.AJP12Request.readNextRequest(Ajp12In terceptor.java:223) at org.apache.tomcat.modules.server.Ajp12Interceptor.processConnection(A jp12Interceptor.java:186) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java :426) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP ool.java:497) at java.lang.Thread.run(Thread.java:484) Regards, Nael Neomar, Inc Product Support [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Handler Thread Problem
I think port 8007 is used for connection to Apache. Are you trying to use it as a regular web service port? Original Message dated 2/3/01, 6:58:01 PM Author: Nael Mohammad <[EMAIL PROTECTED]> Re: Handler Thread Problem: Community, I'm getting the following error message when a request comes in for port 8007? I know I have to include some sort of threading instructions for tomcat to handle the request. The only problem I have is how do I know what is the proper thread handling scheme? Any thoughts, idea's or tip's is greatly appreciated. 2001-02-03 14:52:02 - Ajp12Interceptor: HANDLER THREAD PROBLE M - java.io.IOException: Stream broken at org.apache.tomcat.modules.server.Ajp12.readNextRequest(Ajp12.java:300 ) at org.apache.tomcat.modules.server.AJP12Request.readNextRequest(Ajp12In terceptor.java:223) at org.apache.tomcat.modules.server.Ajp12Interceptor.processConnection(A jp12Interceptor.java:186) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java :426) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP ool.java:497) at java.lang.Thread.run(Thread.java:484) Regards, Nael Neomar, Inc Product Support [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Handler Thread Problem : java.lang.NullPointerException
How about trying this for your index.jsp: <--- Begin Code --> <%@ page import="java.io.*,java.util.* %> <% response.sendRedirect ("http://212.100.172.240/park/index.jsp") ; %> Just a thought Adam -Original Message-From: Koen Maes (BE-day.com) [mailto:[EMAIL PROTECTED]]Sent: Wednesday, December 27, 2000 11:02 AMTo: [EMAIL PROTECTED]Subject: Handler Thread Problem : java.lang.NullPointerException Hi, I upgraded to Tomcat 3.2 because I'm getting Handler Thread Problem : java.lang.NullPointerException I thought it was caused by the virtual hosts, so I tried using the new directive for server.XML You can see my config files below. When I surf to: http://www.garages.be this redirects to http://212.100.172.240/park/index.jsp and gives the error Handler Thread Problem : java.lang.NullPointerException When I simply type http://212.100.172.240/park/index.jsp everything works fine. The index.jsp is completely stripped to <%@ page language="java" import="com.kmoware.register.servlets.*" errorPage="error.jsp" %>URLFORWARDING TEST Getting desperate !!! Thx, Koen * HTTPD.CONF [] ServerAdmin [EMAIL PROTECTED] ServerAlias be-day.com ServerAlias 192.168.1.254 # reached via internal IP ServerAlias www.be-day.com DocumentRoot /var/tomcat/webapps/register ServerName be-day.com ErrorLog logs/www.be-day.com-error_log CustomLog logs/www.be-day.com-access_log combined ApJServMount /register/servlet /register Alias /register /var/tomcat/webapps/register Options FollowSymLinks AllowOverride None deny from all ServerAlias * DocumentRoot /var/tomcat/webapps/park ServerName park.be-day.com ErrorLog logs/park.be-day.com-error_log CustomLog logs/park.be-day.com-access_log combined ApJServMount /park/servlet /park Alias /park /var/tomcat/webapps/park Options FollowSymLinks AllowOverride None deny from all [] SERVER.XML [] []
RE: HANDLER THREAD PROBLEM: java.lang.NullPointerException
Check for the root cause, in the errors which tomcat throws. Shuklix -Original Message-From: Shahed Ali [mailto:[EMAIL PROTECTED]]Sent: Friday, December 22, 2000 10:43 PMTo: [EMAIL PROTECTED]Subject: HANDLER THREAD PROBLEM: java.lang.NullPointerException I get these errors sometimes, can cant figure out what the problem is. Can someone tell me where should I start looking ? Thanks Shahed HANDLER THREAD PROBLEM: java.lang.NullPointerExceptionERROR: can't find default error handler or error in default error page
RE: HANDLER THREAD PROBLEM: Stream closed prematurely
I got mod_jserv to compile and link on AIX. The linker was trying to use an exports file that was missing. I did the following: 1. Hacked the apxs file and added -qcpluscmt to make the compiler ignore the // comments 2. Took a look at .exp files for the .so modules. Each had one line: modulename_module. I created a file in the current directory called mod_jerv.exp with one line: jserv_module. 3. invoked ld with -bE:mod_jserv.exp This resulted in a successful compile. However, I'm now getting a core dump :-/ from httpd. Am I doing things the right way? Rit -Original Message- From: Ranko Bijelonic [mailto:[EMAIL PROTECTED]] Sent: Monday, November 27, 2000 10:08 AM To: [EMAIL PROTECTED] Subject: RE: HANDLER THREAD PROBLEM: Stream closed prematurely i still think its not the platform. My stuff worked fine until I used a version of Apache with ssl, then I got the same problem as you. And building mod_jserv from scratch did not help me either. I had to 'apxs it in'. I don't know why it worked, or what it really did, but just rebuilding mod_jserv.so and sticking it into libexec directory it did not work. it had to be apxs-ed for some reason :). what do you mean apxs does not work though? what kind of errors do you get? I think among other options you have to say with EAPI also. -Original Message- From: Ritwick Dhar [mailto:[EMAIL PROTECTED]] Sent: Monday, November 27, 2000 10:42 AM To: '[EMAIL PROTECTED]' Subject: RE: HANDLER THREAD PROBLEM: Stream closed prematurely Unfortunately, in my case, it doesn't work. The problem is compounded in my case because my platform is AIX4.3.3 + IBM Apache 1.3.6.2 + Tomcat 3.1. Something is seriously screwed up in this level of AIX. apxs does not work. Period. No matter what I do. I built IBM's version of apache from scratch with DSO support. Then I downloaded Apache jServ and built that from scratch. This resulted in a new mod_jserv.so. However, this one makes Apache core dump. So I'm back to square one. Can't believe its *this* difficult getting tomcat to run/build on AIX!!! -Original Message- From: Ranko Bijelonic [mailto:[EMAIL PROTECTED]] Sent: Monday, November 27, 2000 9:47 AM To: [EMAIL PROTECTED] Subject: RE: HANDLER THREAD PROBLEM: Stream closed prematurely I had the exact same problem. Nothing helped until I recompiled mod_jserv using the apache apxs utility. So recompile, and everything should be fine. -Original Message- From: Ritwick Dhar [mailto:[EMAIL PROTECTED]] Sent: Friday, November 24, 2000 4:04 PM To: '[EMAIL PROTECTED]' Subject: RE: HANDLER THREAD PROBLEM: Stream closed prematurely Update on this problem: I simplified the client to simply POST a line of text and the server to simply echo it back. The results seem to be: The client can open an outputstream to a servlet and write to it, but a close() or even a flush() causes the stream to be shut down and the server prints the stacktrace for an IOException. If the stream is not flushed, however, the server proceeds without any input whatsoever (contentlength = 0). I tried this servlet on Jrun and WebSphere. Both work without a hitch. I think this is starting to smell like a bug. Thanks Ritwick -Original Message- From: William Brogden [mailto:[EMAIL PROTECTED]] Sent: Friday, November 24, 2000 11:27 AM To: [EMAIL PROTECTED] Subject: Re: HANDLER THREAD PROBLEM: Stream closed prematurely Does your client close the stream that writes the request or just flush it? I seem to recall having a problem similar to this where the solution was to not close the client's output stream until after the complete transaction. Ritwick Dhar wrote: > > Hi, > > This problem is driving me nuts. I've tried debugging this, but nothing yet. > I was hoping someone on this list will have come accross this before. > > Case: I have a servlet (server) that accepts POST requests (content-type= > application/x-ofx), and sends back a OFX response. I have another servlet > (client), that opens a URL to the server, writes the request, and reads the > reponse. Simple. > > The problem is, the moment the client tries to call > 'urlConn.getInputStream()' to get an inputstream from the server, I get this > (on the server console): > > HANDLER THREAD PROBLEM: java.io.IOException: Stream closed prematurely > java.io.IOException: Stream closed prematurely > at java.lang.Throwable.(Compiled Code) > at java.lang.Exception.(Compiled Code) > at java.io.IOException.(Compiled Code) > at > org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Comp > iled Code) > at > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection > (Compiled Code) > at org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code) > at java.lang.
RE: HANDLER THREAD PROBLEM: Stream closed prematurely
i still think its not the platform. My stuff worked fine until I used a version of Apache with ssl, then I got the same problem as you. And building mod_jserv from scratch did not help me either. I had to 'apxs it in'. I don't know why it worked, or what it really did, but just rebuilding mod_jserv.so and sticking it into libexec directory it did not work. it had to be apxs-ed for some reason :). what do you mean apxs does not work though? what kind of errors do you get? I think among other options you have to say with EAPI also. -Original Message- From: Ritwick Dhar [mailto:[EMAIL PROTECTED]] Sent: Monday, November 27, 2000 10:42 AM To: '[EMAIL PROTECTED]' Subject: RE: HANDLER THREAD PROBLEM: Stream closed prematurely Unfortunately, in my case, it doesn't work. The problem is compounded in my case because my platform is AIX4.3.3 + IBM Apache 1.3.6.2 + Tomcat 3.1. Something is seriously screwed up in this level of AIX. apxs does not work. Period. No matter what I do. I built IBM's version of apache from scratch with DSO support. Then I downloaded Apache jServ and built that from scratch. This resulted in a new mod_jserv.so. However, this one makes Apache core dump. So I'm back to square one. Can't believe its *this* difficult getting tomcat to run/build on AIX!!! -Original Message- From: Ranko Bijelonic [mailto:[EMAIL PROTECTED]] Sent: Monday, November 27, 2000 9:47 AM To: [EMAIL PROTECTED] Subject: RE: HANDLER THREAD PROBLEM: Stream closed prematurely I had the exact same problem. Nothing helped until I recompiled mod_jserv using the apache apxs utility. So recompile, and everything should be fine. -Original Message- From: Ritwick Dhar [mailto:[EMAIL PROTECTED]] Sent: Friday, November 24, 2000 4:04 PM To: '[EMAIL PROTECTED]' Subject: RE: HANDLER THREAD PROBLEM: Stream closed prematurely Update on this problem: I simplified the client to simply POST a line of text and the server to simply echo it back. The results seem to be: The client can open an outputstream to a servlet and write to it, but a close() or even a flush() causes the stream to be shut down and the server prints the stacktrace for an IOException. If the stream is not flushed, however, the server proceeds without any input whatsoever (contentlength = 0). I tried this servlet on Jrun and WebSphere. Both work without a hitch. I think this is starting to smell like a bug. Thanks Ritwick -Original Message- From: William Brogden [mailto:[EMAIL PROTECTED]] Sent: Friday, November 24, 2000 11:27 AM To: [EMAIL PROTECTED] Subject: Re: HANDLER THREAD PROBLEM: Stream closed prematurely Does your client close the stream that writes the request or just flush it? I seem to recall having a problem similar to this where the solution was to not close the client's output stream until after the complete transaction. Ritwick Dhar wrote: > > Hi, > > This problem is driving me nuts. I've tried debugging this, but nothing yet. > I was hoping someone on this list will have come accross this before. > > Case: I have a servlet (server) that accepts POST requests (content-type= > application/x-ofx), and sends back a OFX response. I have another servlet > (client), that opens a URL to the server, writes the request, and reads the > reponse. Simple. > > The problem is, the moment the client tries to call > 'urlConn.getInputStream()' to get an inputstream from the server, I get this > (on the server console): > > HANDLER THREAD PROBLEM: java.io.IOException: Stream closed prematurely > java.io.IOException: Stream closed prematurely > at java.lang.Throwable.(Compiled Code) > at java.lang.Exception.(Compiled Code) > at java.io.IOException.(Compiled Code) > at > org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Comp > iled Code) > at > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection > (Compiled Code) > at org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code) > at java.lang.Thread.run(Compiled Code) > > What's really driving me up the wall is that this works perfectly fine with > Both WebSphere and JRun. Is this something particular to Tomcat?? > > Thanks for all help > > Rit -- WBB - [EMAIL PROTECTED] Author of Java Developer's Guide to Servlets and JSP ISBN 0-7821-2809-2
RE: HANDLER THREAD PROBLEM: Stream closed prematurely
Unfortunately, in my case, it doesn't work. The problem is compounded in my case because my platform is AIX4.3.3 + IBM Apache 1.3.6.2 + Tomcat 3.1. Something is seriously screwed up in this level of AIX. apxs does not work. Period. No matter what I do. I built IBM's version of apache from scratch with DSO support. Then I downloaded Apache jServ and built that from scratch. This resulted in a new mod_jserv.so. However, this one makes Apache core dump. So I'm back to square one. Can't believe its *this* difficult getting tomcat to run/build on AIX!!! -Original Message- From: Ranko Bijelonic [mailto:[EMAIL PROTECTED]] Sent: Monday, November 27, 2000 9:47 AM To: [EMAIL PROTECTED] Subject: RE: HANDLER THREAD PROBLEM: Stream closed prematurely I had the exact same problem. Nothing helped until I recompiled mod_jserv using the apache apxs utility. So recompile, and everything should be fine. -Original Message- From: Ritwick Dhar [mailto:[EMAIL PROTECTED]] Sent: Friday, November 24, 2000 4:04 PM To: '[EMAIL PROTECTED]' Subject: RE: HANDLER THREAD PROBLEM: Stream closed prematurely Update on this problem: I simplified the client to simply POST a line of text and the server to simply echo it back. The results seem to be: The client can open an outputstream to a servlet and write to it, but a close() or even a flush() causes the stream to be shut down and the server prints the stacktrace for an IOException. If the stream is not flushed, however, the server proceeds without any input whatsoever (contentlength = 0). I tried this servlet on Jrun and WebSphere. Both work without a hitch. I think this is starting to smell like a bug. Thanks Ritwick -Original Message- From: William Brogden [mailto:[EMAIL PROTECTED]] Sent: Friday, November 24, 2000 11:27 AM To: [EMAIL PROTECTED] Subject: Re: HANDLER THREAD PROBLEM: Stream closed prematurely Does your client close the stream that writes the request or just flush it? I seem to recall having a problem similar to this where the solution was to not close the client's output stream until after the complete transaction. Ritwick Dhar wrote: > > Hi, > > This problem is driving me nuts. I've tried debugging this, but nothing yet. > I was hoping someone on this list will have come accross this before. > > Case: I have a servlet (server) that accepts POST requests (content-type= > application/x-ofx), and sends back a OFX response. I have another servlet > (client), that opens a URL to the server, writes the request, and reads the > reponse. Simple. > > The problem is, the moment the client tries to call > 'urlConn.getInputStream()' to get an inputstream from the server, I get this > (on the server console): > > HANDLER THREAD PROBLEM: java.io.IOException: Stream closed prematurely > java.io.IOException: Stream closed prematurely > at java.lang.Throwable.(Compiled Code) > at java.lang.Exception.(Compiled Code) > at java.io.IOException.(Compiled Code) > at > org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Comp > iled Code) > at > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection > (Compiled Code) > at org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code) > at java.lang.Thread.run(Compiled Code) > > What's really driving me up the wall is that this works perfectly fine with > Both WebSphere and JRun. Is this something particular to Tomcat?? > > Thanks for all help > > Rit -- WBB - [EMAIL PROTECTED] Author of Java Developer's Guide to Servlets and JSP ISBN 0-7821-2809-2
RE: HANDLER THREAD PROBLEM: Stream closed prematurely
I had the exact same problem. Nothing helped until I recompiled mod_jserv using the apache apxs utility. So recompile, and everything should be fine. -Original Message- From: Ritwick Dhar [mailto:[EMAIL PROTECTED]] Sent: Friday, November 24, 2000 4:04 PM To: '[EMAIL PROTECTED]' Subject: RE: HANDLER THREAD PROBLEM: Stream closed prematurely Update on this problem: I simplified the client to simply POST a line of text and the server to simply echo it back. The results seem to be: The client can open an outputstream to a servlet and write to it, but a close() or even a flush() causes the stream to be shut down and the server prints the stacktrace for an IOException. If the stream is not flushed, however, the server proceeds without any input whatsoever (contentlength = 0). I tried this servlet on Jrun and WebSphere. Both work without a hitch. I think this is starting to smell like a bug. Thanks Ritwick -Original Message- From: William Brogden [mailto:[EMAIL PROTECTED]] Sent: Friday, November 24, 2000 11:27 AM To: [EMAIL PROTECTED] Subject: Re: HANDLER THREAD PROBLEM: Stream closed prematurely Does your client close the stream that writes the request or just flush it? I seem to recall having a problem similar to this where the solution was to not close the client's output stream until after the complete transaction. Ritwick Dhar wrote: > > Hi, > > This problem is driving me nuts. I've tried debugging this, but nothing yet. > I was hoping someone on this list will have come accross this before. > > Case: I have a servlet (server) that accepts POST requests (content-type= > application/x-ofx), and sends back a OFX response. I have another servlet > (client), that opens a URL to the server, writes the request, and reads the > reponse. Simple. > > The problem is, the moment the client tries to call > 'urlConn.getInputStream()' to get an inputstream from the server, I get this > (on the server console): > > HANDLER THREAD PROBLEM: java.io.IOException: Stream closed prematurely > java.io.IOException: Stream closed prematurely > at java.lang.Throwable.(Compiled Code) > at java.lang.Exception.(Compiled Code) > at java.io.IOException.(Compiled Code) > at > org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Comp > iled Code) > at > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection > (Compiled Code) > at org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code) > at java.lang.Thread.run(Compiled Code) > > What's really driving me up the wall is that this works perfectly fine with > Both WebSphere and JRun. Is this something particular to Tomcat?? > > Thanks for all help > > Rit -- WBB - [EMAIL PROTECTED] Author of Java Developer's Guide to Servlets and JSP ISBN 0-7821-2809-2
RE: HANDLER THREAD PROBLEM: Stream closed prematurely
Update on this problem: I simplified the client to simply POST a line of text and the server to simply echo it back. The results seem to be: The client can open an outputstream to a servlet and write to it, but a close() or even a flush() causes the stream to be shut down and the server prints the stacktrace for an IOException. If the stream is not flushed, however, the server proceeds without any input whatsoever (contentlength = 0). I tried this servlet on Jrun and WebSphere. Both work without a hitch. I think this is starting to smell like a bug. Thanks Ritwick -Original Message- From: William Brogden [mailto:[EMAIL PROTECTED]] Sent: Friday, November 24, 2000 11:27 AM To: [EMAIL PROTECTED] Subject: Re: HANDLER THREAD PROBLEM: Stream closed prematurely Does your client close the stream that writes the request or just flush it? I seem to recall having a problem similar to this where the solution was to not close the client's output stream until after the complete transaction. Ritwick Dhar wrote: > > Hi, > > This problem is driving me nuts. I've tried debugging this, but nothing yet. > I was hoping someone on this list will have come accross this before. > > Case: I have a servlet (server) that accepts POST requests (content-type= > application/x-ofx), and sends back a OFX response. I have another servlet > (client), that opens a URL to the server, writes the request, and reads the > reponse. Simple. > > The problem is, the moment the client tries to call > 'urlConn.getInputStream()' to get an inputstream from the server, I get this > (on the server console): > > HANDLER THREAD PROBLEM: java.io.IOException: Stream closed prematurely > java.io.IOException: Stream closed prematurely > at java.lang.Throwable.(Compiled Code) > at java.lang.Exception.(Compiled Code) > at java.io.IOException.(Compiled Code) > at > org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Comp > iled Code) > at > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection > (Compiled Code) > at org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code) > at java.lang.Thread.run(Compiled Code) > > What's really driving me up the wall is that this works perfectly fine with > Both WebSphere and JRun. Is this something particular to Tomcat?? > > Thanks for all help > > Rit -- WBB - [EMAIL PROTECTED] Author of Java Developer's Guide to Servlets and JSP ISBN 0-7821-2809-2
RE: HANDLER THREAD PROBLEM: Stream closed prematurely
Kurt, No. Post 8008 is for the stand-alone server - I'm using apache. 8007 is the internal port which Tomcat uses to talk to Apache (I think). I'm simply sending my requests to 80. William, You may be on to something. I've tried not closing the output stream from the client at all, but that didn't do much good. Maybe I'll try some other things on those lines now. Thanks Rit -Original Message- From: William Brogden [mailto:[EMAIL PROTECTED]] Sent: Friday, November 24, 2000 11:27 AM To: [EMAIL PROTECTED] Subject: Re: HANDLER THREAD PROBLEM: Stream closed prematurely Does your client close the stream that writes the request or just flush it? I seem to recall having a problem similar to this where the solution was to not close the client's output stream until after the complete transaction. Ritwick Dhar wrote: > > Hi, > > This problem is driving me nuts. I've tried debugging this, but nothing yet. > I was hoping someone on this list will have come accross this before. > > Case: I have a servlet (server) that accepts POST requests (content-type= > application/x-ofx), and sends back a OFX response. I have another servlet > (client), that opens a URL to the server, writes the request, and reads the > reponse. Simple. > > The problem is, the moment the client tries to call > 'urlConn.getInputStream()' to get an inputstream from the server, I get this > (on the server console): > > HANDLER THREAD PROBLEM: java.io.IOException: Stream closed prematurely > java.io.IOException: Stream closed prematurely > at java.lang.Throwable.(Compiled Code) > at java.lang.Exception.(Compiled Code) > at java.io.IOException.(Compiled Code) > at > org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Comp > iled Code) > at > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection > (Compiled Code) > at org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code) > at java.lang.Thread.run(Compiled Code) > > What's really driving me up the wall is that this works perfectly fine with > Both WebSphere and JRun. Is this something particular to Tomcat?? > > Thanks for all help > > Rit -- WBB - [EMAIL PROTECTED] Author of Java Developer's Guide to Servlets and JSP ISBN 0-7821-2809-2
Re: HANDLER THREAD PROBLEM: Stream closed prematurely
Does your client close the stream that writes the request or just flush it? I seem to recall having a problem similar to this where the solution was to not close the client's output stream until after the complete transaction. Ritwick Dhar wrote: > > Hi, > > This problem is driving me nuts. I've tried debugging this, but nothing yet. > I was hoping someone on this list will have come accross this before. > > Case: I have a servlet (server) that accepts POST requests (content-type= > application/x-ofx), and sends back a OFX response. I have another servlet > (client), that opens a URL to the server, writes the request, and reads the > reponse. Simple. > > The problem is, the moment the client tries to call > 'urlConn.getInputStream()' to get an inputstream from the server, I get this > (on the server console): > > HANDLER THREAD PROBLEM: java.io.IOException: Stream closed prematurely > java.io.IOException: Stream closed prematurely > at java.lang.Throwable.(Compiled Code) > at java.lang.Exception.(Compiled Code) > at java.io.IOException.(Compiled Code) > at > org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Comp > iled Code) > at > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection > (Compiled Code) > at org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code) > at java.lang.Thread.run(Compiled Code) > > What's really driving me up the wall is that this works perfectly fine with > Both WebSphere and JRun. Is this something particular to Tomcat?? > > Thanks for all help > > Rit -- WBB - [EMAIL PROTECTED] Author of Java Developer's Guide to Servlets and JSP ISBN 0-7821-2809-2
Re: HANDLER THREAD PROBLEM: Stream closed prematurely
Ritwick Dhar wrote: > HANDLER THREAD PROBLEM: java.io.IOException: Stream closed prematurely > java.io.IOException: Stream closed prematurely > at java.lang.Throwable.(Compiled Code) > at java.lang.Exception.(Compiled Code) > at java.io.IOException.(Compiled Code) > at > org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Comp > iled Code) Could it be that you want to connect via port 8007 (which is for connections using the AJP12 protocol) when you really want to be using port 8080 (which is the port to use for normal HTTP requests)? -- Kurt Bernhard Pruenner --- Haendelstrasse 17 --- 4020 Linz --- Austria Music: http://www.mp3.com/Leak --- Work: http://www.ssw.uni-linz.ac.at ...It might be written "Mindfuck", but it's spelt "L-A-I-N"... np: Senor Coconut - Showroom Dummies (El Baile Aleman)
RE: HANDLER THREAD PROBLEM: Stream closed prematurely
Alex, Unfortunately, I'm already running it with Apache. (IBM HTTP Server based on Apache with SSL). Thanks for the reply. Rit -Original Message- From: Roytman, Alex [mailto:[EMAIL PROTECTED]] Sent: Friday, November 24, 2000 10:53 AM To: '[EMAIL PROTECTED]' Subject: RE: HANDLER THREAD PROBLEM: Stream closed prematurely If you are running Tomcat standalone I would suggest to try it with Apache web server. We had some problems with tomcat built in web server - POST input stream would only give you first 1300 bytes of POST data and some other problems I do not remember. I believe apache inherited it from Sun Web server which had these problems. However all these problems were not present when we access tomcat via Apache web server Alex -Original Message- From: Ritwick Dhar [mailto:[EMAIL PROTECTED]] Sent: Friday, November 24, 2000 11:35 AM To: '[EMAIL PROTECTED]' Subject: HANDLER THREAD PROBLEM: Stream closed prematurely Hi, This problem is driving me nuts. I've tried debugging this, but nothing yet. I was hoping someone on this list will have come accross this before. Case: I have a servlet (server) that accepts POST requests (content-type= application/x-ofx), and sends back a OFX response. I have another servlet (client), that opens a URL to the server, writes the request, and reads the reponse. Simple. The problem is, the moment the client tries to call 'urlConn.getInputStream()' to get an inputstream from the server, I get this (on the server console): HANDLER THREAD PROBLEM: java.io.IOException: Stream closed prematurely java.io.IOException: Stream closed prematurely at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at java.io.IOException.(Compiled Code) at org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Comp iled Code) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Compiled Code) at org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code) at java.lang.Thread.run(Compiled Code) What's really driving me up the wall is that this works perfectly fine with Both WebSphere and JRun. Is this something particular to Tomcat?? Thanks for all help Rit
RE: HANDLER THREAD PROBLEM: Stream closed prematurely
If you are running Tomcat standalone I would suggest to try it with Apache web server. We had some problems with tomcat built in web server - POST input stream would only give you first 1300 bytes of POST data and some other problems I do not remember. I believe apache inherited it from Sun Web server which had these problems. However all these problems were not present when we access tomcat via Apache web server Alex -Original Message- From: Ritwick Dhar [mailto:[EMAIL PROTECTED]] Sent: Friday, November 24, 2000 11:35 AM To: '[EMAIL PROTECTED]' Subject: HANDLER THREAD PROBLEM: Stream closed prematurely Hi, This problem is driving me nuts. I've tried debugging this, but nothing yet. I was hoping someone on this list will have come accross this before. Case: I have a servlet (server) that accepts POST requests (content-type= application/x-ofx), and sends back a OFX response. I have another servlet (client), that opens a URL to the server, writes the request, and reads the reponse. Simple. The problem is, the moment the client tries to call 'urlConn.getInputStream()' to get an inputstream from the server, I get this (on the server console): HANDLER THREAD PROBLEM: java.io.IOException: Stream closed prematurely java.io.IOException: Stream closed prematurely at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at java.io.IOException.(Compiled Code) at org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Comp iled Code) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Compiled Code) at org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code) at java.lang.Thread.run(Compiled Code) What's really driving me up the wall is that this works perfectly fine with Both WebSphere and JRun. Is this something particular to Tomcat?? Thanks for all help Rit