ftp4j提示java.net.SocketException: Connection reset的解决
系统的自动更新FTP服务器,其他计算机连接都没有问题,包括xp、server2008、win7、win8,简体和繁体。

今天发现一台简体win7无法自动更新,提示错误如下:
java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(Unknown Source)
        at java.net.SocketInputStream.read(Unknown Source)
        at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
        at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
        at sun.nio.cs.StreamDecoder.read(Unknown Source)
        at sun.nio.cs.StreamDecoder.read0(Unknown Source)
        at sun.nio.cs.StreamDecoder.read(Unknown Source)
        at java.io.InputStreamReader.read(Unknown Source)
        at it.sauronsoftware.ftp4j.NVTASCIIReader.readLine(NVTASCIIReader.java:1
05)
        at it.sauronsoftware.ftp4j.FTPCommunicationChannel.read(FTPCommunication
Channel.java:142)
        at it.sauronsoftware.ftp4j.FTPCommunicationChannel.readFTPReply(FTPCommu
nicationChannel.java:185)
        at it.sauronsoftware.ftp4j.FTPClient.openPassiveDataTransferChannel(FTPC
lient.java:3179)
        at it.sauronsoftware.ftp4j.FTPClient.openDataTransferChannel(FTPClient.j
ava:3113)
        at it.sauronsoftware.ftp4j.FTPClient.list(FTPClient.java:2019)
        at it.sauronsoftware.ftp4j.FTPClient.list(FTPClient.java:2193)
        at cn.stjauns.logan.updater.Updater.getRemotefiles(Updater.java:199)
        at cn.stjauns.logan.updater.Updater.doUpdate(Updater.java:58)
        at cn.stjauns.logan.updater.Starter.main(Starter.java:18)

关闭win7自带防火墙,一切正常。

上百度查询,无果。
上google查询,答案见:http://stackoverflow.com/questions/10166337/ftp-error-while-downloading-uploading-with-ftp4j-library-in-java-application。

引用
Apparently there is a bug on the Windows 7 firewall related to using FTP on IPv6 that would explain your problem. See bug report here.

Any one of the following workarounds should suffice to fix it:

Run the following as an administrator in a Windows console:

netsh advfirewall set global StatefulFtp disable

Run the JVM with the option: -Djava.net.preferIPv4Stack=true

打开win7防火墙,以管理员身份运行cmd,运行如下命令:
netsh advfirewall set global StatefulFtp disable
问题解决。

ftp4j揭示java.net.SocketException: Connection reset的解决的更多相关文章

  1. java.net.SocketException: Connection reset

    java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java ...

  2. java.net.SocketException: Connection reset 解决方法

    java.net.SocketException: Connection reset 解决方法 最近纠结致死的一个java报错java.net.SocketException: Connection ...

  3. 最近纠结致死的一个java报错java.net.SocketException: Connection reset 终于得到解决

    自从SEOTcs系统11月份24日更新了一下SEO得分算法以来,一直困扰我的一个问题出现了,java的数据job任务,在执行过程中会经常报以下的错误: “2011-12-03 18:00:32 Def ...

  4. SSLv3协议、TLSv1.2协议配置不对导致javax.ws.rs.ProcessingException: java.net.SocketException: Connection reset

    SSl:Secure Sockets Layer 安全套接层 TLS:Transport Layer Security传输层安全 是为网络通信提供安全及数据完整性的一种安全协议.TLS与SSL在传输层 ...

  5. java.net.SocketException: Connection reset 硬件防火墙也有罪?

    今天早上例行进行远程备份,可是我却发现,整个备份过程无法顺利完成. 在备份的过程中不断的抛出异常: java.net.SocketException: Connection reset 奇怪,在之前的 ...

  6. java.net.SocketException: Connection reset 问题分析

    1. socket编程时容易碰到如下异常: java.net.SocketException: Connection reset by peer: socket write error at java ...

  7. 异常查错java.net.SocketException: Connection reset

    用httpclient访问后台接口报错java.net.SocketException: Software caused connection abort: recv failed,百度了一圈都说是由 ...

  8. 高并发下载tomcat下的文件时,发生java.net.SocketException: Connection reset解决方案

    (1)问题产生:使用500个线程并发下载tomcat工程中的一个文件时,服务器出现java.net.SocketException: Connection reset异常, 客户端出现connect ...

  9. HttpClient : java.net.SocketException: Connection reset

    1. 问题排查 httpclient : 4.5.5 排查过程 : 一次SocketException:Connection reset 异常排查 主要原因 : 调用 http 请求时发生了 Sock ...

随机推荐

  1. MySQL下载~安装教程~这里示例 MySQL 8.0 Command Line Client

    打开 https://www.mysql.com 也可以选择我分享的百度网盘文件 MySQL8.0.16.0 安装包 https://pan.baidu.com/s/1U8DkyJVp9Zvx7Zok ...

  2. php关于jquery ajax json不返回数据的问题

    分析原因: 1.php端代码有错导致echo输出错误,导致ajax返回函数不执行 2.jquery版本原因 3.juqery前端script代码问题

  3. Codeforces 909 substr用法 思维合并线段目标最少 Py语句逆推DP vecrtor缩点删不同颜色点模拟 拓扑排序处理任务

    A str.substr(i,j) 从str[i]开始起取j个字符作为返回的字符串 /* Huyyt */ #include <bits/stdc++.h> using namespace ...

  4. for 循环,range()函数和导入模块

    (一)for语句构成: for i in range(5): print('My name is') for i in range(5): print('Jimmy Five Times ('+str ...

  5. 前端每日实战:158# 视频演示如何用纯 CSS 创作一个雨伞 toggle 控件

    效果预览 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/pxLbjv 可交互视频 此视频是可 ...

  6. puppet 源码安装

    puppet 源码安装 作者: admin 分类: 自动化管理 发布时间: 2013-04-23 10:25 ė 1932次浏览 6 暂无评论 puppet最新源码详细安装: 在网上找了很多相关pup ...

  7. 在centos7.5使用DockerFile构建镜像时报错“Error parsing reference: "microsoft/dotnet:2.2-aspnetcore-runtime AS base" is not a valid repository/tag: invalid reference format”

    运行dockerfile时报出的错误 FROM microsoft/dotnet:2.2-aspnetcore-runtime AS base Error parsing reference: &qu ...

  8. uwsgi 的启动、停止、重启

    ## 一.概念释义### WSGI WSGI 是一个Web服务器(如nginx)与应用服务器(如uWSGI)通信的一种规范(协议).官方定义是,the Python Web Server Gatewa ...

  9. ftp CentOS7安装

    1.安装ftp服务yum install vsftpd 2.修改ftp配置文件(/etc/vsftpd/vsftpd.conf)ascii_upload_enable=YESascii_downloa ...

  10. 【leetcode】Valid Parenthesis String

    题目: Given a string containing only three types of characters: '(', ')' and '*', write a function to ...