ntpdate命令遇到“the NTP socket is in use, exiting”
来源:互联网 发布:2016年农业保险数据 编辑:程序博客网 时间:2024/06/06 05:27
#ntpdate pool.ntp.org15 May 10:51:02 ntpdate[50325]: the NTP socket is in use, exiting
这个提示表明NTP的端口已经被占用了,该端口默认为123,并且是UPD模式。可以使用nc或者netstat命令查看那个服务占用了此端口,例如:
nc -uz -w 3 172.0.0.1 123netstat -nupl | grep "123"
一般情况下,别的服务是不会占用这个端口的,所以可能的结果是ntpd服务在占用。此时,可以使用ntpdate命令的-u参数解决此问题,即:
# ntpdate -u pool.ntp.org15 May 11:19:13 ntpdate[28173]: adjust time server 202.118.1.81 offset -0.029390 sec
同步成功。参数u说明如下:
Direct ntpdate to use an unprivileged port for outgoing packets. This is most useful when behind a firewall that blocks incoming traffic to privileged ports, and you want to synchronize with hosts beyond the firewall. Note that the -d option always uses unprivileged ports.
简单的说明就是:它不再使用默认的端口,而是使用了一个别的端口,所以避免了端口冲突。
顺便附上公网上有效的几个ntpd服务器:
ntp.fudan.edu.cn (复旦)
asia.pool.ntp.org(台警大授时中心-台湾)
time.windows.com (微软公司授时主机-美国)
time.nist.gov (美国)
pool.ntp.org
0 0
- ntpdate命令遇到“the NTP socket is in use, exiting”
- ntpdate 遇到 ntpdate[3779]: the NTP socket is in use, exiting
- ntpdate[18977]: the NTP socket is in use, exiting解决
- ntpdate[1788]: the NTP socket is in use, exiting
- 同步NTP 服务器时间错误:Updating Time : ntpdate[3108]: the NTP socket is in use, exiting
- the NTP socket is in use, exiting
- linux中时间服务器同步问题:ntpdate[5426]: the NTP socket is in use, exiting
- ntpdate解决同步时间报错 the NTP socket is in use, exiting
- 解决the NTP socket is in use, exiting问题
- 解决the NTP socket is in use, exiting问题
- Linux下 ntp 时间同步服务ntpd 出现 the NTP socket is in use, exiting 解决
- Linux下 ntp 时间同步服务ntpd 出现 the NTP socket is in use, exiting 解决
- 轉Linux下 ntp 时间同步服务ntpd 出现 the NTP socket is in use, exiting 解决
- Qt socket。The bound address is already in use
- idea【 Address localhost:1099 is already in use】socket closed
- The driver is activated but not currently in use
- SBL-SMI-00046: The port %1 is already in use
- October( the name is already in use)
- Word Search leetCode,,
- 欢迎使用Markdown编辑器写博客<存档>
- unity3d项目文件目录发布后,对应的ios/android应用目录
- 5-15
- 如何在有序数组中给出指定数字出现的次数
- ntpdate命令遇到“the NTP socket is in use, exiting”
- 量子力学第九弹——微扰论
- VIM技巧2 – 删除空行 (正则表达式)
- delphi代码上传到svn后出现对齐不统一的问题解决
- 五月总结
- 设计模式之PHP项目应用——23种设计模式目录
- Asp.net 从Excel读取图片并保存,无法从内存读取图片,Excel组件和相关IIS的配置及解决办法
- js mysql数据库的时间转换
- 构造函数与成员函数的区别?