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:
16:38:20.117 INFO [email protected]-successfully login to FTP server 16:38:20.123 ERROR [email protected]-Connection RESETJAVA.NET.SOCKETEXC Eption:connection Reset at Java.net.SocketInputStream.read (socketinputstream.java:196) ~[?:1.7.0_79] at Java.net.So Cketinputstream.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
This article is from the "Pig Flying" blog, please be sure to keep this source http://jiyanle.blog.51cto.com/6932197/1684085
FtpClient Upload file exception: Java.net.SocketException:Connection reset