FtpClient Upload file exception: Java.net.SocketException:Connection reset
This problem tortured me for almost a day, the afternoon is finally resolved, the problem is not a program error, the reason is the client to upload pictures:
Paste the exception code block:
-: -:20.117INFO [email protected] in-successfully logged into FTP server -: -:20.123ERROR [email protected]166-Connection resetjava.net.SocketException:Connection Reset at Java.net.SocketInputStream.read ( Socketinputstream.java:196) ~[?:1.7. 0_79] at Java.net.SocketInputStream.read (Socketinputstream.java:122) ~[?:1.7. 0_79] at Sun.nio.cs.StreamDecoder.readBytes (Streamdecoder.java:283) ~[?:1.7. 0_79] at Sun.nio.cs.StreamDecoder.implRead (Streamdecoder.java:325) ~[?:1.7. 0_79] at Sun.nio.cs.StreamDecoder.read (Streamdecoder.java:177) ~[?:1.7. 0_79] at Java.io.InputStreamReader.read (Inputstreamreader.java:184) ~[?:1.7.0_79]
Workaround:
Disable stateful FTP filtering so that firewalls do not block any FTP traffic
DOS window execution: netsh advfirewall set global statefulftp disable
Reference URL: https://technet.microsoft.com/zh-cn/library/dd421710%28v=ws.10%29.aspx
FtpClient Upload file exception: Java.net.SocketException:Connection reset