{"id":13425,"date":"2024-01-03T13:12:35","date_gmt":"2024-01-03T05:12:35","guid":{"rendered":"https:\/\/92it.top\/?p=13425"},"modified":"2024-01-03T13:12:35","modified_gmt":"2024-01-03T05:12:35","slug":"%e6%8e%92%e6%9f%a5ioexception-broken-pipe-%e9%94%99%e8%af%af","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=13425","title":{"rendered":"\u6392\u67e5IOException Broken pipe \u9519\u8bef"},"content":{"rendered":"\n<p>\u4eca\u5929\u6211\u4eec\u804a\u4e00\u4e2a\u5f02\u5e38\uff1ajava.io.IOException: Broken pipe\uff0c\u4e3a\u4ec0\u4e48\u4f1a\u62a5\u8fd9\u4e2a\u5f02\u5e38\uff0c\u8fd9\u4e2a\u5f02\u5e38\u8981\u600e\u4e48\u89e3\u51b3\uff1f<\/p>\n\n\n\n<p><strong>\u95ee\u9898\u63cf\u8ff0<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u6700\u8fd1\u9047\u5230\u7684\u4e00\u4e2a\u5c0f\u95ee\u9898\uff0c\u5e0c\u671b\u5bf9\u4f60\u6709\u5e2e\u52a9\u3002\u524d\u51e0\u65e5\u5728\u6392\u67e5\u4e00\u4e2a\u95ee\u9898\u7684\u65f6\u5019\uff0c\u770b\u5230\u6709\u51e0\u53f0\u670d\u52a1\u5668\u4e0a\u65e5\u5fd7\u5076\u53d1\u4f1a\u6253\u5370\u8fd9\u4e2a\u9519\u8bef <code>Caused by: java.io.IOException: Broken pipe<\/code> \u3002 \u200b<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"213\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-1024x213.png\" alt=\"\" class=\"wp-image-13426\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-1024x213.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-300x62.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-768x160.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-830x173.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-230x48.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-350x73.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-480x100.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image.png 1530w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u4e0b\u9762\u8d34\u4e86\u8be6\u7ec6\u5806\u6808\u4fe1\u606f\uff0c\u4fe1\u606f\u5185\u5bb9\u8f83\u591a\u505a\u4e86\u4e00\u70b9\u5220\u51cf\uff0c\u53ef\u4ee5\u6ed1\u52a8\u67e5\u770b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe\n        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:356)\n        at org.apache.catalina.connector.OutputBuffer.flushByteBuffer(OutputBuffer.java:825)\n        at org.apache.catalina.connector.OutputBuffer.append(OutputBuffer.java:730)\n        at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:391)\n        at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:369)\n        at \n        at java.lang.Thread.run(Thread.java:748)\nCaused by: java.io.IOException: Broken pipe\n        at sun.nio.ch.FileDispatcherImpl.write0(Native Method)\n        at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)\n        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)\n        at sun.nio.ch.IOUtil.write(IOUtil.java:65)\n        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)\n        at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134)\n        at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)\n        at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:157)\n        at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1276)\n        at org.apache.tomcat.util.net.SocketWrapperBase.doWrite(SocketWrapperBase.java:670)\n<\/pre>\n\n\n\n<p>\u770b\u5806\u6808\u4fe1\u606f\u662f\u5728\u5199\u6570\u636e\u7684\u65f6\u5019\uff0c\u629b\u51fa\u4e86 IOException \u5f02\u5e38\uff0c\u7136\u540e\u88ab tomcat \u4e2d\u6355\u83b7\u629b\u51fa ClientAbortException: java.io.IOException: Broken pipe\u3002 \u200b<\/p>\n\n\n\n<p>\u8ddf\u8e2a\u4e86\u6574\u4e2a\u8c03\u7528\uff0c\u53d1\u73b0\u4e1a\u52a1\u5904\u7406\u662f\u6b63\u5e38\u7684\uff0c\u670d\u52a1\u7aef\u4e5f\u6253\u5370\u4e86\u54cd\u5e94\u9700\u6c42\u8fd4\u56de\u7684\u6570\u636e\uff0c\u4f46\u5c31\u662f\u62a5\u4e86\u8fd9\u4e2a\u9519\u8bef\u3002\u8fd8\u662f\u6015\u8fd9\u4e2a\u5f02\u5e38\u5bf9\u4e1a\u52a1\u4ea7\u751f\u5f71\u54cd\uff0c\u4e8e\u662f\u68c0\u67e5\u4e86\u4e00\u4e0b\u629b\u51fa\u8fd9\u4e2a\u5f02\u5e38\u4ea7\u751f\u7684\u524d\u540e\u65e5\u5fd7\uff0c\u53d1\u73b0\u53ea\u6709\u4e00\u4e2a\u63a5\u53e3\u4f1a\u6709\u8fd9\u4e2a\u95ee\u9898\u3002\u4f46\u8fd9\u4e2a\u4e5f\u662f\u5076\u73b0\u7684\uff0c\u5e76\u4e0d\u662f\u6bcf\u6b21\u8bf7\u6c42\u5c31\u4f1a\u629b\u8fd9\u4e2a\u5f02\u5e38\u3002\u8fd9\u66f4\u52a0\u8ba9\u4eba\u8ff7\u60d1\u3002 \u200b<\/p>\n\n\n\n<p>\u4e8e\u662f\u53bb\u67e5\u4e86\u67e5\u76f8\u5173\u8d44\u6599\uff0c\u7b80\u5355\u8bf4\u4e00\u4e0bBroken pipe\u3002\u670d\u52a1\u7aef\u5411\u5ba2\u6237\u7aef\u7684socket\u8fde\u63a5\u7ba1\u9053\u5199\u8fd4\u56de\u6570\u636e\u65f6\uff0c<strong>\u94fe\u63a5\uff08pipe\uff09\u5374\u65ad\u4e86\uff01<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-1-1024x311.png\" alt=\"\" class=\"wp-image-13428\" width=\"551\" height=\"167\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-1-1024x311.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-1-300x91.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-1-768x233.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-1-830x252.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-1-230x70.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-1-350x106.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-1-480x146.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-1.png 1484w\" sizes=\"(max-width: 551px) 100vw, 551px\" \/><\/figure><\/div>\n\n\n\n<p><br>\u51fa\u73b0\u8fd9\u4e2a\u5f02\u5e38\u7684\u53ef\u80fd\u539f\u56e0\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">1\u3001\u5ba2\u6237\u7aef\u8bf7\u6c42\u670d\u52a1\u5668\u6570\u636e\uff0c\u670d\u52a1\u5668\u7a81\u7136\u6302\u4e86\uff1b 2\u3001Tomcat\u7684connector\u5728\u6267\u884c\u5199\u64cd\u4f5c\u7684\u65f6\u5019\u53d1\u751f\u7684\uff0c\u5ba2\u6237\u7aef\u8bfb\u53d6\u8d85\u65f6\u5173\u95ed\u4e86\u8fde\u63a5,\u8fd9\u65f6\u5019\u670d\u52a1\u5668\u7aef\u518d\u5411\u5ba2\u6237\u7aef\u5df2\u7ecf\u65ad\u5f00\u7684\u8fde\u63a5\u5199\u6570\u636e\u65f6\u5c31\u53d1\u751f\u4e86broken pipe\u5f02\u5e38\uff01<\/pre>\n\n\n\n<p>\u670d\u52a1\u7aef\u80af\u5b9a\u662f\u6ca1\u6709\u6302\u7684\uff0c\u53ef\u4ee5\u6392\u9664\u7b2c\u4e00\u70b9\u3002\u90a3\u5c31\u662f\u7b2c\u4e8c\u70b9\u4e86\uff0c\u5927\u6982\u7387\u5e94\u8be5\u5ba2\u6237\u7aef\u81ea\u5df1\u7684\u95ee\u9898\u561b\uff0c\u4f60\u65ad\u5f00\u4e86\u8fde\u63a5\u5bfc\u81f4\u7684\u6211\u670d\u52a1\u7aef\u6ca1\u6cd5\u5199\u56de\u6570\u636e\u4e86\uff0c\u7136\u540e\u5c31\u5f02\u5e38\u4e86\uff0c\u8fd9\u662f\u4e0d\u662f\u53ef\u4ee5\u7529\u9505\u4e86~<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-2.png\" alt=\"\" class=\"wp-image-13429\" width=\"232\" height=\"231\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-2.png 608w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-2-300x300.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-2-150x150.png 150w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-2-230x229.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-2-350x349.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-2-480x478.png 480w\" sizes=\"(max-width: 232px) 100vw, 232px\" \/><\/figure><\/div>\n\n\n\n<p><strong>\u6a21\u62df\u9a8c\u8bc1<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u79c9\u7740\u201c\u79d1\u5b66\u4e25\u8c28\u201d\u7684\u7529\u9505\u601d\u8def\uff0c\u5bf9\u6bd4\u4e86\u8fd9\u4e2a\u63a5\u53e3\u6b63\u5e38\u548c\u5f02\u5e38\u60c5\u51b5\u4e0b\uff0c\u5165\u53c2\u548c\u51fa\u53c2\uff0c\u4ee5\u53ca\u54cd\u5e94\u65f6\u95f4\u3002\u53d1\u73b0\u6b63\u5e38\u60c5\u51b5\u4e0b\u54cd\u5e94\u65f6\u95f410s\uff0c\u5f02\u5e38\u60c5\u51b5\u4e0b\u54cd\u5e94\u65f6\u95f4\u9ad8\u8fbe40s\uff0c\u5e76\u4e14\u54cd\u5e94\u7684\u6570\u636e\u91cf\u5de8\u5927\u3002\u56e0\u4e3a\u8fd9\u4e2a\u63a5\u53e3\u662f\u7b2c\u4e09\u65b9\u8c03\u7528\u7684\uff0c\u7b80\u5355\u63a8\u6d4b\uff0c\u5e94\u8be5\u662f\u7b2c\u4e09\u65b9\u8c03\u7528\u6b64\u63a5\u53e3\u7684\u65f6\u5019\u8bbe\u7f6e\u4e86\u8d85\u65f6\u65f6\u95f4\uff0c\u8d85\u65f6\u540e\u5173\u95ed\u4e86\u8fde\u63a5\uff0c\u5bfc\u81f4\u670d\u52a1\u7aef\u6ca1\u6cd5\u5199\u51fa\u6570\u636e\uff0c\u5f02\u5e38\u4e86\u3002 \u200b<\/p>\n\n\n\n<p>\u65e2\u7136\u662f\u8fd9\u6837\u90a3\u6211\u81ea\u5df1\u9a8c\u8bc1\u4e00\u628a\uff0c\u770b\u662f\u4e0d\u662f\u8fd9\u4e2a\u95ee\u9898\uff0c\u627e\u51fa\u51fa\u73b0\u5f02\u5e38\u7684\u8c03\u7528\u5165\u53c2\uff0c\u4f7f\u7528Postman\u6a21\u62df\u7b2c\u4e09\u65b9\u8c03\u7528\uff0c\u770b\u4e00\u770b\u4f1a\u53d1\u73b0\u4ec0\u4e48\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8f6f\u4ef6\u73af\u5883: Spring Boot 2.0.3 Tomcat8 JDK8 Nginx\u4ee3\u7406<\/pre>\n\n\n\n<p><br><\/p>\n\n\n\n<p><strong>\u573a\u666f1\uff1aPostman\u4e0d\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4\uff0c\u53d1\u9001\u8bf7\u6c42\u3002<\/strong> \u7ed3\u679c: Postman\u54cd\u5e94\u6b63\u5e38\uff0c\u670d\u52a1\u7aef\u4e5f\u6ca1\u6709\u6253\u5370\u51fa\u5f02\u5e38\u4fe1\u606f \u200b<\/p>\n\n\n\n<p><strong>\u573a\u666f1\uff1aPostman\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4\uff0c\u53d1\u9001\u8bf7\u6c42\u3002<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"747\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-3-1024x747.png\" alt=\"\" class=\"wp-image-13430\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-3-1024x747.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-3-300x219.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-3-768x560.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-3-830x606.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-3-550x400.png 550w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-3-230x168.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-3-350x255.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-3-480x350.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-3.png 1524w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">\n\n \u8bbe\u7f6e\u8bf7\u6c42\u5e94\u7b49\u5f85\u591a\u957f\u65f6\u95f4]\u8d85\u65f6\u524d\u7684\u54cd\u5e94\u3002\u9ed8\u8ba40\uff0c\u6c38\u4e0d\u8d85\u751f\uff0c\u8fd9\u91cc\u6211\u8bbe\u7f6e\u4e865s\n<\/pre>\n\n\n\n<p><strong>\u7ed3\u679c<\/strong>\uff1apostman\u6ca1\u6709\u6536\u5230\u54cd\u5e94\uff0c5s\u540e\u76f4\u63a5\u5f02\u5e38\uff0cResponse time out\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"467\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-4-1024x467.png\" alt=\"\" class=\"wp-image-13431\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-4-1024x467.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-4-300x137.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-4-768x350.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-4-830x378.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-4-230x105.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-4-350x160.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-4-480x219.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-4.png 1198w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u4f1a\u670d\u52a1\u7aef\u5904\u7406\u5b8c\u540e\uff0c\u670d\u52a1\u7aef\u6253\u5370\u51fa<code>broken pipe<\/code>\u5f02\u5e38\u4fe1\u606f\u3002 \u200b<\/p>\n\n\n\n<p><strong>\u573a\u666f3<\/strong>\uff1a<strong>Postman\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4\uff0c\u53d1\u9001\u8bf7\u6c42\u540e\uff0c\u7acb\u9a6c\u5173\u95edPostman\u8fdb\u7a0b\u3002<\/strong> <strong>\u7ed3\u679c<\/strong>\uff1a\u67e5\u770b\u65e5\u5fd7\uff0c\u53d1\u73b0\u4e5f\u62a5\u4e86 Broken pipe \u95ee\u9898\u3002<\/p>\n\n\n\n<p>\u4e0a\u9762\u8fd9\u4e2a\u573a\u666f\u6a21\u62df\u4e0b\u6765\uff0c\u670d\u52a1\u7aef\u4e1a\u52a1\u90fd\u5b8c\u6210\u5904\u7406\u6210\u529f\uff0c\u5c31\u662f\u5728\u54cd\u5e94\u7684\u65f6\u5019\u51fa\u73b0\u4e86\u5f02\u5e38\u3002\u90a3\u76f4\u63a5\u770b\u4e00\u4e0b\u5f02\u5e38\u90a3\u5757\u7684\u4ee3\u7801\u5427\u3002<code>org.apache.catalina.connector.OutputBuffer#realWriteBytes<\/code><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/**\n     * Sends the buffer data to the client output, checking the\n     * state of Response and calling the right interceptors.\n     * \u5c06\u7f13\u51b2\u533a\u6570\u636e\u53d1\u9001\u5230\u5ba2\u6237\u673a\u8f93\u51fa\uff0c\u68c0\u67e5Response\u7684\u72b6\u6001\u5e76\u8c03\u7528\u6b63\u786e\u7684\u62e6\u622a\u5668\u3002\n     * @param buf the ByteBuffer to be written to the response\n     * buf -\u8981\u5199\u5165\u54cd\u5e94\u7684ByteBuffer\n     * @throws IOException An underlying IOException occurred \n     * IOException -\u5e95\u5c42IOException\u53d1\u751f\n     *\/\n    public void realWriteBytes(ByteBuffer buf) throws IOException {\n\n        if (closed) {\n            return;\n        }\n        if (coyoteResponse == null) {\n            return;\n        }\n\n        \/\/ If we really have something to write\n        if (buf.remaining() > 0) {\n            \/\/ real write to the adapter\n            try {\n                coyoteResponse.doWrite(buf);\n            } catch (IOException e) {\n                \/\/ An IOException on a write is almost always due to\n                \/\/ the remote client aborting the request. Wrap this\n                \/\/ so that it can be handled better by the error dispatcher.\n                throw new ClientAbortException(e);\n            }\n        }\n\n    }\n<\/pre>\n\n\n\n<p>\u5f53\u6267\u884c\u5230<code> coyoteResponse.doWrite(buf);<\/code> \u8fd9\u91cc\u7684\u65f6\u5019\uff0c\u8c03\u7528JDK\u65b9\u6cd5\u53bb\u6267\u884c<code>sun.nio.ch.FileDispatcherImpl#write0<\/code>\uff0c <code>write0<\/code>\u662f\u4e00\u4e2a<strong>native<\/strong>\u7684\u65b9\u6cd5\u4e86\uff0c\u770b\u770b\u53d1\u751f\u5f02\u5e38\u65f6\u5019\u7684\u6ce8\u91ca\u5185\u5bb9\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ An IOException on a write is almost always due to\n\/\/ the remote client aborting the request. Wrap this\n\/\/ so that it can be handled better by the error dispatcher.\n\n<\/pre>\n\n\n\n<p>\u5927\u81f4\u7684\u610f\u601d\u662f\uff1a<strong>\u5199\u65f6\u7684IOException\u51e0\u4e4e\u603b\u662f\u7531\u4e8e\u8fdc\u7a0b\u5ba2\u6237\u7aef\u4e2d\u6b62\u8bf7\u6c42\u800c\u5bfc\u81f4\u7684<\/strong>\u3002\u5c06\u5176\u5305\u88c5\u8d77\u6765\uff0c\u65b9\u4fbf\u7a0b\u5e8f\u53ef\u4ee5\u66f4\u597d\u5730\u5904\u7406\u5b83\u3002 \u200b<\/p>\n\n\n\n<p>\u8fd9\u91cc\u5c31\u4e0d\u7ee7\u7eed\u6df1\u5165\u5377\u4e86\uff0c\u611f\u5174\u8da3\u7684\u4f19\u4f34\u53ef\u4ee5\u5728\u770b\u770b\u7f51\u7edcSocket\uff0c\u6216\u8005\u7ecf\u5178\u4e66\u7c4d\u300aUNIX\u7f51\u7edc\u7f16\u7a0b\u53771\u300b\u3002<\/p>\n\n\n\n<p><strong>\u89e3\u51b3\u65b9\u6848<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u8fd9\u4e2a\u5f02\u5e38\uff0c\u5bf9\u4e8e\u670d\u52a1\u7aef\u6765\u8bf4\uff0c\u5e76\u6ca1\u6709\u591a\u5c11\u5f71\u54cd\u3002\u5230\u8fd9\u91cc\u5927\u81f4\u7684\u5904\u7406\u65b9\u6848\u5c31\u77e5\u9053\u4e86<\/p>\n\n\n\n<ul><li>1\u3001\u5ef6\u957f\u5ba2\u6237\u7aef\u8d85\u65f6\u65f6\u95f4<\/li><li>2\u3001\u5408\u7406\u4f18\u5316\u670d\u52a1\u7aef\u63a5\u53e3\u4ee3\u7801\uff0c\u63d0\u5347\uff0c\u964d\u4f4e\u54cd\u5e94\u65f6\u95f4\u548c\u8fd4\u56de\u6570\u636e\u91cf<\/li><\/ul>\n\n\n\n<p><strong>\u6700\u540e\u95f2\u804a<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u5728\u6392\u67e5\u8fd9\u4e2a\u95ee\u9898\u7684\u65f6\u5019\uff0c\u627e\u5230\u56fd\u5916\u5c0f\u54e5\u7684\u4e00\u7bc7\u6587\u7ae0\uff0c\u5199\u7684\u5f88\u4e0d\u9519\uff0c\u503c\u5f97\u5b66\u4e60\u3002\u4e00\u5f00\u7bc7\u5148\u4ecb\u7ecd\u4e86\u4ed6\u9047\u5230\u4e86Broken Pipe \u5f02\u5e38\uff0c\u7ed9\u51fa\u5f02\u5e38\u51fa\u73b0\u7684\u8f6f\u4ef6\u73af\u5883\u548c\u7248\u672c\uff0c\u7136\u540e\u8bb2\u4e86Broken Pipe \u662f\u4ec0\u4e48\uff0c\u8fd9\u4e2a\u5f02\u5e38\u662f\u600e\u4e48\u53d1\u751f\u7684\uff0c\u8fd9\u4e2a\u5f02\u5e38\u662f\u4e0d\u662f\u5f88\u4e25\u91cd\uff0c\u4ee5\u53ca\u540e\u9762\u5982\u4f55\u4fee\u590d\u8fd9\u4e2a\u5f02\u5e38\uff0c\u603b\u7ed3\u4ee5\u53ca\u53c2\u8003\u6587\u7ae0\u3002\u6574\u4e2a\u6587\u7ae0\u4e00\u6c14\u5475\u6210\uff0c\u5176\u4e2d\u7684\u82f1\u6587\u4e5f\u4e0d\u96be\u7406\u89e3\uff0c\u770b\u8d77\u6765\u771f\u4e1d\u6ed1\u3002 \u200b<\/p>\n\n\n\n<p>\u611f\u5174\u8da3\u7684\u4f19\u4f34\u53ef\u4ee5\u5728\u8fd9\u91cc\u67e5\u770b\u539f\u6587\uff1a <a rel=\"noreferrer noopener\" href=\"https:\/\/link.juejin.cn?target=https%3A%2F%2Fbishwa.hashnode.dev%2Ffix-broken-pipe-exception-wildfly\" target=\"_blank\">How I fixed java.io.IOException: Broken Pipe in Java (Wildfly 10.1)<\/a>\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/link.juejin.cn?target=https%3A%2F%2Fbishwa.hashnode.dev%2Ffix-broken-pipe-exception-wildfly\" target=\"_blank\">bishwa.hashnode.dev\/fix-broken-\u2026<\/a><br><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-5-1024x264.png\" alt=\"\" class=\"wp-image-13432\" width=\"537\" height=\"138\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-5-1024x264.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-5-300x77.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-5-768x198.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-5-830x214.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-5-230x59.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-5-350x90.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-5-480x124.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/01\/image-5.png 1530w\" sizes=\"(max-width: 537px) 100vw, 537px\" \/><\/figure><\/div>\n\n\n\n<p>\u4e0b\u9762\u6211\u5927\u81f4\u7ffb\u8bd1\u548c\u52a0\u4e00\u4e0b\u81ea\u5df1\u7684\u89e3\u8bfb\u3002 <strong>\u6587\u7ae0\u7684\u6807\u9898<\/strong>\uff1a\u6211\u5982\u4f55\u4fee\u590dJava\u4e2d java.io.IOException\uff1aBroken Pipe\uff08Wildfly 10.1\uff09<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u6211\u7ecf\u5e38\u63a5\u89e6\u7684Tomcat\uff0cWildFly\u6ca1\u7528\u5230\uff0c\u5927\u81f4\u8bf4\u660e\u4e0b\uff1aWildFly\uff0c\u539f\u540d JBoss AS(JBoss Application Server) \u6216\u8005 JBoss\uff0c\u662f\u4e00\u5957\u5e94\u7528\u7a0b\u5e8f\u670d\u52a1\u5668\uff0c\u5c5e\u4e8e\u5f00\u6e90\u7684\u4f01\u4e1a\u7ea7 Java \u4e2d\u95f4\u4ef6\u8f6f\u4ef6\uff0c\u7528\u4e8e\u5b9e\u73b0\u57fa\u4e8e SOA \u67b6\u6784\u7684 Web \u5e94\u7528\u548c\u670d\u52a1\u3002\n<\/pre>\n\n\n\n<p>\u5f00\u5934\u9884\u89c8\u5c31\u4ecb\u7ecd\u4e86\u4ed6\u7b2c\u4e00\u6b21\u9047\u5230 Broken Pipe \u95ee\u9898\u65f6\u5019\u5bf9\u5e94\u7684\u8f6f\u4ef6\u73af\u5883\u548c\u76f8\u5173\u7248\u672c\uff1a<\/p>\n\n\n\n<ul><li>JavaEE 7 with JAX-RS<\/li><li>Java 8<\/li><li>Wildfly 10.1 as application server<\/li><li>Nginx was used as reverse proxy and load balancer.<\/li><\/ul>\n\n\n\n<p>\u540e\u9762\u8d34\u4e86\u5f02\u5e38\u7684\u8be6\u7ec6\u4fe1\u606f\u3002 \u6709\u8da3\u7684\u662f\u5728\u5206\u6790\u5b8c Broken Pipe \u662f\u5982\u4f55\u53d1\u751f\u7684\uff0c\u91cc\u9762\u5199\u5230<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Not every Broken Pipe exception is developer's fault \u5e76\u975e\u6bcf\u4e2a Broken Pipe \u5f02\u5e38\u90fd\u662f\u5f00\u53d1\u4eba\u5458\u7684\u9519\n\n\u4ed6\u5206\u6790\u4e86\u5bfc\u81f4\u6b64\u5f02\u5e38\u7684\u53ef\u80fd\u56e0\u7d20\uff1a<\/pre>\n\n\n\n<ul><li><strong>\u6700\u7ec8\u7528\u6237\u6570<\/strong><\/li><\/ul>\n\n\n\n<p>\u7531\u4e8e Broken Pipe \u7684\u4e3b\u8981\u539f\u56e0\u4e4b\u4e00\u662f\u7528\u6237\u7684\u884c\u4e3a\uff08\u5728\u670d\u52a1\u5668\u5b8c\u6210\u53d1\u9001\u54cd\u5e94\u4e4b\u524d\u610f\u5916\u5173\u95ed\u4e86\u6d3b\u52a8\u7684\u6d4f\u89c8\u5668\u4f1a\u8bdd\uff09\uff0c\u6700\u7ec8\u7528\u6237\u6570\u91cf\u7684\u589e\u52a0\u589e\u52a0\u4e86 Broken Pipe \u7684\u673a\u4f1a\u3002<\/p>\n\n\n\n<ul><li><strong>\u91cd\u54cd\u5e94\u8d1f\u8f7d\uff08\u8fd4\u56de\u6570\u636e\u91cf\u5927\uff09<\/strong><\/li><\/ul>\n\n\n\n<p>\u6765\u81ea\u670d\u52a1\u5668\u7684\u5927\u91cf\u54cd\u5e94\u9700\u8981\u5927\u91cf\u65f6\u95f4\u624d\u80fd\u4f20\u8f93\u5230\u5ba2\u6237\u7aef\uff0c\u800c\u8fd9\u4e2a\u5de8\u5927\u7684\u65f6\u95f4\u8de8\u5ea6\u53ef\u80fd\u5c31\u662f Broken Pipe \u7684\u60c5\u51b5\u3002<\/p>\n\n\n\n<ul><li><strong>\u670d\u52a1\u5668\u8d85\u65f6\uff08\u6709\u4ee3\u7406\u7684\u60c5\u51b5\uff09<\/strong><\/li><\/ul>\n\n\n\n<p>\u5982\u679c Web \u670d\u52a1\u5668\u5728\u7b49\u4e8e\u670d\u52a1\u5668\u8bbe\u7f6e\u7684\u8d85\u65f6\u503c\u7684\u7279\u5b9a\u65f6\u95f4\u5185\u65e0\u6cd5\u4ece\u670d\u52a1\u83b7\u5f97\u54cd\u5e94\uff0c\u5b83\u4f1a\u5173\u95ed\u4e0e\u5ba2\u6237\u7aef\u7684\u8fde\u63a5\uff0c\u8fd4\u56de 503: Gateway Timeout\uff0c\u4ece\u800c\u5bfc\u81f4 Broken Pipe\u3002 \u200b<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5929\u6211\u4eec\u804a\u4e00\u4e2a\u5f02\u5e38\uff1ajava.io.IOException: Broken pipe\uff0c\u4e3a\u4ec0\u4e48\u4f1a\u62a5\u8fd9\u4e2a\u5f02\u5e38\uff0c\u8fd9\u4e2a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/13425"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13425"}],"version-history":[{"count":2,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/13425\/revisions"}],"predecessor-version":[{"id":13433,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/13425\/revisions\/13433"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13425"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13425"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13425"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}