将文件上传到 FTPS 服务器时,我遇到了一个严重(而且很奇怪)的问题。
我必须上传 JSON 文件,其中一些文件非常小(小于 5kB)。这些文件没有问题,我可以成功上传它们。
但是当上传“更大”的文件(不是很大,超过 30kb)时,它会显示这个错误:
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at java.io.FilterOutputStream.flush(Unknown Source)
at java.io.FilterOutputStream.close(Unknown Source)
at org.apache.commons.net.ftp.FTPClient._storeFile(FTPClient.java:688)
at org.apache.commons.net.ftp.FTPClient.__storeFile(FTPClient.java:639)
at org.apache.commons.net.ftp.FTPClient.storeFile(FTPClient.java:2030)
at com.spsa.integracion.gastosingresos.business.impl.GastosIngresosIFImpl.envioArchivoAFTPS(GastosIngresosIFImpl.java:206)
at com.spsa.integracion.gastosingresos.business.impl.GastosIngresosIFImpl.ejecutar(GastosIngresosIFImpl.java:90)
at com.spsa.integracion.gastosingresos.GastosIngresosApplication.run(GastosIngresosApplication.java:27)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:800)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:784)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:338)
at com.spsa.integracion.gastosingresos.GastosIngresosApplication.main(GastosIngresosApplication.java:20)
哈士奇WWW
相关分类