title: Tomcat closes websocket conection with an error
body: <p>For a customer we build a HTML5 websocket application with <strong>Tomcat 8.0.29</strong>.
  If we start the application from our network or from our home network all works fine. But if the customer starts the application from his network, after a certain time the websocket stops with a error. This can happen after 5 or 20 Minutes.</p>
  
  <p>We have tested it with and without SSL and on two different servers. Only in the customer network the connection breaks with a error.</p>
  
  <p>We also make a test with an websocket <strong>echo example</strong> which is included in Tomcat. the same as with our websocket. After a certain time the websocket stops with a error. But only if we start the application from the customer network.</p>
  
  <p>When the echo example stops with an error the following message will written in  server.log</p>
  
  <pre><code>08-Dec-2015 10:20:37.757 SEVERE [http-apr-8081-exec-2] org.apache.tomcat.websocket.pojo.PojoEndpointBase.onError No error handling configured for [websocket.echo.EchoAnnotation] and the following error occurred
   java.io.IOException: Unexpected error [730,054] reading data from the APR/native socket [1,639,490,672] with wrapper [org.apache.tomcat.util.net.AprEndpoint$AprSocketWrapper@231e01e4:1639490672].&lt;br/&gt;
      at org.apache.coyote.http11.upgrade.AprServletInputStream.doRead(AprServletInputStream.java:133)&lt;br/&gt;
      at org.apache.coyote.http11.upgrade.AbstractServletInputStream.read(AbstractServletInputStream.java:124)&lt;br/&gt;
      at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:51)&lt;br/&gt;
      at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler$WsReadListener.onDataAvailable(WsHttpUpgradeHandler.java:183)&lt;br/&gt;
      at org.apache.coyote.http11.upgrade.AbstractServletInputStream.onDataAvailable(AbstractServletInputStream.java:198)&lt;br/&gt;
      at org.apache.coyote.http11.upgrade.AbstractProcessor.upgradeDispatch(AbstractProcessor.java:96)&lt;br/&gt;
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:669)&lt;br/&gt;
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2500)&lt;br/&gt;
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2489)&lt;br/&gt;
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)&lt;br/&gt;
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)&lt;br/&gt;
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)&lt;br/&gt;
      at java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>If we starts the test on <a href="http://www.websocket.org/echo.html" rel="noreferrer">http://www.websocket.org/echo.html</a> the connection will <strong>not closed</strong> with an error.</p>
  
  <p>For me it looks like a problem with Tomcat. But what can I do to make it run properly?</p>
  
  <p>Tomcat: 8.0.29 (also with earlier versions)<br/>
  Windows 7: 64 Bit<br/>
  Protocol: HTTP/1.1</p>