这两天发现 PPTP 连接不上了,表现为日志中出现

            Feb 26 03:04:22 hk5 pptpd[29356]: GRE: read(fd=6,buffer=6124a0,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs

在互联网上多方查找均无果,

后来查阅全文日志发现如下段落,

            Feb 26 03:04:22 hk5 pppd[29357]: Using interface ppp0
            Feb 26 03:04:22 hk5 pppd[29357]: Connect: ppp0 < --> /dev/pts/19
            Feb 26 03:04:22 hk5 pppd[29357]: rc_get_ipaddr: couldn't resolve hostname: hk5
            Feb 26 03:04:22 hk5 pppd[29357]: rc_own_ipaddress: couldn't get own IP address
            Feb 26 03:04:22 hk5 pppd[29357]: Peer glzjin failed CHAP authentication
            Feb 26 03:04:22 hk5 pppd[29357]: Connection terminated.

不能解析主机名?有点意思,到 /etc/hosts 中加上主机名的解析到 127.0.0.1 后,问题解决。

特此记录,以备查阅。