0

I'm deploying a ToolTwist application to a production server using FIP, and Im getting this error on Transfer Phase.

    java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:152)

and in the fipserver console

    org.eclipse.jetty.io.EofException
    at      org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:892)
    at org.eclipse.jetty.http.AbstractGenerator.blockForOutput(AbstractGenerator.java:486)
    at org.eclipse.jetty.http.AbstractGenerator.flush(AbstractGenerator.java:424)
    at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:78)
    at org.eclipse.jetty.server.HttpConnection$Output.flush(HttpConnection.java:1094)
    at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:159)
    at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:98)
    at tooltwist.fip.jetty.GetFileListServlet.doGet(GetFileListServlet.java:82)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

Caused by: java.io.IOException: Broken pipe
    at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:94)

what should be the solution for this?

code-red
  • 306
  • 3
  • 12

1 Answers1

1

This error is occuring in the first stage of the FIP file transfer, where the fipserver creates an index of the existing files on the destination server. This is done in GetFileListServlet.doGet(), which can be seen in the stack trace. It is also indicated on the client side by the message...

  Indexing source...  
  Indexing destination...  
  ERROR: java.net.SocketTimeoutException Read timed out  
  Exception: tooltwist.fip.FipException: java.net.SocketTimeoutException: Read timed out  

This indexing process involves creating a hash for each file on the destination server, which the fip client then compares with the hashes of files on the source machine. It does this to determine which files are different, and so need to be installed.

A read timeout occurs when the client is waiting too long for the FIP server to index the files on the destination machine. Indexing is normally a fairly quick process, but does involve reading all the files beneath the destination directory (e.g. in ~/server). If monsterously huge files exist within that destination directory then the scanning will take a proportionately long time to complete. If that time is too long, then the client times out and drops the connection, and the server also sees the connection was dropped and stops indexing.

The most common cause of this error is excessively large log files in ~/server/tomcat/logs. If you clean those up, the problem should go away.

Philip Callender
  • 1,465
  • 1
  • 14
  • 21