CloseableHttpAsyncClient not send out http request - java

I want to use CloseableHttpAsyncClient to send a http request in Async mode. But the request is not send out. When enable comment HttpResponse response = future.get(). It works. But I'd like to know why I need future.get() even I didn't care about the response.
Code is here
public class CloseableHttpAsyncClientTest {
#Test
public void whenUseHttpAsyncClient_thenCorrect() throws Exception {
CloseableHttpAsyncClient client = HttpAsyncClients.createDefault();
client.start();
HttpDelete request = new HttpDelete("http://www.bing.com");
Future<HttpResponse> future = client.execute(request, null);
// The delete request will send out if we remove comment here. We just want to send out delete http
// request but not care about the response
// HttpResponse response = future.get();
client.close();
}
}
The console like this
20:28:48.930 [main] DEBUG org.apache.http.impl.nio.client.MainClientExec - [exchange: 1] start execution
20:28:48.941 [main] DEBUG org.apache.http.client.protocol.RequestAddCookies - CookieSpec selected: default
20:28:48.950 [main] DEBUG org.apache.http.client.protocol.RequestAuthCache - Auth cache not set in the context
20:28:48.951 [main] DEBUG org.apache.http.impl.nio.client.InternalHttpAsyncClient - [exchange: 1] Request connection for {}->http://www.bing.com:80
20:28:48.953 [main] DEBUG org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager - Connection request: [route: {}->http://www.bing.com:80][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
20:28:48.976 [main] DEBUG org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager - Connection manager is shutting down
20:28:49.003 [main] DEBUG org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager - Connection manager shut down
After I enable the comments. Like this. It works.
public class CloseableHttpAsyncClientTest {
#Test
public void whenUseHttpAsyncClient_thenCorrect() throws Exception {
CloseableHttpAsyncClient client = HttpAsyncClients.createDefault();
client.start();
HttpDelete request = new HttpDelete("http://www.bing.com");
Future<HttpResponse> future = client.execute(request, null);
// The delete request will send out if we remove comment here. We just want to send out delete http
// request but not care about the response
HttpResponse response = future.get();
client.close();
}
}
From the log, we can see. The http delete has been send out.
20:39:15.998 [main] DEBUG org.apache.http.impl.nio.client.MainClientExec - [exchange: 1] start execution
......
......
20:39:16.137 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> DELETE / HTTP/1.1
20:39:16.137 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> Host: www.bing.com
......
......
20:39:16.142 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 >> "DELETE / HTTP/1.1[\r][\n]"
20:39:16.142 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 >> "Host: www.bing.com[\r][\n]"
20:39:16.142 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
20:39:16.142 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 >> "User-Agent: Apache-HttpAsyncClient/4.1.4 (Java/1.8.0_202)[\r][\n]"
20:39:16.143 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 >> "[\r][\n]"
20:39:16.143 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.InternalIODispatch - http-outgoing-0 [ACTIVE] Request ready
20:39:16.143 [I/O dispatcher 1] DEBUG
......
20:39:16.209 [main] DEBUG org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager - Connection manager shut down

Future<HttpResponse> future = client.execute(request, null);
client.execute will send out http request in Async way. It will take another thread to complete the http request.
HttpResponse response = future.get();
future.get() will block the main thread until client.execute complete and fill the response into future. Without this, the client will be close before http request send out. Cos http request send out by one thread, but client close be closed by main thread. So, main thread need be blocked until future.get() get the result by another thread.

Related

REST-assured JSON output

I am trying to retrieve a JSON file, but it doesn't seem to be a JSON file, but it outputs application/json
12:39:39.403[main] DEBUG org.apache.http.wire - << "[0xb9][0x12][0x3d][0xr4][0xu6][0x43][0xd9][0x12][0xw3][0x43][0xb6][0x1q][0xef][0x13]"
12:39:39.403[main] DEBUG org.apache.http.wire - << "[0xwq][0xq2][0x9d][0x14][0xk6][0xw3][0x9q][0xz2][0xm3][0x4m][0xq6][0xkq][0xlf][0xq3]"
12:39:39.403[main] DEBUG org.apache.http.wire - << "30[\r][\n]"
12:39:39.403[main] DEBUG org.apache.http.wire - << "[0xb9][0x12][0x3d][0xr4][0xu6][0x43][0x9][0x12][0xw3][0x43][0xb6][0x1q][0xef][0x13]"
My rest assured code is
Response response = given().contentType(ContentType.JSON).auth().get("https://sample-url");
I would I like to see an actual JSON output

Apache HttpClient is not showing Content-Length and Content-Encoding headers of the response

I installed Apache httpcomponents-client-5.0.x and while reviewing the headers of the http response, I was shocked it doesn't show the Content-Length and Content-Encoding headers, this is the code I used for testing
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
import org.apache.hc.client5.http.impl.classic.HttpClients;
import com.sun.net.httpserver.Headers;
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpGet request = new HttpGet(new URI("https://www.example.com"));
CloseableHttpResponse response = httpclient.execute(request);
Header[] responseHeaders = response.getHeaders();
for(Header header: responseHeaders) {
System.out.println(header.getName());
}
// this prints all the headers except
// status code header
// Content-Length
// Content-Encoding
No matter what I try I get the same result, like this
Iterator<Header> headersItr = response.headerIterator();
while(headersItr.hasNext()) {
Header header = headersItr.next();
System.out.println(header.getName());
}
Or this
HttpEntity entity = response.getEntity();
System.out.println(entity.getContentEncoding()); // NULL
System.out.println(entity.getContentLength()); // -1
According to this question that has been asked 6 years ago, it seems like an old issue even with older versions of Apache HttpClient.
Of-course the server is actually returning those headers as confirmed by Wireshark, and Apache HttpClient logs itself
2020-04-03 07:59:09,106 DEBUG [org.apache.hc.client5.http.headers] http-outgoing-0 << HTTP/1.1 200 OK
2020-04-03 07:59:09,106 DEBUG [org.apache.hc.client5.http.headers] http-outgoing-0 << Content-Encoding: gzip
2020-04-03 07:59:09,106 DEBUG [org.apache.hc.client5.http.headers] http-outgoing-0 << Accept-Ranges: bytes
2020-04-03 07:59:09,107 DEBUG [org.apache.hc.client5.http.headers] http-outgoing-0 << Age: 451956
2020-04-03 07:59:09,107 DEBUG [org.apache.hc.client5.http.headers] http-outgoing-0 << Cache-Control: max-age=604800
2020-04-03 07:59:09,107 DEBUG [org.apache.hc.client5.http.headers] http-outgoing-0 << Content-Type: text/html; charset=UTF-8
2020-04-03 07:59:09,107 DEBUG [org.apache.hc.client5.http.headers] http-outgoing-0 << Date: Fri, 03 Apr 2020 05:59:09 GMT
2020-04-03 07:59:09,108 DEBUG [org.apache.hc.client5.http.headers] http-outgoing-0 << Etag: "3147526947+gzip"
2020-04-03 07:59:09,108 DEBUG [org.apache.hc.client5.http.headers] http-outgoing-0 << Expires: Fri, 10 Apr 2020 05:59:09 GMT
2020-04-03 07:59:09,108 DEBUG [org.apache.hc.client5.http.headers] http-outgoing-0 << Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT
2020-04-03 07:59:09,108 DEBUG [org.apache.hc.client5.http.headers] http-outgoing-0 << Server: ECS (dcb/7EEB)
2020-04-03 07:59:09,108 DEBUG [org.apache.hc.client5.http.headers] http-outgoing-0 << Vary: Accept-Encoding
2020-04-03 07:59:09,109 DEBUG [org.apache.hc.client5.http.headers] http-outgoing-0 << X-Cache: HIT
2020-04-03 07:59:09,109 DEBUG [org.apache.hc.client5.http.headers] http-outgoing-0 << Content-Length: 648
BTW, java.net.http library known as JDK HttpClient works great and show all the headers.
Is there something wrong I did, or should I report a bug that been there for years ?
HttpComponents committer here...
You did not closely pay attention what Dave G said. By default, HttpClientBuilder will enable transparent decompression and the reason why you don't see some headers anymore is here:
if (decoderFactory != null) {
response.setEntity(new DecompressingEntity(response.getEntity(), decoderFactory));
response.removeHeaders(HttpHeaders.CONTENT_LENGTH);
response.removeHeaders(HttpHeaders.CONTENT_ENCODING);
response.removeHeaders(HttpHeaders.CONTENT_MD5);
} ...
Regarding the JDK HttpClient, it will not perform any transparent decompression, therefore you see the length of the compressed stream. You have to decompress on your own.
curl committer here...
I have raised an issue too.
Update: 03 Feb. '23 The secret codez to disable automatic decompression are:
CloseableHttpClient httpclient = HttpClients.createSimple();
// OR
CloseableHttpClient httpclient = HttpClients.custom().disableContentCompression().build();
The content-length may be potentially ignored in this case.
HttpGet request = new HttpGet(new URI("https://www.example.com"));
request.setHeader("Accept-Encoding", "identity");
CloseableHttpResponse response = httpclient.execute(request);
I can see the following
HttpEntity entity = response.getEntity();
System.out.println(entity.getContentLength());
System.out.println(entity.getContentEncoding());
Output
...
2020-04-03 03:04:17.760 DEBUG 34196 --- [ main] org.apache.hc.client5.http.headers : http-outgoing-0 << Content-Length: 1256
...
1256
null
I'd like to direct your attention to this header being sent:
http-outgoing-0 >> Accept-Encoding: gzip, x-gzip, deflate
That tells the server that this client can accept gzip, x-gzip, and deflate content in response. The response is stating it is 'gzip' encoded.
http-outgoing-0 << Content-Encoding: gzip
I believe that HttpClient is transparently handling this internally and making the content available.
As stated in the other article you referenced, one of the answers indicated that the method EntityUtils.toByteArray(httpResponse.getEntity()).length could be applied to get the content length.

elasticsearch bulk processor failure

I want to index a large batch of index requests to 60 different indices(about 1000 million pieces,indices' name are like boss-log-yyyy-MM-dd).
Here is my java code:
List<IndexRequest> indexRequesList = bossMockDataService.indexRequestGenerator(batch); //generate random mock data.
indexRequesList.forEach(indexRequest -> {
bulkProcessor.add(indexRequest);
});
try {
return bulkProcessor.awaitClose(30L, TimeUnit.SECONDS);
} catch (InterruptedException e) {
e.printStackTrace();
return false;
}
And here is my bulk processor:
#Override
public BulkProcessor initESbulkProcessor(RestHighLevelClient client) {
Settings settings = Settings.EMPTY;
ThreadPool threadPool = new ThreadPool(settings); // I have no Idea what the 'settings' object is.
BulkProcessor.Listener listener = new BulkProcessor.Listener() {
#Override
public void beforeBulk(long executionId, BulkRequest request) {
int numberOfActions = request.numberOfActions();
logger.debug("Executing bulk [{}] with {} requests", executionId, numberOfActions);
}
#Override
public void afterBulk(long executionId, BulkRequest request, BulkResponse response) {
if (response.hasFailures()) {
logger.warn("Bulk [{}] executed with failures", executionId);
} else {
logger.debug("Bulk [{}] completed in {} milliseconds", executionId, response.getTook().getMillis());
}
}
#Override
public void afterBulk(long executionId, BulkRequest request, Throwable failure) {
logger.error("Failed to execute bulk", failure);
}
};
BulkProcessor.Builder builder = new BulkProcessor.Builder(client::bulkAsync, listener, threadPool);
BulkProcessor bulkProcessor = builder.build();
builder.setBulkActions(2000);
builder.setBulkSize(new ByteSizeValue(10L, ByteSizeUnit.MB));
builder.setConcurrentRequests(10);
builder.setFlushInterval(TimeValue.timeValueSeconds(10L));
builder.setBackoffPolicy(BackoffPolicy.constantBackoff(TimeValue.timeValueSeconds(1L), 3));
logger.info("bulk processor build complete!");
return bulkProcessor;
}
It seems some data index request failed.The log is like:
2017-11-15 16:42:24 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [96] executed with failures
2017-11-15 16:42:24 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [97] executed with failures
2017-11-15 16:42:24 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [98] executed with failures
2017-11-15 16:42:24 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [99] executed with failures
2017-11-15 16:42:24 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [100] executed with failures
2017-11-15 16:42:24 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [101] executed with failures
2017-11-15 16:42:24 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [102] executed with failures
2017-11-15 16:42:24 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [103] executed with failures
2017-11-15 16:42:25 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [104] executed with failures
2017-11-15 16:42:25 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [105] executed with failures
2017-11-15 16:42:25 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [106] executed with failures
2017-11-15 16:42:25 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [107] executed with failures
2017-11-15 16:42:25 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [108] executed with failures
2017-11-15 16:42:25 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [109] executed with failures
2017-11-15 16:42:25 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [110] executed with failures
2017-11-15 16:42:26 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [111] executed with failures
2017-11-15 16:42:26 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [112] executed with failures
2017-11-15 16:42:26 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [113] executed with failures
2017-11-15 16:42:26 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [114] executed with failures
2017-11-15 16:42:26 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [115] executed with failures
2017-11-15 16:42:26 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [116] executed with failures
2017-11-15 16:42:26 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [117] executed with failures
2017-11-15 16:42:27 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [118] executed with failures
2017-11-15 16:42:27 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [119] executed with failures
2017-11-15 16:42:27 [I/O dispatcher 1] WARN BossMockDataServiceImpl:220 - Bulk [120] executed with failures
My situation:
New to ES.
1 million pieces of data per day need to be stored and queried.
Yet I have not configured my shard/replica/node/cluster,they are default now.
When I use MySQL,I create a new partition for a day's data.
The limit for MySQL is 60 days.The IO operation is getting more and more slow.
My goal:
Easy to maintain my ES.
Fast query,update and aggregation.
Store 60+ days data.
No tolerance for bulk request failure.(Seems some data lost above)
What I wonder is :
Is it a good idea to create new index for a day's data ? Or I put them in one index?
Why the bulk processor call back is failure ? How to fix it ?
Is it necessary to create more cluster/node ? Where should I begin?

Proxy-Authorization header is not send within first request in Apache HttpComponents

I'm using Apache HttpComponents (4.5.2) and I'm trying to request HTTPS page via proxy server (SSH Tunneling).
The problem is that according to logs Client sends first request without Proxy-Authorization header, but after Proxy respond with 407 error (Proxy Authentication Required), it retires authentication with sending Proxy-Authorization header.
I think problem in my code, I need something like enabling primitive auth , but I couldn't find any information about how to do that.
Below is logs for confirming my words.
First request:
03:12:06,643 DEBUG headers:135 - http-outgoing-0 >> CONNECT t.myhost.com:443 HTTP/1.1
03:12:06,643 DEBUG headers:138 - http-outgoing-0 >> Host: t.myhost.com
03:12:06,643 DEBUG headers:138 - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_45)
03:12:06,793 DEBUG headers:124 - http-outgoing-0 << HTTP/1.1 407 Proxy Authentication Required
03:12:06,794 DEBUG headers:127 - http-outgoing-0 << Proxy-Authenticate: Basic realm="ProxyCompany"
03:12:06,794 DEBUG headers:127 - http-outgoing-0 << Proxy-Connection: close
// then it retries request with included Proxy-Authorization header
03:12:06,795 DEBUG HttpAuthenticator:77 - Authentication required
03:12:06,795 DEBUG HttpAuthenticator:107 - 162.243.116.56:71223 requested authentication
03:12:06,795 DEBUG ProxyAuthenticationStrategy:174 - Authentication schemes in the order of preference: [Negotiate, Kerberos, NTLM, Digest, Basic]
03:12:06,795 DEBUG ProxyAuthenticationStrategy:203 - Challenge for Negotiate authentication scheme not available
03:12:06,796 DEBUG ProxyAuthenticationStrategy:203 - Challenge for Kerberos authentication scheme not available
03:12:06,796 DEBUG ProxyAuthenticationStrategy:203 - Challenge for NTLM authentication scheme not available
03:12:06,796 DEBUG ProxyAuthenticationStrategy:203 - Challenge for Digest authentication scheme not available
03:12:06,800 DEBUG HttpAuthenticator:157 - Selected authentication options: [BASIC [complete=true]]
03:12:06,800 DEBUG DefaultManagedHttpClientConnection:81 - http-outgoing-0: Close connection
03:12:06,801 DEBUG DefaultHttpClientConnectionOperator:138 - Connecting to /162.243.116.56:71223
03:12:06,942 DEBUG DefaultHttpClientConnectionOperator:145 - Connection established 192.168.0.100:13391<->162.243.116.56:71223
03:12:06,942 DEBUG HttpAuthenticator:198 - Generating response to an authentication challenge using basic scheme
03:12:06,947 DEBUG headers:135 - http-outgoing-0 >> CONNECT t.myhost.com:443 HTTP/1.1
03:12:06,947 DEBUG headers:138 - http-outgoing-0 >> Host: t.myhost.com
03:12:06,947 DEBUG headers:138 - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_45)
03:12:06,947 DEBUG headers:138 - http-outgoing-0 >> Proxy-Authorization: Basic bHVtXXXXXXXXXXXXxOTE5NTUXXXXXXRmNmRkYmI1Mjk0MA==
03:12:07,304 DEBUG HttpAuthenticator:86 - Authentication succeeded
03:12:07,305 DEBUG ProxyAuthenticationStrategy:227 - Caching 'basic' auth scheme for http://162.243.116.56:71223
And this is my code (it's Scala, but pretty easy to read):
val credProvider = {
val provider = new BasicCredentialsProvider()
provider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials("myUser", "myPass"))
provider
}
val connManager = {
val mngr = new PoolingHttpClientConnectionManager()
mngr.setDefaultMaxPerRoute(Integer.MAX_VALUE)
mngr.setMaxTotal(Integer.MAX_VALUE)
mngr
}
val client = HttpClients.custom()
.setConnectionManager(connManager)
.disableRedirectHandling()
.setDefaultCredentialsProvider(credProvider)
.setProxy(new HttpHost(162.243.116.56, 71223 ))
.build()
val requestConfig = RequestConfig.custom()
.setConnectTimeout(30000)
.setConnectionRequestTimeout(30000)
.build()
val request = new HttpGet(url)
request.setConfig(requestConfig)
val response = client.execute(request)
How I can solve this problem (cause client to always send Proxy-Authorization )?
I'm not sure if it is the same problem, but with version 4.5.2 there was a bug introduced with the SPN (HTTP/something#somerealm) and https : HTTPCLIENT-1712 (the comments are especially interesting since they show a history of what happened).
A switch to version 4.5.1 should solve it (if this is the same problem of course)

