Premature EOF caused by Jetty ResourceHandler OutputStream seemingly not being flushed consistently by Jetty
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
TestPlan |
New
|
Undecided
|
Unassigned |
Bug Description
(Stephane Mikaty:2010-10-20
This is not related to HTTPClient, HTTPClient only *points* to the problem.
The problem has to do with unit.server.
or otherwise close the OutputStream to which it is writing. It only calls write(),
but leaves it up to the Jetty servlet engine to decide when to flush, which does not
seem to always happen, Jetty seems to close the connection forcibly without flushing
buffers...
)
In our testlab we almost always get the exception "java.net.
Althogh our test is pass, we get after two hours alarms saying "java.net.
00000281-01 NOTICE Sending SOAP Request...
00000282-01 RAWGETREQUEST http://
HTTPRequest: POST /httpTemp128706
Test Execution Trace:
Run: seq.Test 1 = 1 Pass + 0 Skip + 0 Fail
Recurse: 1 = 1 Pass + 0 Skip + 0 Fail
!!! Warning Count: 3
Finished.
When debugging the problem, we found out the following problem:
com.domeus.
at com.domeus.
at com.domeus.
at com.domeus.
at com.domeus.
at com.domeus.
at com.domeus.
at com.domeus.
at com.domeus.
at com.domeus.
at com.domeus.
at com.domeus.
at com.domeus.
at com.domeus.
at com.domeus.
at com.domeus.
at com.domeus.
Caused by: java.io.
at HTTPClient.
at HTTPClient.
at HTTPClient.
at HTTPClient.
at HTTPClient.
at HTTPClient.
at HTTPClient.
at HTTPClient.
at HTTPClient.
at com.domeus.
at com.domeus.
... 15 more
It seems that the connection gets closed to early. ECM doesn't get information it needs to mark the job as COMPLETE.
Stephane assumes that the suggestion below could be a solution for the problem.
#######
if( targetObj.redirect != null ) {
response.
} else if( !targetObj.dynamic ) {
//we can't use the default server since it won't allow overrriding *anything* (like content-type)
byte[] bytes = StreamUtil.
response.
response.
>>>>>>>>>>>>>>> response.
}
#######
Related branches
description: | updated |
summary: |
- HTTPClient seems to get closed the connection a bit early + Premature EOF caused by Jetty ResourceHandler OutputStream seemingly not + being flushed consistently by Jetty |