title: How to solve "I/O error on POST request" from restTemplate
body: <p>higuys!</p>
  <p>I have a problem with restTemplate right now.
  There are two requests while using this restTemplate.
  First one is simple like login.
  Other one(the problem) is sending quite long text with post body.</p>
  <p>If I send the request on Postman, it works well.
  I think the length of string might be the problem, but I'm not sure.</p>
  <p>Request Parameter is</p>
  <pre><code>{
      &quot;name&quot;  : &quot;test&quot;,
      &quot;age&quot;   : 28,
      &quot;gender&quot; : 2,
      &quot;type&quot;  : 1,
      &quot;store&quot; : &quot;test2&quot;,
      &quot;imgLen&quot; : 2876,
      &quot;img&quot; : &quot;/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABwAHADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqs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</p>
  <pre><code>HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory();
              factory.setConnectTimeout(timeout); 
              factory.setReadTimeout(timeout);
              RestTemplate restTemplate = new RestTemplate(factory);
  
              //body 
              MultiValueMap&lt;String, String&gt; reqBody = new LinkedMultiValueMap&lt;&gt;();
              int i=0;
              if(reqParam != null) {
                  for (Object key : reqParam.keySet()) {
                      i++;
                      String keyString = key.toString();
                      reqBody.add(keyString, reqParam.getString(keyString));
                  }
              }
              //header 
              HttpHeaders header = new HttpHeaders();
              header.setContentType(MediaType.APPLICATION_JSON);
              if(reqHeader != null) {
                  for (Object key : reqHeader.keySet()) {
                      String keyString = key.toString();
                      String value = reqHeader.getString(keyString);
                      header.set(keyString, value);
                  }
              }
              HttpEntity&lt;?&gt; entity = new HttpEntity&lt;&gt;(reqBody, header);
  
              UriComponents uri = UriComponentsBuilder.fromHttpUrl(host+reqUri).build();
  
  
              log.append(&quot;\n---------[ BI-API -&gt; Face Manager API ]-------------------------------------------------------------&quot;);
              log.append(&quot;\nRequest URL       : &quot;).append(uri);
              log.append(&quot;\nRequest URI       : &quot;).append(reqUri);
              log.append(&quot;\nmethod            : &quot;).append(method);
              log.append(&quot;\nRequest Body      : &quot;).append(ObjectUtil.getAllParameters(reqParam));
  
  //            ResponseEntity&lt;Map&gt; resultMap = restTemplate.exchange(uri.toString(), HttpMethod.POST, entity, Map.class);
              ResponseEntity&lt;Map&gt; resultMap = restTemplate.postForEntity(uri.toString(), entity, Map.class); 
  </code></pre>
  <p>The error is</p>
  <pre><code>org.springframework.web.client.ResourceAccessException: I/O error on POST request for &quot;http://{ip}:{port}/face/emp&quot;: Connection reset; nested exception is java.net.SocketException: Connection reset
      at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:785)
      at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:711)
      at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:468)
      at com.lguplus.bi.api.faceMgr.FaceMgrApi.callAPI(FaceMgrApi.java:116)
      at com.lguplus.bi.api.service.user.UserService.sendFaceInfo(UserService.java:549)
      at com.lguplus.bi.api.controller.user.UserController.requestCreateUser(UserController.java:179)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197)
      at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141)
      at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894)
      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
      at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
      at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
      at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
      at com.lguplus.bi.api.filter.RequestFilter.doFilter(RequestFilter.java:201)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
      at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
      at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
      at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707)
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:748)
  Caused by: java.net.SocketException: Connection reset
      at java.net.SocketInputStream.read(SocketInputStream.java:210)
      at java.net.SocketInputStream.read(SocketInputStream.java:141)
      at org.apache.http.impl.conn.LoggingInputStream.read(LoggingInputStream.java:87)
      at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)
      at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)
      at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280)
      at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
      at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
      at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
      at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
      at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
      at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
      at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
      at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
      at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
      at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
      at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
      at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
      at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
      at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
      at org.springframework.http.client.HttpComponentsClientHttpRequest.executeInternal(HttpComponentsClientHttpRequest.java:87)
      at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48)
      at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:66)
      at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:776)
      ... 58 more
  </code></pre>
  <p>The log is</p>
  <pre><code>021-05-21 16:10:05 [DEBUG] [MainClientExec.java]execute(255) : Executing request POST /face/emp HTTP/1.1
  2021-05-21 16:10:05 [DEBUG] [MainClientExec.java]execute(260) : Target auth state: UNCHALLENGED
  2021-05-21 16:10:05 [DEBUG] [MainClientExec.java]execute(266) : Proxy auth state: UNCHALLENGED
  2021-05-21 16:10:05 [DEBUG] [LoggingManagedHttpClientConnection.java]onRequestSubmitted(124) : http-outgoing-0 &gt;&gt; POST /face/emp HTTP/1.1
  2021-05-21 16:10:05 [DEBUG] [LoggingManagedHttpClientConnection.java]onRequestSubmitted(127) : http-outgoing-0 &gt;&gt; Accept: application/json, application/*+json
  2021-05-21 16:10:05 [DEBUG] [LoggingManagedHttpClientConnection.java]onRequestSubmitted(127) : http-outgoing-0 &gt;&gt; Content-Type: application/json
  2021-05-21 16:10:05 [DEBUG] [LoggingManagedHttpClientConnection.java]onRequestSubmitted(127) : http-outgoing-0 &gt;&gt; api-key: eV1GXF5neW0fd2NlMDkzNDk0MGludGVsbGk=
  2021-05-21 16:10:05 [DEBUG] [LoggingManagedHttpClientConnection.java]onRequestSubmitted(127) : http-outgoing-0 &gt;&gt; Accept-Charset: utf-8
  2021-05-21 16:10:05 [DEBUG] [LoggingManagedHttpClientConnection.java]onRequestSubmitted(127) : http-outgoing-0 &gt;&gt; Content-Length: 2973
  2021-05-21 16:10:05 [DEBUG] [LoggingManagedHttpClientConnection.java]onRequestSubmitted(127) : http-outgoing-0 &gt;&gt; Host: 172.16.2.36:5214
  2021-05-21 16:10:05 [DEBUG] [LoggingManagedHttpClientConnection.java]onRequestSubmitted(127) : http-outgoing-0 &gt;&gt; Connection: Keep-Alive
  2021-05-21 16:10:05 [DEBUG] [LoggingManagedHttpClientConnection.java]onRequestSubmitted(127) : http-outgoing-0 &gt;&gt; User-Agent: Apache-HttpClient/4.5 (Java/1.8.0_191)
  2021-05-21 16:10:05 [DEBUG] [LoggingManagedHttpClientConnection.java]onRequestSubmitted(127) : http-outgoing-0 &gt;&gt; Accept-Encoding: gzip,deflate
  2021-05-21 16:10:05 [DEBUG] [Wire.java]wire(72) : http-outgoing-0 &gt;&gt; &quot;POST /face/emp HTTP/1.1[\r][\n]&quot;
  2021-05-21 16:10:05 [DEBUG] [Wire.java]wire(72) : http-outgoing-0 &gt;&gt; &quot;Accept: application/json, application/*+json[\r][\n]&quot;
  2021-05-21 16:10:05 [DEBUG] [Wire.java]wire(72) : http-outgoing-0 &gt;&gt; &quot;Content-Type: application/json[\r][\n]&quot;
  2021-05-21 16:10:05 [DEBUG] [Wire.java]wire(72) : http-outgoing-0 &gt;&gt; &quot;api-key: eV1GXF5neW0fd2NlMDkzNDk0MGludGVsbGk=[\r][\n]&quot;
  2021-05-21 16:10:05 [DEBUG] [Wire.java]wire(72) : http-outgoing-0 &gt;&gt; &quot;Accept-Charset: utf-8[\r][\n]&quot;
  2021-05-21 16:10:05 [DEBUG] [Wire.java]wire(72) : http-outgoing-0 &gt;&gt; &quot;Content-Length: 2973[\r][\n]&quot;
  2021-05-21 16:10:05 [DEBUG] [Wire.java]wire(72) : http-outgoing-0 &gt;&gt; &quot;Host: 172.16.2.36:5214[\r][\n]&quot;
  2021-05-21 16:10:05 [DEBUG] [Wire.java]wire(72) : http-outgoing-0 &gt;&gt; &quot;Connection: Keep-Alive[\r][\n]&quot;
  2021-05-21 16:10:05 [DEBUG] [Wire.java]wire(72) : http-outgoing-0 &gt;&gt; &quot;User-Agent: Apache-HttpClient/4.5 (Java/1.8.0_191)[\r][\n]&quot;
  2021-05-21 16:10:05 [DEBUG] [Wire.java]wire(72) : http-outgoing-0 &gt;&gt; &quot;Accept-Encoding: gzip,deflate[\r][\n]&quot;
  2021-05-21 16:10:05 [DEBUG] [Wire.java]wire(72) : http-outgoing-0 &gt;&gt; &quot;[\r][\n]&quot;
  2021-05-21 16:10:05 [DEBUG] [Wire.java]wire(86) : http-outgoing-0 &gt;&gt; &quot;{&quot;id&quot;:[&quot;test&quot;],&quot;age&quot;:[&quot;28&quot;],&quot;gender&quot;:[&quot;1&quot;],&quot;store&quot;:[&quot;[0xea][0xb0][0x95][0xeb][0x82][0xa8][0xeb][0xa7][0xa4][0xec][0x9e][0xa5]&quot;],&quot;imgLen&quot;:[&quot;2816&quot;],&quot;img&quot;:[&quot;/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABwAHADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc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qUSFExjiqn9uaOf+YnZf+BCf40yXWtJKfLqdkf8Atuv+NTZl867lbUQsmTWG8I3c1o3Gqaa2cahan6TL/jWTNqNmGO27gP0kH+NVZicl3EdQnaofOwcZqGXUbY9LiI/8DFU3vYCeJo/++hQou5k5o2NOgbUNQjiXlc816va26WlpHCgxgc15HoOvWWl3vnTOrD2YV6NZ+L9EvQCdQtoSezygfzrrpRscdaVzbrF8Xf8AIn6t/wBez/yq4dc0f/oLWP8A4EJ/jWP4r1jS5vCmqRQ6jZySNbsFVJ1JJx2ANbM5EtT/2Q==&quot;]}&quot;
  2021-05-21 16:10:05 [DEBUG] [Wire.java]wire(86) : http-outgoing-0 &lt;&lt; &quot;[read] I/O error: Connection reset&quot;
  2021-05-21 16:10:05 [DEBUG] [LoggingManagedHttpClientConnection.java]close(79) : http-outgoing-0: Close connection
  2021-05-21 16:10:05 [DEBUG] [LoggingManagedHttpClientConnection.java]shutdown(87) : http-outgoing-0: Shutdown connection
  2021-05-21 16:10:05 [DEBUG] [ConnectionHolder.java]abortConnection(128) : Connection discarded
  2021-05-21 16:10:05 [DEBUG] [LoggingManagedHttpClientConnection.java]close(79) : http-outgoing-0: Close connection
  2021-05-21 16:10:05 [DEBUG] [PoolingHttpClientConnectionManager.java]releaseConnection(320) : Connection released: [id: 0][route: {}-&gt;http://ip:5214[total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
  org.springframework.web.client.ResourceAccessException: I/O error on POST request for &quot;http://ip:5214/face/emp&quot;: Connection reset; nested exception is java.net.SocketException: Connection reset
  2021-05-21 16:10:05 [DEBUG] [AbstractMessageConverterMethodProcessor.java]writeWithMessageConverters(268) : Using 'application/json', given [*/*] and supported [application/json, application/*+json, application/json, application/*+json]
  2021-05-21 16:10:05 [DEBUG] [LogFormatUtils.java]traceDebug(91) : Writing [{}]
  </code></pre>
  <p>How can I solve this problem?</p>
  <p>Thank you!</p>