1

I get an error that existing connection was forcibly closed by the remote host

Full Stack Trace:

java.io.IOException: An existing connection was forcibly closed by the remote host
    at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[na:1.8.0_102]
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) ~[na:1.8.0_102]
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[na:1.8.0_102]
    at sun.nio.ch.IOUtil.read(IOUtil.java:197) ~[na:1.8.0_102]
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) ~[na:1.8.0_102]
    at org.apache.http.nio.reactor.ssl.SSLIOSession.receiveEncryptedData(SSLIOSession.java:449) ~[atlassian-httpclient-plugin-0.23.0.jar:na]
    at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:503) ~[atlassian-httpclient-plugin-0.23.0.jar:na]
    at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:122) ~[atlassian-httpclient-plugin-0.23.0.jar:na]
    at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:164) [atlassian-httpclient-plugin-0.23.0.jar:na]
    at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:339) [atlassian-httpclient-plugin-0.23.0.jar:na]
    at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:317) [atlassian-httpclient-plugin-0.23.0.jar:na]
    at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:278) [atlassian-httpclient-plugin-0.23.0.jar:na]
    at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106) [atlassian-httpclient-plugin-0.23.0.jar:na]
    at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:590) [atlassian-httpclient-plugin-0.23.0.jar:na]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102] 

I have referred to all the reasons because of which this might happen but cannot pinpoint the reason for my case An existing connection was forcibly closed by the remote host

public class JRC {
        public Issue getIssue(String issueKey) throws Exception {
            final URI jiraServerUri = new URI("domain/JIRA/");
            final JiraRestClient restClient = new AsynchronousJiraRestClientFactory()
                    .createWithBasicHttpAuthentication(jiraServerUri, "user", "password");
            Promise issuePromise = restClient.getIssueClient().getIssue(issueKey);
            return Optional.ofNullable((Issue) issuePromise.claim()).orElseThrow(() -> new Exception("No such issue"));
        }
}
Bless
  • 5,052
  • 2
  • 40
  • 44
sah1
  • 380
  • 1
  • 6
  • 23

0 Answers0