使用curl与php无法连接对等重置

时间:2014-11-11 21:40:51

标签: php linux curl

尝试找出对等方重置连接的原因。知道如何在wireshark中查找或者如何正确排除故障以找到解决方案?

curl --tlsv1.0 https://www.xxx.com -v

Hostname was NOT found in DNS cache
  Trying ipaddress...
Connected to xxxx.com (ipaddress) port 443 (#0)
Initializing NSS with certpath: sql:/etc/pki/nssdb
  CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
NSS error -5961 (PR_CONNECT_RESET_ERROR)
TCP connection reset by peer
Closing connection 0
curl: (35) TCP connection reset by peer

1 个答案:

答案 0 :(得分:1)

更改AWS默认MTU是我的答案。之后,Curl等工作得很好。

要使eth0的设置永久化,请编辑配置文件/ etc / sysconfig / network-scripts / ifcfg-eth0并添加MTU = 1200行,如下所示:

DEVICE=eth0
MTU=1500
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet

然后,重启界面(以root身份): 服务网络重启eth0

资源: https://serverfault.com/questions/594727/openssl-hangs-after-client-hello http://www.redhat.com/magazine/002dec04/departments/tips_tricks/