Hi,
It turns out I forgot to fill in the context name in the project
properties of the sysdeo plugin and it was using context name "". Ooops!
I would of course prefer an error message instead of the strange
behavior described below. :-)
Regards,
Sebastiaan
Sebastiaan van Erk
Hi,
I'm having a problem I've never had before, and I can't for the life of
me figure out what's going on. My web application is calling
StandardContext.stop() from StandardContext.start() (6.0.16).
Below is the full trace. If any other information is needed, please let
me know. (I'm running
Hi,
I have a tomcat servlet set up in Tomcat 6.0.16 behind Apache 2.2.4 with
mod_proxy and a ProxyPass with ajp:// to a servlet. Now it sometimes
happens to me that a call of request.getRemotePort() in the doPost()
method of the servlet returns -1. When this happens it keeps happening
until I
It seems very unlikely to me that the problem is in the Tomcat code. It
is very widely deployed and any deadlocks would be found relatively
quickly unless you use a very obscure setup.
Did you do any standard deadlock debugging? E.g., thread dumps and
deadlock analysis when the freeze occurs,
Yes, somebody can. In fact, that somebody is YOU!
In every single email from this list there is a header telling you how
to unsubscribe.
Even better, when you go to the Tomcat home page, there is a link
"Mailing Lists", and it too tells you how to unsubscribe!
Regards,
Sebastiaan
[EMAIL PR
er would send them. With firefox the tamper data plugin
allows you to see the exact request (so you can try it outside of a
browser).
Regards,
Sebastiaan
Sebastiaan van Erk wrote:
What kind of environment are you testing in? Does the servlet run on
your local development machine or over the
What kind of environment are you testing in? Does the servlet run on
your local development machine or over the network. Are there possibly
transparent proxies between the two endpoints? You could try testing
with network tools such as netcat to debug what's happening.
Regards,
Sebastiaan
Fel
Check to make sure that it's really running the Http11NioProtocol, it
should say so in the logs when tomcat starts.
Furthermore, what kind of environment are your running in? Make sure
that the CometProcessor class is not in your classpath twice, This can
be caused by build tools which use you
modification as a bug fix.
Regards,
Matthias
-Original Message-
From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 26, 2007 6:53 PM
To: Tomcat Users List
Subject: Re: read data/infinite loop problem with comet
Hi all,
I looked in the Tomcat source code (6.0.13), and
ntext adequately clear for others.
Regards,
Sebastiaan
Christopher Schultz wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Sebastiaan,
Sebastiaan van Erk wrote:
Thanks for the reply. :-)
Okay, this is what I get for responding to a question about Comet,
something about which I ha
worse, my
CometProcessor does not get notified (I don't know why) of the error,
and the Poller goes in an infinite loop.
Does anybody know how I can solve this problem?
Regards,
Sebastiaan
Sebastiaan van Erk wrote:
Hi,
I'm having a problem reading data in my Comet servlet.
In the
Hi Christopher,
Thanks for the reply. :-)
Christopher Schultz wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Sebastiaan,
Sebastiaan van Erk wrote:
I'm having a problem reading data in my Comet servlet.
In the BEGIN event I have the following loop:
while (request.getInputS
Hi,
I'm having a problem reading data in my Comet servlet.
In the BEGIN event I have the following loop:
while (request.getInputStream().available() > 0) {
// log that in read loop, log available()
// read some data
}
// log that read loop is done, log available()
return
ze).
|Regards,
Sebastiaan
|Filip Hanik - Dev Lists wrote:
my only guess would be to turn off buffering in mod_proxy, if that is
possible
Filip
Sebastiaan van Erk wrote:
Hi all,
I wrote a Comet servlet for Tomcat, and am ready to deploy it.
However, my "normal" mode of deploymen
I can service legacy
pages (php, etc) from Apache?
My preferred solution however would leave Apache as the main server
since the sheer number of useful modules for apache (rewrite, etc.)
makes it very nice to have it in front of Tomcat.
Any tips or ideas are welcome!
Thanks
APR
connector until at least until a stable JDK is released which fixes the
bug; APR uses native selection, does it not?
Regards,
Sebastiaan
Sebastiaan van Erk wrote:
Filip Hanik - Dev Lists wrote:
Sebastiaan van Erk wrote:
Hi,
Filip Hanik - Dev Lists wrote:
it will return 0 after the ti
Filip Hanik - Dev Lists wrote:
Sebastiaan van Erk wrote:
Hi,
Filip Hanik - Dev Lists wrote:
it will return 0 after the timeout has expired if there was no events.
most likely its not a bug in the JDK but in your linux kernel/distro
I just found the Sun bug report + workaround confirming this
et application I'm seeing this problem consistently: the Tomcat
poller thread goes into a busy loop with the selector returning 0. Could
be I'm forgetting to do something which causes this, but I haven't found
a way to solve the problem yet.
Regards,
Sebastiaan
Filip
Sebastia
Hi,
I noticed the tomcat web pages are updated and the 6.0.13 version is
available.
With maven I was able to use 6.0.10 with the following repository:
tomcat-repository
http://tomcat.apache.org/dev/dist/m2-repository/
However the 6.0.13 version is not th
The shutdown listener binds hardcoded on "127.0.0.1". Make sure they're
on a different port for each tomcat instance.
Regards,
Sebastiaan
Hassan Schroeder wrote:
On 5/10/07, Ran Li <[EMAIL PROTECTED]> wrote:
The problem I have now is once I started the first Tomcat I could not
start any of o
Adam Lipscombe wrote:
Folks
I have an odd problem that occurs on TC6 running on fedora core 6.
Apache in fronting TC.
When I try to pass an HTML parameter from a JSP it is not in present
in the request object for the receiving JSP. I get the following in
catalina.out:
WARNING: Parameters: C
Hi,
I seemed to have forgotten to synchronize a single event.close() which
triggered the problem (but only after yesterday's changes). It is
actually working again now...
Regards,
Sebastiaan
Sebastiaan van Erk wrote:
Filip Hanik - Dev Lists wrote:
Filip Hanik - Dev Lists
Filip Hanik - Dev Lists wrote:
Filip Hanik - Dev Lists wrote:
Sebastiaan van Erk wrote:
Hi,
Due to the latest changes (r535030) to the Comet code I'm getting
the AsyncCloseExceptions again, meaning that my synchronization
which worked before is not correct anymore.
What I am doi
Hi,
Due to the latest changes (r535030) to the Comet code I'm getting the
AsyncCloseExceptions again, meaning that my synchronization which worked
before is not correct anymore.
What I am doing is synchronizing all access to the response output
stream and synchronizing with the same lock aro
lephone or email and destroy the original
message without making a copy. Thank you.
- Original Message ----- From: "Sebastiaan van Erk"
<[EMAIL PROTECTED]>
To: "Tomcat Users List"
Sent: Thursday, May 03, 2007 1:07 PM
Subject: NIOSelector busy wait
Hi,
I h
gards,
Sebastiaan
so far I haven't seen the behavior you've explained.
Filip
Sebastiaan van Erk wrote:
Hi,
I have a problem that sometimes the NIO selector goes into a busy
wait loop.
In line 1430 the code of NIOEndpoint.java,
keyCount = selector.select(
Hi,
I have a problem that sometimes the NIO selector goes into a busy wait loop.
In line 1430 the code of NIOEndpoint.java,
keyCount = selector.select(selectorTimeout);
select keeps returning 0 without waiting.
I'm running on the latest trunk version of tomcat 6, on
Hi,
I am working on a scenario with browsers as clients.
The client does requests with JavaScript code like this:
req = new XMLHttpRequest();
req.onreadystatechange = handler;
req.open("post",
"/somecontext/somecometservlet/somerequest?param1=val1¶m2=val2" );
req.send(null);
We intenti
Hi,
I have no problem to get POST parameter with NIO Connector at my
begin.event. With APR connector I also have POST parameter problems.
Strange! A my first request I get the POST parameter. The POST message
close the event and I got an exception after the end event.
It's a race condition
Hi,
How about not arguing about everything ? It is your fault when
parameters are not processed. Tomcat will process parameters with
comet.
No, Comet will not process parameters in POST requests if you call
getParameter() in the BEGIN event and the request body has not yet
arrived. getParamete
Rémy Maucherat wrote:
On 5/2/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
What you seem to want is more in line with the "asynchronous servlet"
(request, wait, response), which Filip and Remy pointed out is not the
quite the same as Tomcat's Comet. Ideally, both mod
Hi,
Wouldn't every application which isn't as dumb as the chat example
(which does not care about the content it reads but simply passes it
back to it's clients) need to implement it's own mechanism to check
whether there is enough input available to start parsing a chunk of
data?
Either that
Praveen Balaji wrote:
The
last few days I have been evaluating using CometProcessor to work like an
Async Servlet for me. I pick up the CometEvent object on BEGIN event and
process the whole request asynchronously. When I am done, I close the I/O
stream.
I
would like to know what the Tomcat
lso synchronized all the close method calls either in
stream
either in comet event)
So, the question is: Is this a bug or simply I have reached the
scalability
limit for my box?
Cheers,
Martin
On 4/30/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
Hi,
I had the same problems. It
Hi,
I have an application which needs to start an embedded Tomcat en share
an object instance with a servlet which will run in the embedded tomcat
servlet container. One solution is to use a static field of a class, but
I prefer a direct way to do this, without using static fields.
Currently
Hi,
I had the same problems. It was a synchronization issue with me. What I
did was make a synchronized output stream wrapper (see attached file)
which wraps all access to the output stream, and I synchronized on this
output stream whenever I called event.close() on the Comet event
(especiall
Hi,
The request, wait, async response + close pattern seems to be a
pretty common use case though, especially with server side push
(AJAX), so it would still be good to have a solution that works well
allways.
Yes, and for this you don't need Comet, you need "Asynchronous
Servlets" they are so
GET parameters, ie parameters in the URL will work.
However, using Comet you shouldn't rely on parameters in the body, the
body if for you usage, and your usage alone.
Seems to me that this is a pretty common use case though with AJAX
server side push: request, wait, response.
Comet is used to
Hi,
* Is it possible, somehow, to end a request asynchronously (that is,
outside the event method)?
Because I keep getting "Out of file descriptor errors" since the END
events come so terribly late after I do the close().
you'd still get "too many open files" errors even if it did close
since
Hi,
I've been thinking about this a bit more, and I understand why normally
the response.close() should not go to the TCP layer: I'd forgotten all
about request pipelining.
However, in my case, the request has an explicit "Connection: close" header.
Would not this case warrent an immediate s
Rémy Maucherat wrote:
On 4/26/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
I don't understand why the client does not get an immediate -1 (EOF) on
the read() as soon as I do this. The socket itself does not need to be
closed, but the output stream close should flush the output
Rémy Maucherat wrote:
On 4/26/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
Hi,
If the body of the POST request is not present at the time of the
getParameter() call, it returns null even if the parameter value is set.
Things don't work like this, obviously. Parameter parsing
Hi,
If the body of the POST request is not present at the time of the
getParameter() call, it returns null even if the parameter value is set.
How to reproduce:
1) Send the headers of a POST request to the CometProcessor.
2) in the event() method of the CometProcessor use getParameter(); it
e essays, they are a
little hard to read :)
Filip
Sebastiaan van Erk wrote:
Hi,
The reason I get the exceptions on the Tomcat server side seems to be
because I close the socket on the client at the same time I try to
close it on the server, causing two unsynchronized closes on the
OutputSt
is the same as a servlet doing a
read during the service method.
Filip
Sebastiaan van Erk wrote:
Hi,
The CometProcessor seems to sometimes miss the initial READ event.
THE OBSERVED BEHAVIOR:
The client sends a request to the server. This request (a POST
request) is sent in the initial TCP
Rémy Maucherat wrote:
On 4/26/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
Note that there really IS a bug here:
request.getInputStream().available() returns 0 in the BEGIN event, so I
cannot test if the data is already available there. However, the API
seems cleaner to me anyway
documentation suggests it should be.
Regards,
Sebastiaan
Sebastiaan van Erk wrote:
Rémy Maucherat wrote:
On 4/26/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
The http://tomcat.apache.org/tomcat-6.0-doc/aio.html documentation
clear
states that I am not allowed to read from the input
Rémy Maucherat wrote:
On 4/26/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
The http://tomcat.apache.org/tomcat-6.0-doc/aio.html documentation clear
states that I am not allowed to read from the input stream outside of
the READ event; thus I'm not allowed to read in the BEGIN ev
Hi,
The CometProcessor seems to sometimes miss the initial READ event.
THE OBSERVED BEHAVIOR:
The client sends a request to the server. This request (a POST request)
is sent in the initial TCP packet. The initial packet also contains some
data (a boundary, Content-Disposition: form-data header
ing to think about
when you're working with events. Also, it may have a clue I'm missing.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42198
Also, check with the trunk to make sure you're able to reproduce your
defect.
Praveen
-Original Message-
From: Sebastiaan van
Hi,
I the following Comet question; due to a server event (not a comet
event), I want to write some data to a client request and finish the
request. Currently I write the data and then call OutputStream.close()
on the response output stream. This seems to work, except that it takes
a long tim
Hi,
The fixes seem to work well, thanks again! :-)
Regards,
Sebastiaan
Sebastiaan van Erk wrote:
Hi,
Thanks for the quick action. I'll test the new version right away. :-)
Regards,
Sebastiaan
Filip Hanik - Dev Lists wrote:
Sebastian,
I have checked in a fix to SVN. You can also
dding
-Dorg.apache.tomcat.util.net.NioSelectorShared=false
to your command line
Filip
Filip Hanik - Dev Lists wrote:
definitely a bug, I will work on a fix right away.
Filip
Sebastiaan van Erk wrote:
Hi,
I have the following problem with Comet. I have a long request, and
I asynchronously write data to the output stream of the res
Hi,
I have the following problem with Comet. I have a long request, and I
asynchronously write data to the output stream of the response while the
request is between the BEGIN and END/ERROR events. However, the writes
do NOT occur while IN a READ request, but are triggered by other events
on
Hi,
I'm running Tomcat 6.0.10 on Linux Ubuntu Feisty on Java 5. I have a
CometProcessor which handles a large number of requests in a very short
time, and after about 3000 requests I consistently get the following two
errors:
Apr 18, 2007 12:09:19 PM org.apache.tomcat.util.net.NioEndpoint$Po
Hi, thanks very much for the replies.
Rémy Maucherat wrote:
On 4/4/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
Ok, so I get a -1 on a read. Now what do I do?
If I just return from the event handler I immediately get another read
:-(. If I close the event I can't do out
t behave in the same way
that it would normally behave after handling a read event and there
being no more data, i.e., do ERROR/TIMOUT events until the event is
closed or new data arrives (which in this case can't happen)?
Regards,
Sebastiaan
Rémy Maucherat wrote:
On 4/4/07, Sebast
is
done as well.
Regards,
Sebastiaan
Sebastiaan van Erk wrote:
Hi,
The pages on Comet say the following about the read event:
EventType.READ: This indicates that input data is available, and that
one read can be made without blocking. The available and ready methods
of the InputStream or Reade
Hi,
The pages on Comet say the following about the read event:
EventType.READ: This indicates that input data is available, and that
one read can be made without blocking. The available and ready methods
of the InputStream or Reader may be used to determine if there is a risk
of blocking: the
Rémy Maucherat wrote:
On 4/3/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
Hi,
Thanks again for the reply. I can't reproduce the END event so probably
I was mistaken, sorry about that. It is indeed the ERROR/TIMEOUT event.
If an exception occurs during the handling of this e
Hi,
Another reason that I need to be able to throw the exception in the
BEGIN event is because for some requests there is no input, only output,
so I might never actually get a READ event (GET requests for long pieces
of data for example). However I do want to write output to the client as
it co
Hi,
Thanks again for the reply. I can't reproduce the END event so probably
I was mistaken, sorry about that. It is indeed the ERROR/TIMEOUT event.
If an exception occurs during the handling of this event (an unforseen
runtime exception for example), then tomcat calls the event method again
w
Hi,
Thanks for the response.
To get these adjustments, do I need to download tomcat from a subversion
(or CVS) repository?
I was also just discovered that in the 6.0.10 version that an exception
in the END event causes the END event to called again; this means that
an uncaught RuntimeExcept
Hi,
I'm trying to use Comet in tomcat 6.0.10, and have the following test class:
public class CometServlet extends HttpServlet implements CometProcessor {
public void event(final CometEvent event) throws IOException,
ServletException {
final HttpServletRequest request = event.getHtt
64 matches
Mail list logo