Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A3C0210A2B for ; Sat, 10 Jan 2015 14:44:42 +0000 (UTC) Received: (qmail 87998 invoked by uid 500); 10 Jan 2015 14:44:43 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 87940 invoked by uid 500); 10 Jan 2015 14:44:43 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 87792 invoked by uid 99); 10 Jan 2015 14:44:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Jan 2015 14:44:43 +0000 X-ASF-Spam-Status: No, hits=3.2 required=5.0 tests=FORGED_YAHOO_RCVD,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of matmsh@yahoo.com designates 98.139.212.179 as permitted sender) Received: from [98.139.212.179] (HELO nm20.bullet.mail.bf1.yahoo.com) (98.139.212.179) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Jan 2015 14:44:36 +0000 Received: from [98.139.215.140] by nm20.bullet.mail.bf1.yahoo.com with NNFMP; 10 Jan 2015 14:43:10 -0000 Received: from [98.139.212.235] by tm11.bullet.mail.bf1.yahoo.com with NNFMP; 10 Jan 2015 14:43:10 -0000 Received: from [127.0.0.1] by omp1044.mail.bf1.yahoo.com with NNFMP; 10 Jan 2015 14:43:10 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 181442.65964.bm@omp1044.mail.bf1.yahoo.com X-YMail-OSG: qNejgNEVM1kMcpUTFpzQWhmzFn6vgoERJiYlGZxRbCQTcqhdpMfKC_LSJid.Qyl Svr5U0XZjScyc3O12nVAYN_nMYR3mQfJ5Pl3_usus6_fWuW3_zQwJu0iCA0GsFYScbUsnDnVBPVy KANEb5DPcOrT50cYUUQzBUWHhzs_1bjsGMEknWQQx95pJunDSzfG8Ca8l_8pbGq9O8ow352rgB9G b.B2GFWI2dPt3ts6smvRCcDJNxLJhjq2UokLz3aD_ou7dR91fnArnQvfV5ULRQmysk4qwlSihW96 m6ut.UQWX.OvVZDElBFKbRJr3mS5EIjuvEsdlQzbE4rco4t1VF9w6MmufX2u4Zu.3adf50nq98jk X3aOtlcgfCt.7xvZX4aYX0Tp9nlKHj6.Dfvjjf5ne3mtzZwqMX6jAv74vJ7IKrz4SWYc85nauy50 SPubWzU3YIfIJd9bJmT8b5thPr5wGj3Ulo7KzHZPswlH1YoQpqr9TlR43K3zucPJGEKw04pnx7kPY Received: by 76.13.26.142; Sat, 10 Jan 2015 14:43:09 +0000 Date: Sat, 10 Jan 2015 14:43:09 +0000 (UTC) From: Shing Hing Man Reply-To: Shing Hing Man To: "users@camel.apache.org" Message-ID: <450617909.178733.1420900989330.JavaMail.yahoo@jws10695.mail.bf1.yahoo.com> Subject: Timeout Exception in S3 download MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_178732_1977364244.1420900989321" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_178732_1977364244.1420900989321 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I am using Apache Camel 2.14.1. I have set up=C2=A0 the following S3 route = to download from a S3 Bucket.=20 String bucketName =3D "myBucket"; String prefix =3D "out"; String awsURLT= emplate=3D"aws-s3://%s?accessKey=3D%s&secretKey=3DRAW(%s)®ion=3Deu-west-= 1&prefix=3D%s&deleteAfterRead=3Dfalse"; final String awsURL =3D String.form= at(awsURLTemplate,bucketName, accessKey,secretKey,prefix); DefaultCamelCo= ntext context =3D new DefaultCamelContext(); context.addRoutes(new RouteBu= ilder() {=C2=A0=C2=A0=C2=A0 public void configure() { =C2=A0=C2=A0=C2=A0 //= Only download {myBucket}/out/**.txt}. =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= from(awsURL).filter().simple("${header.camelawss3key} regex '.*\\.txt'")= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .setHeader(Exchange.FILE_NAME, simple("${hea= der.camelawss3key}")).to("file:camel/in"); =C2=A0=C2=A0=C2=A0=C2=A0 } }); c= ontext.start(); Thread.sleep(600000); When the above is run, all the txt files in S3 myBucket/out are downloade= d. But about 1 minute later (without adding any files to the bucket), I get= the following timeout exception.[ead #0 - aws-s3://camel-lombok] AmazonHtt= pClient INFO Unable to execute HTTP request: Timeout waiting for connection= from poolorg.apache.http.conn.ConnectionPoolTimeoutException: Timeout wait= ing for connection from pool at org.apache.http.impl.conn.PoolingClientConn= ectionManager.leaseConnection(PoolingClientConnectionManager.java:226)[http= client-4.3.4.jar:4.3.4] at org.apache.http.impl.conn.PoolingClientConnectio= nManager$1.getConnection(PoolingClientConnectionManager.java:195)[httpclien= t-4.3.4.jar:4.3.4] at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown S= ource) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA= ccessorImpl.java:43)[:1.7.0_40] at java.lang.reflect.Method.invoke(Method.j= ava:606)[:1.7.0_40] at com.amazonaws.http.conn.ClientConnectionRequestFacto= ry$Handler.invoke(ClientConnectionRequestFactory.java:70)[aws-java-sdk-1.8.= 9.1.jar:] at com.amazonaws.http.conn.$Proxy13.getConnection(Unknown Source)= [:] at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRe= questDirector.java:423)[httpclient-4.3.4.jar:4.3.4] at org.apache.http.impl= .client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)[httpclien= t-4.3.4.jar:4.3.4] at org.apache.http.impl.client.CloseableHttpClient.execu= te(CloseableHttpClient.java:82)[httpclient-4.3.4.jar:4.3.4] at org.apache.h= ttp.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)[ht= tpclient-4.3.4.jar:4.3.4] at com.amazonaws.http.AmazonHttpClient.executeHel= per(AmazonHttpClient.java:464)[aws-java-sdk-1.8.9.1.jar:] at com.amazonaws.= http.AmazonHttpClient.execute(AmazonHttpClient.java:273)[aws-java-sdk-1.8.9= .1.jar:] at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.= java:3660)[aws-java-sdk-1.8.9.1.jar:] at com.amazonaws.services.s3.AmazonS3= Client.getObject(AmazonS3Client.java:1133)[aws-java-sdk-1.8.9.1.jar:] at co= m.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:1005)[= aws-java-sdk-1.8.9.1.jar:] at org.apache.camel.component.aws.s3.S3Consumer.= createExchanges(S3Consumer.java:104)[camel-aws-2.14.1.jar:2.14.1] at org.ap= ache.camel.component.aws.s3.S3Consumer.poll(S3Consumer.java:85)[camel-aws-2= .14.1.jar:2.14.1] at org.apache.camel.impl.ScheduledPollConsumer.doRun(Sche= duledPollConsumer.java:187)[camel-core-2.14.1.jar:2.14.1] at org.apache.cam= el.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)[camel-cor= e-2.14.1.jar:2.14.1] at java.util.concurrent.Executors$RunnableAdapter.call= (Executors.java:471)[:1.7.0_40] at java.util.concurrent.FutureTask.runAndRe= set(FutureTask.java:304)[:1.7.0_40] at java.util.concurrent.ScheduledThread= PoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.jav= a:178)[:1.7.0_40] at java.util.concurrent.ScheduledThreadPoolExecutor$Sched= uledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.7.0_40] at java= .util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)= [:1.7.0_40] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo= lExecutor.java:615)[:1.7.0_40] at java.lang.Thread.run(Thread.java:724)[:1.= 7.0_40] Thanks in advance for any assistance ! Shing ------=_Part_178732_1977364244.1420900989321--