问题现象:

通过IE从服务器下载文件时,提示Can't read from connection: Connection reset by peer。

别的现场都是好的,只有该现场有这个问题。所以,一直以为现场的网络或者防火墙设置有问题,导致该问题一直未解决。

今天,想到可能和下载的文件大小有关系,于是在linux服务器上通过wget单个文件下载测试,发现小于0.5M的文件下载正常。

超过0.5M,就提示Connection reset by peer。

下面是测试过程:

Last login: Wed Oct 9 15:40:57 2013 from 202.195.128.18
[root@w5-1 ~]# ping 221.***.212.94
PING 221.***.212.94 (221.***.212.94) 56(84) bytes of data.
64 bytes from 221.***.212.94: icmp_seq=1 ttl=57 time=9.56 ms
64 bytes from 221.***.212.94: icmp_seq=2 ttl=57 time=9.30 ms
64 bytes from 221.***.212.94: icmp_seq=3 ttl=57 time=9.37 ms
64 bytes from 221.***.212.94: icmp_seq=4 ttl=57 time=9.44 ms
64 bytes from 221.***.212.94: icmp_seq=5 ttl=57 time=9.61 ms
64 bytes from 221.***.212.94: icmp_seq=6 ttl=57 time=9.37 ms

[1]+ Stopped ping 221.***.212.94
[root@w5-1 ~]# ping svn.***.com
PING svn.***.com (221.***.212.94) 56(84) bytes of data.
64 bytes from mail.***.com (221.***.212.94): icmp_seq=1 ttl=57 time=9.82 ms
64 bytes from mail.***.com (221.***.212.94): icmp_seq=2 ttl=57 time=9.58 ms
64 bytes from mail.***.com (221.***.212.94): icmp_seq=3 ttl=57 time=9.58 ms
64 bytes from mail.***.com (221.***.212.94): icmp_seq=4 ttl=57 time=10.1 ms

[2]+ Stopped ping svn.***.com
[root@w5-1 ~]# wget
wget:未指定 URL
用法: wget [选项]... [URL]...

请尝试使用“wget --help”查看更多的选项。
[root@w5-1 ~]# wget http://demo.***.cn:10085/5/1.txt
--2013-10-09 16:15:40-- http://demo.***.cn:10085/5/1.txt
正在解析主机 demo.***.cn... 221.***.212.94
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1073 (1.0K) [text/plain]
Saving to: `1.txt'

100%[======================================>] 1,073 --.-K/s in 0s

2013-10-09 16:15:40 (146 MB/s) - `1.txt' saved [1073/1073]

[root@w5-1 ~]# wget http://demo.***.cn:10085/5/1.jar
--2013-10-09 16:16:42-- http://demo.***.cn:10085/5/1.jar
正在解析主机 demo.***.cn... 221.***.212.94
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:18124391 (17M) [text/plain]
Saving to: `1.jar'

0% [ ] 5,547 --.-K/s in 60s

2013-10-09 16:17:42 (92.6 B/s) - Read error at byte 5547/18124391 (Connection reset by peer). 重试中。

--2013-10-09 16:17:43-- (尝试次数: 2) http://demo.***.cn:10085/5/1.jar
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:18124391 (17M) [text/plain]
Saving to: `1.jar'

2% [ ] 399,403 87.0K/s eta 2m 37s
[3]+ Stopped wget http://demo.***.cn:10085/5/1.jar

[root@w5-1 ~]# wget http://demo.***.cn:10085/5/1.log
--2013-10-09 16:24:04-- http://demo.***.cn:10085/5/1.log
正在解析主机 demo.***.cn... 221.***.212.94
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:4916089 (4.7M) [text/plain]
Saving to: `1.log'

7% [=============> ] 366,100 --.-K/s in 61s

2013-10-09 16:25:05 (5.89 KB/s) - Read error at byte 366100/4916089 (Connection reset by peer). 重试中。

--2013-10-09 16:25:06-- (尝试次数: 2) http://demo.***.cn:10085/5/1.log
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:4916089 (4.7M) [text/plain]
Saving to: `1.log'

