wget 正在连接 127.0.0.1:36627... 失败:拒绝连接

我在wget的时候遇到下面的问题,

hz@Asia:~/tmp$ wget https://qq.com
--2017-11-16 15:18:57--  https://qq.com/
正在连接 127.0.0.1:36627... 失败:拒绝连接。

定位问题步骤如下

  1. 查看本地端口的使用情况
hz@Asia:~/tmp$ sudo netstat -ntpl
激活Internet连接 (仅服务器)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1061/sshd       
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      2696/cupsd      
tcp6       0      0 :::22                   :::*                    LISTEN      1061/sshd       
tcp6       0      0 ::1:631                 :::*                    LISTEN      2696/cupsd      


发现并没有服务在占用端口36627
2. 查看本地网络是否走了代理服务

hz@Asia:~/tmp$ export | grep -i proxy
declare -x COMPIZ_CONFIG_PROFILE="ubuntu"
declare -x HTTPS_PROXY="http://127.0.0.1:36627/"
declare -x HTTP_PROXY="http://127.0.0.1:36627/"
declare -x NO_PROXY="localhost,127.0.0.0/8,::1"
declare -x http_proxy="http://127.0.0.1:36627/"
declare -x https_proxy="http://127.0.0.1:36627/"
declare -x no_proxy="localhost,127.0.0.0/8,::1"

在找到了被占用的端口的36627, 确实是走了代理,于是问题找到了。

解决方法
关闭服务

hz@Asia:~/tmp$ unset HTTPS_PROXY
hz@Asia:~/tmp$ unset https_proxy
hz@Asia:~/tmp$ wget https://qq.com
--2017-11-16 15:20:15--  https://qq.com/
正在解析主机 qq.com (qq.com)... 125.39.240.113, 61.135.157.156
正在连接 qq.com (qq.com)|125.39.240.113|:443... 已连接。

邮箱:tanya.h@aliyun.com

  • 10
    点赞
  • 30
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值