===== 应用服务器云网络错误之ipv6-dns ===== **故障学校:** 宜春学院 **故障表现:** 云网络异常,证书正确,测试www.idste.net和cloud[a-c].idste.net端口正常,使用ssh命令可连接云服务器,未有连接被重置错误 **故障特征:** - 云网络异常,无法 - 连接; - 运行`php /home/www/api/workerman/iDsteServer.php restart` 打印"proxy alive error"错误且有"out:"(冒号后无任何内容) - 运行`ping www.idste.net` 可获取IP且没有明显延迟 - 运行`curl https://www.baidu.com` 有明显延迟,典型响应时间大于10秒 - 运行`curl -4 https://www.baidu.com` 无明显延迟 - 运行`ifconfig`可看到网卡分配了IPV6地址 **故障原因:** curl/wget等工具解析域名时,如果ipv6可用则首先尝试IPV6解析,失败时才尝试IPV4解析,导致解析时间过长,iDsteServer云网络相关接口超时。 **解决方法:** * vi /etc/default/grub #添加或修改以下内容 GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1" GRUB_CMDLINE_LINUX="ipv6.disable=1" * update-grub * reboot