13% [=============> ] 717,964 --.-K/s in 62s

2013-10-09 16:26:08 (11.4 KB/s) - Read error at byte 717964/4916089 (Connection reset by peer). 重试中。

--2013-10-09 16:26:10-- (尝试次数: 3) http://demo.***.cn:10085/5/1.log
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:4916089 (4.7M) [text/plain]
Saving to: `1.log'

16% [================> ] 920,684 192K/s eta 19s
[4]+ Stopped wget http://demo.***.cn:10085/5/1.log
[root@w5-1 ~]# wget -r -np -nd http://demo.***.cn:10085/5/1/
--2013-10-09 16:28:56-- http://demo.***.cn:10085/5/1/
正在解析主机 demo.***.cn... 221.***.212.94
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 404 Not Found
2013-10-09 16:28:56 错误 404:Not Found。

[root@w5-1 ~]# wget -r -np -nd http://demo.***.cn:10085/5/1/
--2013-10-09 16:29:06-- http://demo.***.cn:10085/5/1/
正在解析主机 demo.***.cn... 221.***.212.94
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 404 Not Found
2013-10-09 16:29:06 错误 404:Not Found。

[root@w5-1 ~]# wget -r -np -nd http://demo.***.cn:10085/5/images/
--2013-10-09 16:29:37-- http://demo.***.cn:10085/5/images/
正在解析主机 demo.***.cn... 221.***.212.94
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 404 Not Found
2013-10-09 16:29:37 错误 404:Not Found。

[root@w5-1 ~]# wget -r -np -nd http://demo.***.cn:10085/5/2.jar
--2013-10-09 16:32:04-- http://demo.***.cn:10085/5/2.jar
正在解析主机 demo.***.cn... 221.***.212.94
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1070477 (1.0M) [text/plain]
Saving to: `2.jar'

7% [===========================> ] 77,120 --.-K/s in 60s

2013-10-09 16:33:04 (1.26 KB/s) - Read error at byte 77120/1070477 (Connection reset by peer). 重试中。

--2013-10-09 16:33:05-- (尝试次数: 2) http://demo.***.cn:10085/5/2.jar
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1070477 (1.0M) [text/plain]
Saving to: `2.jar'

0% [> ] 11,340 --.-K/s eta 85m 50s
[5]+ Stopped wget -r -np -nd http://demo.***.cn:10085/5/2.jar

[root@w5-1 ~]# wget -r -np -nd http://demo.***.cn:10085/5/1.txt
--2013-10-09 16:34:02-- http://demo.***.cn:10085/5/1.txt
正在解析主机 demo.***.cn... 221.***.212.94
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1073 (1.0K) [text/plain]
Saving to: `1.txt.1'

100%[===================================>] 1,073 --.-K/s in 0s

2013-10-09 16:34:02 (102 MB/s) - `1.txt.1' saved [1073/1073]

FINISHED --2013-10-09 16:34:02--
Downloaded: 1 files, 1.0K in 0s (102 MB/s)

[root@w5-1 ~]# wget -r -np -nd http://demo.***.cn:10085/5/3.jar
--2013-10-09 16:34:39-- http://demo.***.cn:10085/5/3.jar
正在解析主机 demo.***.cn... 221.***.212.94
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:579511 (566K) [text/plain]
Saving to: `3.jar'

100%[=====================================>] 579,511 545K/s in 1.0s

2013-10-09 16:34:40 (545 KB/s) - `3.jar' saved [579511/579511]

FINISHED --2013-10-09 16:34:40--
Downloaded: 1 files, 566K in 1.0s (545 KB/s)

[root@w5-1 ~]# wget -r -np -nd http://demo.***.cn:10085/5/4.jar
--2013-10-09 16:35:34-- http://demo.***.cn:10085/5/4.jar
正在解析主机 demo.***.cn... 221.***.212.94
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:840550 (821K) [text/plain]
Saving to: `4.jar'

17% [================> ] 143,109 --.-K/s in 60s

2013-10-09 16:36:35 (2.32 KB/s) - Read error at byte 143109/840550 (Connection reset by peer). 重试中。

--2013-10-09 16:36:36-- (尝试次数: 2) http://demo.***.cn:10085/5/4.jar
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:840550 (821K) [text/plain]
Saving to: `4.jar'

6% [=====> ] 62,021 --.-K/s eta 8m 45s

[6]+ Stopped wget -r -np -nd http://demo.***.cn:10085/5/4.jar
[root@w5-1 ~]# wget -r -np -nd http://demo.***.cn:10085/5/5.jar
--2013-10-09 16:37:17-- http://demo.***.cn:10085/5/5.jar
正在解析主机 demo.***.cn... 221.***.212.94
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:571259 (558K) [text/plain]
Saving to: `5.jar'

49% [========================================> ] 282,117 --.-K/s in 61s

2013-10-09 16:38:18 (4.54 KB/s) - Read error at byte 282117/571259 (Connection reset by peer). 重试中。

--2013-10-09 16:38:19-- (尝试次数: 2) http://demo.***.cn:10085/5/5.jar
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:571259 (558K) [text/plain]
Saving to: `5.jar'

8% [========> ] 76,501 --.-K/s
[7]+ Stopped wget -r -np -nd http://demo.***.cn:10085/5/5.jar

[root@w5-1 ~]# wget -r -np -nd http://demo.***.cn:10085/5/3.jar
--2013-10-09 16:38:55-- http://demo.***.cn:10085/5/3.jar
正在解析主机 demo.***.cn... 221.***.212.94
Connecting to demo.***.cn|221.***.212.94|:10085... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:579511 (566K) [text/plain]
Saving to: `3.jar.1'

100%[======================================>] 579,511 391K/s in 1.4s

2013-10-09 16:38:56 (391 KB/s) - `3.jar.1' saved [579511/579511]

FINISHED --2013-10-09 16:38:56--
Downloaded: 1 files, 566K in 1.4s (391 KB/s)
[root@w5-1 ~]#

问题分析:

    根据上面现象,象是现场网络或者防火墙设置有问题。于是通过tcpdump抓包看看。

>tcpdump -w 1.cap -----在这一刻,继续wget

根据对cap文件的分析,发现是下载链接http://demo.***.cn:10085所在的服务器主动Connection reset ,进而导致下载失败。

这就说明,是demo.***.cn:10085域名所在的防火墙设置有问题。经过了解,该防火墙本身就存在问题。

问题解决:

对demo.***.cn:10085域名在一个新防火墙上重新设置,经过测试,问题解决。

Linux:外网域名防火墙设置导致下载失败的更多相关文章

  1. 微信公众号开发之怎样将本机IP映射成外网域名

    近期一个项目须要用到微信公众号的网页授权登录,在研究这个公众号的时候遇到各种困难,现将自己的一些心得总结一下. 我想进行微信公众号开发遇到的第一个困难就是微信公众号必须输入一个外网能够訪问的域名,在网 ...

  2. 外网域名映射内网Ip 内网使用外网域名的https证书

    用nslookup www.baidu.com nslookup www.qq.com 15.64.64.53 测试了内网的dns可以解析外网域名 那么我买个外网域名,再对这个外网域名买个证书,然后外 ...

  3. cordova之File Transfer (Permission denied) 权限导致下载失败 - 简书

    原文:cordova之File Transfer (Permission denied) 权限导致下载失败 - 简书 在文件上传时,由于权限问题,会报错(Permission denied),安卓6. ...

  4. 将内网ip映射到外网域名

     一.应用场景 1.在本地测试微信支付回调 二.如何使用natapp实现内网穿透 1.第一步注册账号并进行实名制认证 natapp网站地址 https://natapp.cn/ 2.第二步申请免费隧道 ...

  5. oracle连接由于防火墙设置导致超时的问题

        当应用程序使用数据库连接池进行数据连接时,防火墙的设置有可能会导致连接出现超时或者被重置的问题.当从数据库读数据的时候 有可能会 Connection timed out, 这是由于应用会缓存 ...

  6. 服务器能远程连接,网络连接正常,但是外网域名Ping不通,浏览器中打不开网站

    服务器能远程连接成功,但在浏览器中打不开任何网站,出现这个问题一般是安装什么软件引起IE的相关设置做了变动或者是服务器中了病毒引起的,或是服务器的DNS设置是错误的. 一.先检查服务器DNS是否正确 ...

  7. 【微信Java开发 --1】内网穿透外网,使用外网域名可以访问到本地项目

    1.首先上https://natapp.cn/ 2.接下来在网站申请账号 3.购买免费隧道 4.为你的免费隧道设置名称以及端口号,由于本人本地的使用Tomcat做服务器,所以用惯了8080端口,因此设 ...

  8. LINUX一网卡多IP设置

    方法1:少量IP手动绑定(这里以绑定IP到eth0为例,其它网卡的话修改相应的文件名即可) 1.复制ifcfg-eth0的网卡配置文件并改名为ifcfg-eth0:0 [root@akinlau /] ...

  9. MySql外网不能访问设置

    mysql的root账户,我在连接时通常用的是localhost或127.0.0.1,公司的测试服务器上的mysql也是localhost所以我想访问无法访问,测试暂停. 解决方法如下: 1,修改表, ...

随机推荐

  1. set_include_path() &&get_include_path()用法

    function initialize(){    set_include_path(get_include_path().PATH_SEPARATOR . "core/");   ...

  2. Idea Failed to read artifact descriptor for xx:jar:unknown

    网上的解决方案: 根据网上说明添加了maven命令clean compile install -Dmaven.test.skip=true,与我遇到的问题不同 有的方法猜测可以通过,但是没时间测试了 ...

  3. js dom 的常用属性和方法

    1.对象集合:      (1).all[];      (2).images[];      (3).anchors[];      (4).forms[];      (5).links[];   ...

  4. 用JS过滤Emoji表情的输入

    本文为原创,转载请注明出处: cnzt       文章:cnzt-p http://www.cnblogs.com/zt-blog/p/6773854.html 在前端页面开发过程中,总会碰到不允许 ...

  5. 【hibernate】报错:org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.DataException: could not execute statement

    报错如下: org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a ...

  6. C#总结复习5(需要进一步复习)

    第十五章 接口 1.接口: C++中允许多继承没有接口的概念.而java与C#中有,因为C#中 是单继承多接口. 所谓的接口,其实和抽象类.方法相似.都只有一个空方法.其本身不可以为基类,但是允许被其 ...

  7. C# json反序列化 对象中嵌套数组 (转载) 可能会导致循环或多重级联路径。请指定 ON DELETE NO ACTION 或 ON UPDATE NO ACTION,或修改其他 FOREIGN KEY 约束。

    C# json反序列化 对象中嵌套数组 (转载)   看图: 这里可以看到是二层嵌套!!使用C#如何实现?? 思路:使用list集合实现 → 建立类 → list集合 → 微软的   Newtonso ...

  8. sqlite学习笔记10:C语言中使用sqlite之查询和更新数据

    前面说到的 sqlite_exec() 中的第三个參数, SQLite 将为 sql 參数内运行的每一个 SELECT 语句中处理的每一个记录调用这个回调函数. 本节加入了两个函数.selectFro ...

  9. saltstack安装配置(master&minion)

    操作系统centos6.3,centos6.4,windows server2008R2,windows7. 文中的下载链接可能会随着saltstack官网上版本的更新,而出现变动或错误,请以你需要安 ...

  10. [LeetCode] 038. Count and Say (Easy) (C++/Python)

    索引:[LeetCode] Leetcode 题解索引 (C++/Java/Python/Sql) Github: https://github.com/illuz/leetcode 038. Cou ...