ntpd sendto() Bad file descriptor error

时间:2019-11-20 08:52:55  来源:igfitidea点击:

问题

Red Hat Enterprise Linux服务器报错:

# cat /var/log/message

server ntpd[22694]: sendto(10.0.77.54): Bad file descriptor  
server ntpd[22694]: sendto(220.111.46.100): Bad file descriptor

解决方案

如果在/var/log/messages中看到Bad file descriptor errors(错误的文件描述符错误),请确保仅运行一个ntpd实例。

停止ntpd

# /etc/init.d/ntpd stop

杀死ntpd进程

杀死所有ntpd实例:

# killall ntpd

启动ntpd

# /etc/init.d/ntpd start

查看日志文件/var/log/messages

使用tail命令:

# tail -f /var/log/messages

输出:

May 22 16:44:35 server ntpd[17549]: Listening on interface lo, 127.0.0.1#123
May 22 16:44:35 server ntpd[17549]: Listening on interface eth0, 10.9.123.2#123
May 22 16:44:35 server ntpd[17549]: kernel time sync status 0040
May 22 16:44:36 server ntpd[17549]: frequency initialized -58.648 PPM from /var/lib/ntp/drift
May 22 16:47:52 server ntpd[17549]: synchronized to LOCAL(0), stratum 10
May 22 16:47:52 server ntpd[17549]: kernel time sync disabled 0041
May 22 16:47:52 server ntpd[17549]: synchronized to 202.26.1.221, stratum 1