Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6780C19B8B for ; Wed, 9 Mar 2016 12:13:41 +0000 (UTC) Received: (qmail 91357 invoked by uid 500); 9 Mar 2016 12:13:41 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 91319 invoked by uid 500); 9 Mar 2016 12:13:41 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 91308 invoked by uid 99); 9 Mar 2016 12:13:41 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Mar 2016 12:13:41 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id A89CB2C14F4 for ; Wed, 9 Mar 2016 12:13:40 +0000 (UTC) Date: Wed, 9 Mar 2016 12:13:40 +0000 (UTC) From: "maria deepak marneni (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HTTPASYNC-104) IlligalStateException when using the same client for mutiple requests. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPASYNC-104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] maria deepak marneni updated HTTPASYNC-104: ------------------------------------------- Attachment: HttpAsyncResponseHandler.java HttpRequestPublisherTester.java eclipseOutput-1 eclipseOutput.txt case 1: eclipseOutput.txt containing the full stack trace with illegalStateException. case 2: where in there is a chance of receiving a NullPointerException while creating ioReactor. eclipseOutput-1 includes the full stack trace for the same Attaching the source code to reproduce the issue. Note: it might require multiple runs to reproduce the issue. if you are lucky the first run itself might throw exception. Just keep executing the program until the exception is seen. Usually one in six runs contain the exception. > IlligalStateException when using the same client for mutiple requests. > ---------------------------------------------------------------------- > > Key: HTTPASYNC-104 > URL: https://issues.apache.org/jira/browse/HTTPASYNC-104 > Project: HttpComponents HttpAsyncClient > Issue Type: Bug > Affects Versions: 4.1.1 > Reporter: maria deepak marneni > Attachments: HttpAsyncResponseHandler.java, HttpRequestPublisherTester.java, eclipseOutput-1, eclipseOutput.txt > > > In a multi thread environment where all requests use the same client. CloseableHttpAsyncClient throws illegalStateException when execute method is called. > Exception in thread "Thread-91" java.lang.IllegalStateException: Request cannot be executed; I/O reactor status: STOPPED > at org.apache.http.util.Asserts.check(Asserts.java:46) > at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.ensureRunning(CloseableHttpAsyncClientBase.java:90) > at org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:123) > at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:74) > at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:107) > at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:91) > at domain.hardware.http.HttpRequestPublisher1.execute(HttpRequestPublisherTester.java:282) > at domain.hardware.http.HttpHandler1.makeAsyncHttpGetRequest(HttpRequestPublisherTester.java:179) > at domain.hardware.http.HttpRequestPublisherTester.run(HttpRequestPublisherTester.java:48) > at java.lang.Thread.run(Thread.java:662) > Exception in thread "Thread-46" java.lang.IllegalStateException: Request cannot be executed; I/O reactor status: STOPPED > at org.apache.http.util.Asserts.check(Asserts.java:46) > at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.ensureRunning(CloseableHttpAsyncClientBase.java:90) > at org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:123) > at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:74) > at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:107) > at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:91) > at domain.hardware.http.HttpRequestPublisher1.execute(HttpRequestPublisherTester.java:282) > at domain.hardware.http.HttpHandler1.makeAsyncHttpGetRequest(HttpRequestPublisherTester.java:179) > at domain.hardware.http.HttpRequestPublisherTester.run(HttpRequestPublisherTester.java:48) > at java.lang.Thread.run(Thread.java:662) -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org