日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網(wǎng)為廣大站長(zhǎng)提供免費(fèi)收錄網(wǎng)站服務(wù),提交前請(qǐng)做好本站友鏈:【 網(wǎng)站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(wù)(50元/站),

點(diǎn)擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會(huì)員:747

本文介紹了java.io.IOException:在WebLogic服務(wù)器上使用AsyncRestTemplate時(shí)對(duì)等方重置連接的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

我的Springboot應(yīng)用程序部署在我的VP上的WebLogic服務(wù)器上,當(dāng)我運(yùn)行打算調(diào)用另一個(gè)網(wǎng)站的API方法的方法時(shí),返回此錯(cuò)誤:

java.util.concurrent.ExecutionException: java.io.IOException: Connection reset by peer
    at java.util.concurrent.FutureTask.report(FutureTask.java:122) [na:1.8.0_144]
    at java.util.concurrent.FutureTask.get(FutureTask.java:192) [na:1.8.0_144]
    at org.springframework.util.concurrent.FutureAdapter.get(FutureAdapter.java:81) ~[spring-core-4.3.12.RELEASE.jar:4.3.12.RELEASE]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_144]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_144]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_144]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_144]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144]
Caused by: java.io.IOException: Connection reset by peer
    at sun.nio.ch.FileDispatcherImpl.readv0(Native Method) ~[na:1.8.0_144]
    at sun.nio.ch.SocketDispatcher.readv(SocketDispatcher.java:43) ~[na:1.8.0_144]
    at sun.nio.ch.IOUtil.read(IOUtil.java:278) ~[na:1.8.0_144]
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:440) ~[na:1.8.0_144]
    at weblogic.socket.NIOInputStream.readInternal(NIOInputStream.java:168) ~[com.oracle.weblogic.server.muxers.jar:12.2.1.3]
    at weblogic.socket.NIOInputStream.read(NIOInputStream.java:110) ~[com.oracle.weblogic.server.muxers.jar:12.2.1.3]
    at weblogic.socket.NIOInputStream.read(NIOInputStream.java:73) ~[com.oracle.weblogic.server.muxers.jar:12.2.1.3]
    at weblogic.socket.JSSEFilterImpl.readFromNetwork(JSSEFilterImpl.java:508) ~[com.oracle.weblogic.server.muxers.jar:12.2.1.3]
    at weblogic.socket.JSSEFilterImpl.read(JSSEFilterImpl.java:470) ~[com.oracle.weblogic.server.muxers.jar:12.2.1.3]
    at weblogic.socket.JSSESocket$JSSEInputStream.read(JSSESocket.java:119) ~[com.oracle.weblogic.server.muxers.jar:12.2.1.3]
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) ~[na:1.8.0_144]
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) ~[na:1.8.0_144]
    at java.io.BufferedInputStream.read(BufferedInputStream.java:345) ~[na:1.8.0_144]
    at weblogic.net.http.MessageHeader.isHTTP(MessageHeader.java:310) ~[com.oracle.weblogic.net.jar:12.2.1.3]
    at weblogic.net.http.MessageHeader.parseHeader(MessageHeader.java:232) ~[com.oracle.weblogic.net.jar:12.2.1.3]
    at weblogic.net.http.HttpClient.parseHTTP(HttpClient.java:554) ~[com.oracle.weblogic.net.jar:12.2.1.3]
    at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:688) ~[com.oracle.weblogic.net.jar:12.2.1.3]
    at weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:42) ~[com.oracle.weblogic.net.jar:12.2.1.3]
    at weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:1547) ~[com.oracle.weblogic.net.jar:12.2.1.3]
    at org.springframework.http.client.SimpleBufferingAsyncClientHttpRequest$1.call(SimpleBufferingAsyncClientHttpRequest.java:94) ~[spring-web-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.http.client.SimpleBufferingAsyncClientHttpRequest$1.call(SimpleBufferingAsyncClientHttpRequest.java:77) ~[spring-web-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    ... 4 common frames omitted

我注意到只有在使用Springs AsyncRestTemplate調(diào)用API調(diào)用時(shí)才會(huì)出現(xiàn)這種情況。

ListenableFuture<ResponseEntity<String>> y = asyncRestTemplate.exchange(desiredUrl, HttpMethod.GET, new HttpEntity<>("result"), String.class);//.get().getBody();
       boolean done = false;
        while (done == false)
        {
            if (y.isDone() == true)
            {
            response = y.get().getBody();
                        return response;
            }

        } 

    } catch (InterruptedException | ExecutionException ex) {

        Logger.getLogger(HTTP_Methods.class.getName()).log(Level.SEVERE, null, ex);
        ex.printStackTrace();
    }

推薦答案

錯(cuò)誤

Connection reset by peer

是遠(yuǎn)程服務(wù)器(或它們之間的防火墻)發(fā)出的響應(yīng),聲明它將不會(huì)繼續(xù)完成此請(qǐng)求。

很可能是防火墻拒絕、SSL握手失敗、代理問(wèn)題,甚至是HTTP失敗的請(qǐng)求。

這篇關(guān)于java.io.IOException:在WebLogic服務(wù)器上使用AsyncRestTemplate時(shí)對(duì)等方重置連接的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,

分享到:
標(biāo)簽:IO Java 器上 對(duì)等 服務(wù) 連接 重置
用戶無(wú)頭像

網(wǎng)友整理

注冊(cè)時(shí)間:

網(wǎng)站:5 個(gè)   小程序:0 個(gè)  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會(huì)員

趕快注冊(cè)賬號(hào),推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨(dú)大挑戰(zhàn)2018-06-03

數(shù)獨(dú)一種數(shù)學(xué)游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過(guò)答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫(kù),初中,高中,大學(xué)四六

運(yùn)動(dòng)步數(shù)有氧達(dá)人2018-06-03

記錄運(yùn)動(dòng)步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓(xùn)練成績(jī)?cè)u(píng)定2018-06-03

通用課目體育訓(xùn)練成績(jī)?cè)u(píng)定