MDA/MDD/TDD/DDD/DDDDDDD
          posts - 536, comments - 111, trackbacks - 0, articles - 0
            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理
          ? extremetable導(dǎo)出excel,彈出一個(gè)下載窗口,這時(shí)不點(diǎn)下載而點(diǎn)取消,則報(bào)下面的異常:
          ClientAbortException?
          Caused by: java.net.SocketException: Connection reset by peer: socket write error

          查了下TOMCAT的文檔,解釋如下:
          Wrap an IOException identifying it as being caused by an abort of a request by a remote client.
          在BAIDU和GOOGLE上找了下原因,大概歸結(jié)為:
          ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error的原因是由于處理http連接時(shí),正在輸出內(nèi)容時(shí),用戶關(guān)閉了IE,會(huì)出現(xiàn)一個(gè)"ClientAbortException",屬于I/O處理中出現(xiàn)的一個(gè)異常,應(yīng)用服務(wù)器應(yīng)該會(huì)捕捉。
          Connection reset by peer的原因:
          經(jīng)常出現(xiàn)的Connection reset by peer: 原因可能是多方面的,不過(guò)更常見(jiàn)的原因是:
          ①:服務(wù)器的并發(fā)連接數(shù)超過(guò)了其承載量,服務(wù)器會(huì)將其中一些連接Down掉;
          ②:客戶關(guān)掉了瀏覽器,而服務(wù)器還在給客戶端發(fā)送數(shù)據(jù);
          ③:瀏覽器端按了Stop
          很多人都說(shuō)是客戶端造成的,沒(méi)有辦法控制,是個(gè)比較郁悶的問(wèn)題。

          但是,我擔(dān)心的是:雖然前臺(tái)沒(méi)有任何出錯(cuò)的跡象,但是后臺(tái)會(huì)記錄這個(gè)異常,日志也會(huì)瘋狂爆滿,時(shí)間長(zhǎng)了,肯定會(huì)DOWN掉的,還沒(méi)找到好的解決辦法
          resin有一個(gè)參數(shù)ignore-client-disconnect
          tomcat似乎沒(méi)有


          經(jīng)常出現(xiàn)的Connection reset by peer: 原因可能是多方面的,不過(guò)更常見(jiàn)的原因是:①:服務(wù)器的并發(fā)連接數(shù)超過(guò)了其承載量,服務(wù)器會(huì)將其中一些連接Down掉;②:客戶關(guān)掉了瀏覽器,而服務(wù)器還 在給客戶端發(fā)送數(shù)據(jù);③:瀏覽器端按了Stop

          [10054] Connection reset by peer
            Connection reset by peer is a tough one because it can be caused by so many things. In all cases, the server determines that the socket is no longer good and closes it from its side.
            Read Error
            Scenario: Mary couldn't make out what Joe was saying anymore, so she hung up rather than lose his messages (data).
            A read error occurs when a server cannot successfully read from a user's client. Servers gather information from the client by text, setup, and other items.When the server receives an error when reading from a client, it then disconnects the user, resulting in a read error quit message.
            Write Error
            Scenario: Mary was trying to talk to Joe but didn't think she was getting through, so she hung rather than lose his messages (data).
            A write error occurs when a server cannot successfully write to a user's client. When the server receives information, it usually responds with information of its own. When the server receives an error when writing to a client, it then disconnects the user, resulting in a write error quit message similar to the read error format.
            Ping Timeout Error
            Scenario: Mary, having been raised in a household with too many kids and always craving attention, keeps asking to make sure that Joe is still on the line and listening. If he doesn't reply fast enough to suit her, she hangs up.
             Servers automatically ping users at a preset time. The reason for this is to ensure the client is still connected to the server. When you see "PING? PONG!" results in your status window, it means the server has pinged your client, and it has responded back with a pong to ensure the server that you are still connected. When this does not happen and you disconnect without the server's knowledge, the server will automatically disconnect the user when it does not receive a response, resulting in a ping timeout. Ping timeouts occur to EVERYONE.
            Broken pipe Error
             Scenario: Mary had picked up a sticky note with a message she needed to relay to Joe, but somehow between her hand and her mouth, the message got misplaced. Mary was trying to talk to Joe but didn't think she was getting through, so she hung up rather than lose his messages (data).
             A broken pipe error occurs when the server knows it has a message but can't seem to use its internal data link to get the data out to the socket.
            Miscellaneous
            Scenario: Lots of other reasons; perhaps the operator broke in and gave Mary a message that made her doubt the validity of the call so she hung up


          評(píng)論

          # re: ClientAbortException,Connection reset by peer: socket write error (摘自javaeye)  回復(fù)  更多評(píng)論   

          2007-09-21 19:31 by 345
          我碰到的情況是用js跳就包錯(cuò)
          直接寫(xiě)就好了

          # re: ClientAbortException,Connection reset by peer: socket write error (摘自javaeye)  回復(fù)  更多評(píng)論   

          2007-11-17 17:32 by aaaaaaaaa
          我今天下午也遇到了這樣一個(gè)問(wèn)題
          頭痛我了我一個(gè)下午該怎么解決呢

          # re: ClientAbortException,Connection reset by peer: socket write error (摘自javaeye)  回復(fù)  更多評(píng)論   

          2008-12-01 15:19 by
          我也碰到這個(gè)問(wèn)題了,不知道怎么解決。

          # re: ClientAbortException,Connection reset by peer: socket write error (摘自javaeye)  回復(fù)  更多評(píng)論   

          2009-10-16 14:47 by shanfeng1
          我也有相關(guān)問(wèn)題,間歇性報(bào)錯(cuò)

          # re: ClientAbortException,Connection reset by peer: socket write error (摘自javaeye)  回復(fù)  更多評(píng)論   

          2012-02-22 10:51 by 竹蘭情結(jié)
          我也碰到了這個(gè)問(wèn)題,發(fā)現(xiàn)這個(gè)與瀏覽器有關(guān)系,360報(bào)錯(cuò),IE,火狐不會(huì)報(bào)錯(cuò)!
          主站蜘蛛池模板: 开平市| 探索| 石狮市| 新郑市| 精河县| 防城港市| 霍城县| 额尔古纳市| 秀山| 寻甸| 垫江县| 疏附县| 穆棱市| 长岭县| 日照市| 舞阳县| 武平县| 承德县| 洛南县| 阿鲁科尔沁旗| 文昌市| 平舆县| 冀州市| 盐亭县| 正镶白旗| 临夏县| 香格里拉县| 喀什市| 银川市| 宁乡县| 宁武县| 长沙市| 晋中市| 炎陵县| 吉隆县| 邢台县| 郯城县| 沂南县| 荥阳市| 高安市| 汉川市|