HttpClient IllegalThreadStateException when Querying issues Edited

Hi, 

We get following exception when querying Issues via the java rest api (v 2.0.0-m15) and Java 8. The exception only occurs after the server is running for a period of time. Initially everything works fine. JiraRestClient is created on Startup of the server and used for all communcations after startup.

  org.apache.http.nio.protocol.HttpAsyncRequestExecutor http-outgoing-6 [ACTIVE] HTTP protocol exception: null java.lang.IllegalThreadStateException: null
at java.lang.ThreadGroup.addUnstarted(ThreadGroup.java:867)
at java.lang.Thread.init(Thread.java:402)
at java.lang.Thread.init(Thread.java:349)
at java.lang.Thread.<init>(Thread.java:675)
at com.atlassian.util.concurrent.ThreadFactories$Default.newThread(ThreadFactories.java:156)
at java.util.concurrent.ThreadPoolExecutor$Worker.<init>(ThreadPoolExecutor.java:612)
at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:925)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1368)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateExecutor.execute(SettableFuturePromiseHttpPromiseAsyncClient.java:171)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$1.doCompleted(SettableFuturePromiseHttpPromiseAsyncClient.java:41)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$1.doCompleted(SettableFuturePromiseHttpPromiseAsyncClient.java:37)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalContextAwareFutureCallback$1.run(SettableFuturePromiseHttpPromiseAsyncClient.java:126)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient.runInContext(SettableFuturePromiseHttpPromiseAsyncClient.java:90)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalContextAwareFutureCallback.completed(SettableFuturePromiseHttpPromiseAsyncClient.java:121)
at org.apache.http.impl.client.cache.CachingHttpAsyncClient$2.completed(CachingHttpAsyncClient.java:643)
at org.apache.http.impl.client.cache.CachingHttpAsyncClient$2.completed(CachingHttpAsyncClient.java:633)
at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:109)
at org.apache.http.impl.nio.client.DefaultResultCallback.completed(DefaultResultCallback.java:47)
at org.apache.http.impl.nio.client.DefaultAsyncRequestDirector.responseCompleted(DefaultAsyncRequestDirector.java:488)
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:368)
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:252)
at org.apache.http.impl.nio.client.LoggingAsyncRequestExecutor.inputReady(LoggingAsyncRequestExecutor.java:95)
at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:190)
at org.apache.http.impl.nio.DefaultHttpClientIODispatch.onInputReady(DefaultHttpClientIODispatch.java:125)
at org.apache.http.impl.nio.DefaultHttpClientIODispatch.onInputReady(DefaultHttpClientIODispatch.java:50)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:119)
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:160)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:342)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:320)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:280)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:604)
at java.lang.Thread.run(Thread.java:745)

 I found this Article on a similar Exception 

https://confluence.atlassian.com/hipchatkb/directory-synchronisation-fails-with-fatal-runtime-error-726106432.html

Could this setting cause the above error? How can i set the parameter when creating a JiraRestClient?

 

Thanks,

Regards

Martin

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

449 views 8 26
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you