问题现象:

通过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. net3:Button的CommandName使用,AdRotator,BulletedList的使用

    原文发布时间为:2008-07-29 -- 来源于本人的百度文章 [由搬家工具导入] using System;using System.Data;using System.Configuration ...

  2. Python入门--10--序列

    一.与列表.元祖的相同与不同 1.都可以通索引得到元素 2.默认索引从0开始 3.可以通过分片得到一个范围内的元素集合 4.有很多共同的操作符 二. 1.list()这个函数用法 a="we ...

  3. golang-uuid

    uuid第三方库可以在github上找,我在这使用的是:github.com/satori/go.uuid PS:不知道哪里原因,使用go mod 管理包,下载的包和github上的不是完全一样,也特 ...

  4. (12)centos之stmp服务器

    yum remove sendmail #卸载sendmail  

  5. Netty构建游戏服务器(三)--netty spring简单整合

    一,基本方法 上节实现了netty的基本连接,这节加入spring来管理netty,由spring来开启netty服务. 在netty服务器中,我们建立了三个类:HelloServer(程序主入口) ...

  6. python type()函数

    我怎么把一个变量的类型写入文件?a = 3type(a)貌似返回的是type类型,不能打印,也不能用文件的write怎么半,或者怎么转换成srt之类的? type()函数得到的是一个类型而不是字符串, ...

  7. Python基础语法06--文件

    Python 文件I/O 本章只讲述所有基本的的I/O函数,更多函数请参考Python标准文档. 打印到屏幕 最简单的输出方法是用print语句,你可以给它传递零个或多个用逗号隔开的表达式.此函数把你 ...

  8. 转: DNS 原理入门 (from 阮一峰)

    转自:http://www.ruanyifeng.com/blog/2016/06/dns.html DNS 原理入门   作者: 阮一峰 日期: 2016年6月16日 DNS 是互联网核心协议之一. ...

  9. 【leetcode】 26. Remove Duplicates from Sorted Array

    @requires_authorization @author johnsondu @create_time 2015.7.22 18:58 @url [remove dublicates from ...

  10. js中创建html标签、加入select下默认的option的value和text、删除select元素节点下全部的OPTION节点

    <pre name="code" class="java"> jsp 中的下拉框标签: <s:select name="sjx&qu ...