Disable Keep Alive for Java Client in IBM HTTP Server to avoid POST upload failures
Client POST Requests from User-Agent: Java1.6.0.02 client may intermittently fail due to a previous idle keep alive connection being closed by the IBM HTTP Server. It is normal for the web server to close an idle keep alive connection after KeepAliveTimeout fires (default 15 seconds). It is not normal behavior for a client to send an HTTP request over a previously closed connection. The Java client may eventually retry the same POST request again over a new connection, but the retried request fails because the request is missing the POST body data.
[23/Feb/2012:16:35:30 +0530] "POST /example HTTP/1.1" 200 -
If Loglevel="Trace" is enabled in the plugin-cfg.xml, the http_plugin.log will typically report the following message indicating it failed to read the body data as well
[Thu Feb 23 16:43:29 2012] 00000289 00000004 - TRACE: mod_was_ap20_http:
cb_read_body: Failed to read the full body from the browser. just_read =
0 of the expected 2677
[Thu Feb 23 16:43:29 2012] 00000289 00000004 - TRACE: lib_htrequest:
htrequestSetError: Setting the error to: |READ_FAILED|(1, Line: 1625)
[Thu Feb 23 16:43:29 2012] 00000289 00000004 - WARNING: ws_common:
websphereExecute: Error reading post data from client
This Java client is not able to properly detect when a keep alive connection is closed by the web server and may send a POST request over this already closed connection. The Java1.6.0.02 client may eventually detect the closed keep alive connection and open a new connection and retry the same POST again, but will only send the POST headers the second time and no body data.
Resolving the problem
The Java client should properly detect when a keep alive connection is closed and not try to submit any additional requests over this already closed connection.
To workaround the problem related to this particular Java client, use the BrowserMatch directive in /IHS root/conf/httpd.conf file to disable keep alive connections for this Java client.
BrowserMatch "Java1.6.0.02" nokeepalive
More support for:
WebSphere Application Server
Software version: 6.1, 7.0, 8.0
Operating system(s): AIX, HP-UX, Linux, Solaris, Windows
Reference #: 1590497
Modified date: 27 October 2014
Translate this page: