短信线上发送错误,线下成功
原因一:查看一下对应的code是否是正确的
原因二:查看一下服务器的时间时区是否是正确的,短信发送平台要校验对应的系统时间
Linux虚拟机挂起后自定校准时间
echo "ntpdate edu.ntp.org.cn" >> /etc/profile
chmod +s /usr/sbin/ntpdate
source /etc/profile
把同步时间的命令放到/etc/profile中去,每次打开终端前系统都会默认先同步一次时间。加上s权限位,以root身份运行。
再次链接bash会出现
Nov 11:02:50 ntpdate[29984]: adjust time server 202.118.1.130 offset -0.088380 sec
如果不希望打印这行信息,可以把第一行的命令修改为:ntpdate edu.ntp.org.cn >> /dev/null