Discuss the FTP protocol, secure FTP, FTP over SSH and FTP over SSL.
no avatar
User

Richa

Posts

2

Joined

Fri Apr 04, 2008 6:19 pm

java.net.SocketException: Broken pipe

by Richa » Thu Apr 10, 2008 2:39 am

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
no avatar
User

EDT Support

Posts

905

Joined

Mon Apr 26, 2004 3:03 pm

by EDT Support » Thu Apr 10, 2008 6:10 am

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)

Who is online

Users browsing this forum: No registered users and 2 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron