Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
14.5k views
in General by (140 points)
hi,

Getting this error only when transferring files to one particular server.

any idea why is this happening.


java.net.SocketException: Broken pipe
2008-04-09 12:08:05,965 INFO [STDOUT] at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
at sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:404)
at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:408)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
at com.enterprisedt.net.ftp.FTPControlSocket.writeCommand(FTPControlSocket.java:665)
at com.enterprisedt.net.ftp.FTPControlSocket.sendCommand(FTPControlSocket.java:646)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketPASV(FTPControlSocket.java:530)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocket(FTPControlSocket.java:401)
at com.enterprisedt.net.ftp.FTPClient.initPut(FTPClient.java:1423)
at com.enterprisedt.net.ftp.FTPClient.putData(FTPClient.java:1500)
at com.enterprisedt.net.ftp.FTPClient.putData(FTPClient.java:1480)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:1306)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:1278)

Any help is sincerely appreciated
Thanks
Richa

1 Answer

0 votes
by (51.6k points)
This is most likely happening because the server has abruptly closed the connection. I suggest you catch the exception and then try to resume the upload if you manage to reconnect. It's a good idea to place this code in a loop so that it keeps trying to reconnect and resume until it's either completed the upload or reached some predetermined maximum retry limit.

- Hans (EnterpriseDT)

Categories

...