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

在php中使用curl无法连接对等重置,php,linux,curl,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/

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

资源:

cat/etc/*-release NAME=“Red Hat Enterprise Linux Server”VERSION=“7.0(Maipo)”ID=“rhel”ID\u LIKE=“fedora”VERSION\u ID=“7.0”PRETTY\u NAME=“Red Hat Enterprise Linux Server 7.0(Maipo)”ANSI\u COLOR=“0;31”CPE\u NAME=“CPE:/o:redhat:Enterprise\u Linux:7.0:GA:Server”HOME\u URL=“”BUG\u REPORT\u URL=“”redhat\u BUGZILLA\u PRODUCT=“Red Hat Enterprise Linux 7”REDHAT\u BUGZILLA\u产品\u版本=7.0 REDHAT\u支持\u产品=“Red Hat Enterprise Linux”REDHAT\u支持\u产品\u版本=7.0 Red Hat Enterprise Linux服务器7.0版(Maipo)[root@ip-10-0-0-197 ec2用户]#uname-a Linux ip-10-0-0-197.ec2.internal 3.10.0-123.8.1.el7.x86#u 64#1 SMP Mon Aug 11 13:37:49 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux如果您使用的是Amazon Linux AMI,则要编辑的文件是
/etc/dhcp/dhclient-eth0.conf
/etc/dhcp/dhclient.conf
。你的资源帮我弄明白了。链接到此更改,因为它还需要在文件中添加不同的行: