[Bug 63931] The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid state

2019-12-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63931

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #10 from Mark Thomas  ---
We tracked down the issue with the application code not seeing a
SocketTimeoutException. That is fixed in:
- master for 9.0.30 onwards
- 8.5.x for 8.5.50 onwards

I also confirmed that both onError() and onClose() were called both before and
after this change.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63931] The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid state

2019-12-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63931

--- Comment #9 from Mark Thomas  ---
That you aren't seeing any exceptions before this one is not what I would
expect.

We have a unit test (TestWebSocketFrameClient) that can be fairly easily
tweaked to simulate this scenario - a server sending data faster than a client
can handle. I've done some investigation with this and I don't see the expected
exceptions either.

Digging into the code, I think something might not be quite right with the low
level asyncIO API. You can try useAsyncIO="false" on the Connector in
server.xml to see if that helps.

Meanwhile, the thread to follow on the dev@ list is this one:
https://tomcat.markmail.org/thread/kt7rcu7utlb77wk4

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63931] The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid state

2019-11-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63931

--- Comment #8 from Saurav Singh  ---
Hey Mark! Sorry if my tone of comment #6 sounds something different which
wasn't meant to be its just being impatient.

When i raised the bug with Apche i didn't think of cost involved; its apache
foundation decision to go open source or go license i respect that.

Bug was raised in seek to understand what's goffy thing going on in production
when incoming messages rate increases. and to be very honest no IOException
being thrown any where.

Thanks for your help with free of cost. Have a good one.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63931] The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid state

2019-11-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63931

--- Comment #7 from Mark Thomas  ---
>From the tone of comment #6 you appear to have forgotten that everyone here is
a volunteer, providing you with help and assistance (at no cost) to use the
software that you have been given (also at no cost). 

What makes this worse is that it has already been explained to you what is
going wrong. An explanation that was provided within 2 hours of the issue being
opened.

Let me try again with more words.

Something goes wrong. This is probably a timeout due to congestion at the
client and/or network and/or Tomcat because one or more of those components
can't handle the message volume.

At the point something goes wrong Tomcat will:
- throw an IOException that the application will see (based on the stack trace
you provided)
- close the session, triggering an onClose() event for the Endpoint that the
application should handle

If the application ignores the Exception and the onClose() event and continues
to try and write messages you will see the IllegalStateException reported in
the original report.

That the application ignores / swallows / fails to handle the Exception is an
application issue, not a Tomcat issue. This is something that needs to be fixed
in the application, not in Tomcat.

That the application ignores / swallows / fails to handle the onClose() event
is an application issue, not a Tomcat issue. This is something that needs to be
fixed in the application, not in Tomcat. You may wish to enquire with the
Spring team what the application needs to do to ensure that it is notified when
the onClose() event is triggered.

The only area where Tomcat may be able to do more (and why this issue is still
open rather than being resolved as INVALID) is preventing applications writing
messages after a close frame has been written to the client. Even if we are
able to improve that, the only difference you are likely to see is a difference
exception if the application tries to write a message after the close frame has
been sent.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63931] The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid state

2019-11-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63931

--- Comment #6 from Saurav Singh  ---
Can I expect any help from apahe team to understand what's wrong going on?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63931] The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid state

2019-11-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63931

--- Comment #5 from Saurav Singh  ---
You can see just now got same issue after raising the bug ticket:

2019-11-18T15:29:29,041 [tainer#0-1] co.ea.ex.no.tr.we.WebSocketServerHandler
ERROR: o.tr.we.WebSocketServerHandler(dToSession:  525) Encountered an error
sending session
StandardWebSocketSession[id=406e750f-554d-a786-8f01-6f0a24408833,
uri=wss://localhost:9004/websocket] open to client!
java.lang.IllegalStateException: The remote endpoint was in state
[TEXT_FULL_WRITING] which is an invalid state for called method
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.checkState(WsRemoteEndpointImplBase.java:1229)
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.textStart(WsRemoteEndpointImplBase.java:1191)
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:190)
at
org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:37)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63931] The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid state

2019-11-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63931

--- Comment #4 from Saurav Singh  ---
So I am working on Spring boot websocket which has method a
afterConnectionClosed(final WebSocketSession session, final CloseStatus status)
throws Exception that I have overriden on same handler class however I haven't
seen any log information being printed anywhere in log. I am not sure whether I
should be like that or any method i have override or configuration changes can
help me to move ahead.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63931] The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid state

2019-11-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63931

--- Comment #3 from Mark Thomas  ---
You should see a call to onClose() before this happens. You should also see an
IOException in the thread writing the message.

One thing I think Tomcat could improve on, is preventing applications trying to
write further messages once the close message has been written to the client.
Although in this scenario, that probably means you just get a different series
of exceptions.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63931] The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid state

2019-11-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63931

--- Comment #2 from Saurav Singh  ---
Hey Mark Thanks for response.

 1. Once you see the exception, do all subsequent attempts to write a message
trigger that exception? Answer --> Yes It does try to write message and trigger
that excpetion and then all threads hung forever.


Or is it intermittent? Answer --> It is not intermittent it happened over the
time always reproducable.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63931] The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid state

2019-11-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63931

Mark Thomas  changed:

   What|Removed |Added

 OS||All

--- Comment #1 from Mark Thomas  ---
Looking at the Tomcat code, there are two ways this can happen.

1. A previous messages has an error which throws an exception. This essentially
means the WebSocket connection is no longer usable.

2. Attempting to send messages concurrently.

>From your description, this looks like a case of 1. Once you see the exception,
do all subsequent attempts to write a message trigger that exception? Or is it
intermittent?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org