AWS PutObject Connection reset

My AWS Java Client is throwing
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Connection reset
at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1541) ~[na:1.8.0_60]
at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1553) ~[na:1.8.0_60]
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:71) ~[na:1.8.0_60]
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:159) ~[httpcore-4.3.3.jar:4.3.3]
My code is
public void save(String name, byte[] file) {
ObjectMetadata metaData = new ObjectMetadata();
String streamMD5 = new String(Base64.encodeBase64(file));
metaData.setContentMD5(streamMD5);
metaData.setContentLength(file.length);
InputStream stream = new ByteArrayInputStream(file);
try {
PutObjectRequest put = new PutObjectRequest(
configuration.getBucketName(), name, stream, metaData);
s3client.putObject(put);
} finally {
IOUtils.closeQuietly(stream);
}
}
The s3client is a spring bean and is not garbage collected before the stream has finished uploading. I've tried without specifying MD5 and/or content length but still has the same exception thrown.
Logging through AWS library shows:
10:09:15.540 [http-nio-8080-exec-1] DEBUG o.a.h.c.protocol.RequestAddCookies - CookieSpec selected: best-match
10:09:15.540 [http-nio-8080-exec-1] DEBUG o.a.h.c.protocol.RequestAuthCache - Auth cache not set in the context
10:09:15.540 [http-nio-8080-exec-1] DEBUG o.a.h.c.p.RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
10:09:15.540 [http-nio-8080-exec-1] DEBUG c.a.http.impl.client.SdkHttpClient - Attempt 1 to execute request
10:09:15.540 [http-nio-8080-exec-1] DEBUG o.a.h.i.conn.DefaultClientConnection - Sending request: PUT /documeent.pdf HTTP/1.1
10:09:15.540 [http-nio-8080-exec-1] DEBUG org.apache.http.wire - >> "PUT /document.pdf HTTP/1.1[\r][\n]"
10:09:15.540 [http-nio-8080-exec-1] DEBUG org.apache.http.wire - >> "Host: bucket.s3.amazonaws.com[\r][\n]"
10:09:15.540 [http-nio-8080-exec-1] DEBUG org.apache.http.wire - >> "Authorization: AWS 123445667788=[\r][\n]"
10:09:15.540 [http-nio-8080-exec-1] DEBUG org.apache.http.wire - >> "User-Agent: aws-sdk-java/1.10.21 Linux/3.13.0-65-generic Java_HotSpot(TM)_Server_VM/25.60-b23/1.8.0_60[\r][\n]"
10:09:15.540 [http-nio-8080-exec-1] DEBUG org.apache.http.wire - >> "Date: Tue, 06 Oct 2015 09:09:15 GMT[\r][\n]"
10:09:15.663 [http-nio-8080-exec-1] DEBUG com.amazonaws.internal.SdkSSLSocket - closing bucket.s3.amazonaws.com/12.34.56.78:443
10:09:15.665 [http-nio-8080-exec-1] DEBUG o.a.h.i.conn.DefaultClientConnection - I/O error closing connection
I've checked that the file size (3.2M) does not exceed the max file siez for this bucket.
Get/List requests work fine and I can copy files into the S3 bucket using the s3 client tools.
Does anyone know of anything else I should check?
Thanks.

Categories

Resources