Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

java.nio.channels.ClosedChannelException while using httpclient

HiteshS August 3, 2015

Hello all,

We are using JRJC httpclient (com.atlassian.httpclient.api.HttpClient interface) to get data from jira.

httpclient = (new AsynchronousHttpClientFactory()).createClient(new URI(baseURL), authenticationHandler);

AsynchronousHttpClientFactory defined in package com.atlassian.jira.rest.client.internal.async.

However, we are getting the following exceptions in logs:

org.apache.http.impl.nio.client.LoggingAsyncRequestExecutor:org.apache.http.impl.nio.client.LoggingAsyncRequestExecutor.exception(LoggingAsyncRequestExecutor.java:74) ERROR - http-outgoing-65 [CLOSED] HTTP protocol exception: nulljava.nio.channels.ClosedChannelException
    at sun.nio.ch.SocketChannelImpl.ensureReadOpen(Unknown Source)
    at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
    at org.apache.http.nio.reactor.ssl.SSLIOSession.receiveEncryptedData(SSLIOSession.java:340)
    at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:366)
    at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:118)
    at org.apache.http.impl.nio.reactor.BaseIOReactor.validate(BaseIOReactor.java:220)
    at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:284)
    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(Unknown Source)

No API is failing but how to resolve the errors?

I went through various related questions on this forum, but didn't get what I can apply in my case.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 3, 2015

Hi Hitesh!

Is your JIRA SSL self signed? Have a look here: How to resolve JRJC ?

HiteshS August 4, 2015

Our jira instance is on atlassian cloud.

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 4, 2015

Anyway this looks like some problem with SSL. Maybe java keystore does not have appropriate entry for certificate issuer (for my JIRA it's DigiCert). I suggest you to try very simple sample with apache http client accessing some REST method of your JIRA.

TAGS
AUG Leaders

Atlassian Community Events