Closed mikals0ft closed 7 years ago
Hi Mike
Thanks for bring this issue up. From the logs, the polling queue operation took longer than 20 seconds, which most likely reached the long pulling time limit. Before we dive deep, I would like to collect a few pieces of information from you:
Appreciate if you could double check above mentioned cases, and with those additional information, we could help to identify the root cause.
Thanks again to use this library and report issue.
Hi Simon Thanks for the reply.
Aug 04, 2016 10:20:16 AM com.amazonaws.http.AmazonHttpClient executeHelper INFO: Unable to execute HTTP request: connect timed out java.net.SocketTimeoutException: connect timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668) at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:524) at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:403) at com.amazonaws.http.conn.ssl.SdkTLSSocketFactory.connectSocket(SdkTLSSocketFactory.java:118) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177) at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446) at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:685) at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:460) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:295) at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:2339) at com.amazonaws.services.sqs.AmazonSQSClient.receiveMessage(AmazonSQSClient.java:1072) at com.amazonaws.services.cloudtrail.processinglibrary.manager.SqsManager.pollQueue(SqsManager.java:126) at com.amazonaws.services.cloudtrail.processinglibrary.reader.EventReader.getSources(EventReader.java:114) at com.amazonaws.services.cloudtrail.processinglibrary.AWSCloudTrailProcessingExecutor$ScheduledJob.run(AWSCloudTrailProcessingExecutor.java:172) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
Edit: I tried the receive-message command through the aws cli, and everything seems to be working fine, so it looks like my queue is indeed configured correctly and my access keys are valid.
Thanks! Best, Michael
Based on the error message, seems related to the timeout (socket and connection) setting in the SQS client. Did you pass in your own SQS client or use the default SQS client? If you pass in your own SQS client, can you let me know your timeout setting?
I used the default SQS client.
Hi Mike,
I wonder if this issue is still happening. If so, feel free to reopen the issue.
For your reference, I ran the sample application from scratch in the following steps:
If all of above steps are configured correct, you are expected to see the following message:
INFO: pollQueue is true , and latency is 288 milliseconds.
Oct 10, 2017 1:40:30 PM sample.SampleProgressReporter reportEnd
INFO: parseMessage is true , and latency is 1 milliseconds.
Please feel free let us know if you have any question.
-Ming
Hi,
I tried to run the sample application, SampleApp. However, it constantly returns: pollQueue is false , and latency is 202832 milliseconds. This seems to be from the SampleProgressReporter, and the executor never seems to go past the pollQueue phase. Any ideas on how to fix this? Thanks.
Best, Michael Qiu