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


using curl with php cannot connect peer reset

试图找出对等方重置连接的原因。你知道在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

改变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-hellohttp://www.redhat.com/magazine/002dec04/departments/tips_tricks/