- 浏览: 494877 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (563)
- 工作经验 (12)
- 数据库 (13)
- Servlet (10)
- Struts2 (1)
- Spring (25)
- Eclipse (5)
- Hibernate (5)
- Eclips (8)
- HTTP (7)
- J2EE (21)
- EHcache (1)
- HTML (11)
- 工具插件使用 (20)
- JPA (2)
- 杂谈 (17)
- 数据结构与算法 (3)
- Cloud Foundry (1)
- 安全 (10)
- J2SE (57)
- SQL (9)
- DB2 (6)
- 操作系统 (2)
- 设计模式 (1)
- 版本代码管理工具 (13)
- 面试 (10)
- 代码规范 (3)
- Tomcat (12)
- Ajax (5)
- 异常总结 (11)
- REST (2)
- 云 (2)
- RMI (3)
- SOA (1)
- Oracle (12)
- Javascript (20)
- jquery (7)
- JSP自定义标签 (2)
- 电脑知识 (5)
- 浏览器 (3)
- 正则表达式 (3)
- 建站解决问题 (38)
- 数据库设计 (3)
- git (16)
- log4j (1)
- 每天100行代码 (1)
- socket (0)
- java设计模式 耿祥义著 (0)
- Maven (14)
- ibatis (7)
- bug整理 (2)
- 邮件服务器 (8)
- Linux (32)
- TCP/IP协议 (5)
- java多线程并发 (7)
- IO (1)
- 网页小工具 (2)
- Flash (2)
- 爬虫 (1)
- CSS (6)
- JSON (1)
- 触发器 (1)
- java并发 (12)
- ajaxfileupload (1)
- js验证 (1)
- discuz (2)
- Mysql (14)
- jvm (2)
- MyBatis (10)
- POI (1)
- 金融 (1)
- VMWare (0)
- Redis (4)
- 性能测试 (2)
- PostgreSQL (1)
- 分布式 (2)
- Easy UI (1)
- C (1)
- 加密 (6)
- Node.js (1)
- 事务 (2)
- zookeeper (3)
- Spring MVC (2)
- 动态代理 (3)
- 日志 (2)
- 微信公众号 (2)
- IDEA (1)
- 保存他人遇到的问题 (1)
- webservice (11)
- memcached (3)
- nginx (6)
- 抓包 (1)
- java规范 (1)
- dubbo (3)
- xwiki (1)
- quartz (2)
- 数字证书 (1)
- spi (1)
- 学习编程 (6)
- dom4j (1)
- 计算机系统知识 (2)
- JAVA系统知识 (1)
- rpcf (1)
- 单元测试 (2)
- php (1)
- 内存泄漏cpu100%outofmemery (5)
- zero_copy (2)
- mac (3)
- hive (3)
- 分享资料整理 (0)
- 计算机网络 (1)
- 编写操作系统 (1)
- springboot (1)
最新评论
-
masuweng:
亦论一次OutOfMemoryError的定位与解错 -
变脸小伙:
引用[color=red][/color]百度推广中运用的技术 ...
Spring 3 mvc中返回pdf,json,xml等不同的view -
Vanillva:
不同之处是什么??
Mybatis中的like查询 -
thrillerzw:
转了。做个有理想的程序员
有理想的程序员必须知道的15件事 -
liujunhui1988:
觉得很有概括力
15 个必须知道的 Java 面试问题(2年工作经验)
源:http://blog.sina.com.cn/s/blog_3f1a25310100qn84.html
评:
时间同步
yum install -y rdate && rdate -s time.nist.gov
------------------------------
rdate解决方案:
使用ntpdate的遇到这样的错误提示:
no server suitable for synchronization found
很可能是防火墙封锁了udp的123端口, 如果关闭的防火墙问题依旧, 很可能是上层路由的设置有问题, 如果这种情况, 我们就只能通过tcp来更新时间啦
那肯定是rdate
<!–more–>
查看时间服务器的时间:
# rdate time-b.nist.gov
设置时间和时间服务器同步:
# rdate -s time-b.nist.gov
有什么不明白的, 请 # man rdate
下面附送系列时间服务器的列表, 有的不一定可以使用哈
time.nist.gov
time-b.nist.gov
216.118.116.105
rdate.darkorb.net
202.106.196.19
time-b.timefreq.bldrdoc.gov
ntpdate-debian解决方案:
执行 /usr/sbin/ntpdate time.stdtime.gov.tw 出现下述错误:
28 Dec 10:44:25 ntpdate[20348]: no server suitable for synchronization found
注: 于 Ubuntu / Debian Linux / FreeBSD 都有看到类似状况.
NTPDate Debug
sudo /usr/sbin/ntpdate -d time.stdtime.gov.tw
28 Dec 10:44:20 ntpdate[20348]: ntpdate 4.2.4p8@1.1612-o Tue Dec 8 22:21:54 UTC 2009 (1)
transmit(11.11.11.11)
transmit(11.11.11.11)
transmit(11.11.11.11)
transmit(11.11.11.11)
transmit(11.11.11.11)
11.11.11.11: Server dropped: no data
server 11.11.11.11, port 123
stratum 0, precision 0, leap 00, trust 000
refid [11.11.11.11], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000
originate timestamp: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000
transmit timestamp: cee29a08.b7863bee Mon, Dec 28 2009 10:44:24.716
filter delay: 0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
filter offset: 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000
NTPDate 正常状况
sudo /usr/sbin/ntpdate -d time.stdtime.gov.tw
28 Dec 10:44:10 ntpdate[3790]: ntpdate 4.2.4p6@1.1549-o Fri Dec 4 19:03:30 UTC 2009 (1)
transmit(11.11.11.11)
receive(11.11.11.11)
transmit(11.11.11.11)
receive(11.11.11.11)
transmit(11.11.11.11)
receive(11.11.11.11)
transmit(11.11.11.11)
receive(11.11.11.11)
transmit(11.11.11.11)
server 11.11.11.11, port 123
stratum 2, precision -20, leap 00, trust 000
refid [11.11.11.11], delay 0.05048, dispersion 0.00038
transmitted 4, in filter 4
reference time: cee2968e.b3b3e71f Mon, Dec 28 2009 10:29:34.701
originate timestamp: cee29a07.4a9ed10b Mon, Dec 28 2009 10:44:23.291
transmit timestamp: cee29a07.57baecd0 Mon, Dec 28 2009 10:44:23.342
filter delay: 0.05048 0.05132 0.05075 0.05052
0.00000 0.00000 0.00000 0.00000
filter offset: -0.06352 -0.06368 -0.06410 -0.06398
0.000000 0.000000 0.000000 0.000000
delay 0.05048, dispersion 0.00038
offset -0.063529
查到都是 udp 的 123 port 被 Firewall 挡掉(被 iptables / ipfw 挡掉), 不过我并没有挡这个 port, 很奇怪~
解法
上述原因不明, 不过可以用此方法解决(换个 Time Server 就解决了. XD)
sudo /usr/sbin/ntpdate-debian
28 Dec 10:46:46 ntpdate[20408]: step time server 204.9.54.119 offset -2.274225 sec
上述命令为执行此语法: sudo /usr/sbin/ntpdate -d 0.debian.pool.ntp.org
注1: 从[0-3].debian.pool.ntp.org 的 Server sync 时间.
注2: 直接执行 sudo /usr/sbin/ntpdate 0.debian.pool.ntp.org 也是可以.
另一个牛人的解决方案:
当用ntpdate -d 来查询时会发现导致 no server suitable for synchronization found 的错误的信息有以下2个:
错误1.Server dropped: Strata too high
在ntp客户端运行ntpdate serverIP,出现no server suitable for synchronization found的错误。
在ntp客户端用ntpdate –d serverIP查看,发现有“Server dropped: strata too high”的错误,并且显示“stratum 16”。而正常情况下stratum这个值得范围是“0~15”。
这是因为NTP server还没有和其自身或者它的server同步上。
以下的定义是让NTP Server和其自身保持同步,如果在/ntp.conf中定义的server都不可用时,将使用local时间作为ntp服务提供给ntp客户端。
server 127.127.1.0
fudge 127.127.1.0 stratum 8
在ntp server上重新启动ntp服务后,ntp server自身或者与其server的同步的需要一个时间段,这个过程可能是5分钟,在这个时间之内在客户端运行ntpdate命令时会产生no server suitable for synchronization found的错误。
那么如何知道何时ntp server完成了和自身同步的过程呢?
在ntp server上使用命令:
# watch ntpq -p
出现画面:
Every 2.0s: ntpq -p Thu Jul 10 02:28:32 2008
remote refid st t when poll reach delay offset jitter
==============================================================================
192.168.30.22 LOCAL(0) 8 u 22 64 1 2.113 179133. 0.001
LOCAL(0) LOCAL(0) 10 l 21 64 1 0.000 0.000 0.001
注意LOCAL的这个就是与自身同步的ntp server。
注意reach这个值,在启动ntp server服务后,这个值就从0开始不断增加,当增加到17的时候,从0到17是5次的变更,每一次是poll的值的秒数,是64秒*5=320秒的时间。
如果之后从ntp客户端同步ntp server还失败的话,用ntpdate –d来查询详细错误信息,再做判断。
错误2.Server dropped: no data
从客户端执行netdate –d时有错误信息如下:
transmit(192.168.30.22)
transmit(192.168.30.22)
transmit(192.168.30.22)
transmit(192.168.30.22)
transmit(192.168.30.22)
192.168.30.22: Server dropped: no data
server 192.168.30.22, port 123
.....
28 Jul 17:42:24 ntpdate[14148]: no server suitable for synchronization found
出现这个问题的原因可能有2:
1。检查ntp的版本,如果你使用的是ntp4.2(包括4.2)之后的版本,在restrict的定义中使用了notrust的话,会导致以上错误。
使用以下命令检查ntp的版本:
# ntpq -c version
下面是来自ntp官方网站的说明:
The behavior of notrust changed between versions 4.1 and 4.2.
In 4.1 (and earlier) notrust meant "Don't trust this host/subnet for time".
In 4.2 (and later) notrust means "Ignore all NTP packets that are not cryptographically authenticated." This forces remote time servers to authenticate themselves to your (client) ntpd
解决:
把notrust去掉。
2。检查ntp server的防火墙。可能是server的防火墙屏蔽了upd 123端口。
可以用命令
#service iptables stop
来关掉iptables服务后再尝试从ntp客户端的同步,如果成功,证明是防火墙的问题,需要更改iptables的设置。
评:
时间同步
yum install -y rdate && rdate -s time.nist.gov
------------------------------
rdate解决方案:
使用ntpdate的遇到这样的错误提示:
no server suitable for synchronization found
很可能是防火墙封锁了udp的123端口, 如果关闭的防火墙问题依旧, 很可能是上层路由的设置有问题, 如果这种情况, 我们就只能通过tcp来更新时间啦
那肯定是rdate
<!–more–>
查看时间服务器的时间:
# rdate time-b.nist.gov
设置时间和时间服务器同步:
# rdate -s time-b.nist.gov
有什么不明白的, 请 # man rdate
下面附送系列时间服务器的列表, 有的不一定可以使用哈
time.nist.gov
time-b.nist.gov
216.118.116.105
rdate.darkorb.net
202.106.196.19
time-b.timefreq.bldrdoc.gov
ntpdate-debian解决方案:
执行 /usr/sbin/ntpdate time.stdtime.gov.tw 出现下述错误:
28 Dec 10:44:25 ntpdate[20348]: no server suitable for synchronization found
注: 于 Ubuntu / Debian Linux / FreeBSD 都有看到类似状况.
NTPDate Debug
sudo /usr/sbin/ntpdate -d time.stdtime.gov.tw
28 Dec 10:44:20 ntpdate[20348]: ntpdate 4.2.4p8@1.1612-o Tue Dec 8 22:21:54 UTC 2009 (1)
transmit(11.11.11.11)
transmit(11.11.11.11)
transmit(11.11.11.11)
transmit(11.11.11.11)
transmit(11.11.11.11)
11.11.11.11: Server dropped: no data
server 11.11.11.11, port 123
stratum 0, precision 0, leap 00, trust 000
refid [11.11.11.11], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000
originate timestamp: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000
transmit timestamp: cee29a08.b7863bee Mon, Dec 28 2009 10:44:24.716
filter delay: 0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
filter offset: 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000
NTPDate 正常状况
sudo /usr/sbin/ntpdate -d time.stdtime.gov.tw
28 Dec 10:44:10 ntpdate[3790]: ntpdate 4.2.4p6@1.1549-o Fri Dec 4 19:03:30 UTC 2009 (1)
transmit(11.11.11.11)
receive(11.11.11.11)
transmit(11.11.11.11)
receive(11.11.11.11)
transmit(11.11.11.11)
receive(11.11.11.11)
transmit(11.11.11.11)
receive(11.11.11.11)
transmit(11.11.11.11)
server 11.11.11.11, port 123
stratum 2, precision -20, leap 00, trust 000
refid [11.11.11.11], delay 0.05048, dispersion 0.00038
transmitted 4, in filter 4
reference time: cee2968e.b3b3e71f Mon, Dec 28 2009 10:29:34.701
originate timestamp: cee29a07.4a9ed10b Mon, Dec 28 2009 10:44:23.291
transmit timestamp: cee29a07.57baecd0 Mon, Dec 28 2009 10:44:23.342
filter delay: 0.05048 0.05132 0.05075 0.05052
0.00000 0.00000 0.00000 0.00000
filter offset: -0.06352 -0.06368 -0.06410 -0.06398
0.000000 0.000000 0.000000 0.000000
delay 0.05048, dispersion 0.00038
offset -0.063529
查到都是 udp 的 123 port 被 Firewall 挡掉(被 iptables / ipfw 挡掉), 不过我并没有挡这个 port, 很奇怪~
解法
上述原因不明, 不过可以用此方法解决(换个 Time Server 就解决了. XD)
sudo /usr/sbin/ntpdate-debian
28 Dec 10:46:46 ntpdate[20408]: step time server 204.9.54.119 offset -2.274225 sec
上述命令为执行此语法: sudo /usr/sbin/ntpdate -d 0.debian.pool.ntp.org
注1: 从[0-3].debian.pool.ntp.org 的 Server sync 时间.
注2: 直接执行 sudo /usr/sbin/ntpdate 0.debian.pool.ntp.org 也是可以.
另一个牛人的解决方案:
当用ntpdate -d 来查询时会发现导致 no server suitable for synchronization found 的错误的信息有以下2个:
错误1.Server dropped: Strata too high
在ntp客户端运行ntpdate serverIP,出现no server suitable for synchronization found的错误。
在ntp客户端用ntpdate –d serverIP查看,发现有“Server dropped: strata too high”的错误,并且显示“stratum 16”。而正常情况下stratum这个值得范围是“0~15”。
这是因为NTP server还没有和其自身或者它的server同步上。
以下的定义是让NTP Server和其自身保持同步,如果在/ntp.conf中定义的server都不可用时,将使用local时间作为ntp服务提供给ntp客户端。
server 127.127.1.0
fudge 127.127.1.0 stratum 8
在ntp server上重新启动ntp服务后,ntp server自身或者与其server的同步的需要一个时间段,这个过程可能是5分钟,在这个时间之内在客户端运行ntpdate命令时会产生no server suitable for synchronization found的错误。
那么如何知道何时ntp server完成了和自身同步的过程呢?
在ntp server上使用命令:
# watch ntpq -p
出现画面:
Every 2.0s: ntpq -p Thu Jul 10 02:28:32 2008
remote refid st t when poll reach delay offset jitter
==============================================================================
192.168.30.22 LOCAL(0) 8 u 22 64 1 2.113 179133. 0.001
LOCAL(0) LOCAL(0) 10 l 21 64 1 0.000 0.000 0.001
注意LOCAL的这个就是与自身同步的ntp server。
注意reach这个值,在启动ntp server服务后,这个值就从0开始不断增加,当增加到17的时候,从0到17是5次的变更,每一次是poll的值的秒数,是64秒*5=320秒的时间。
如果之后从ntp客户端同步ntp server还失败的话,用ntpdate –d来查询详细错误信息,再做判断。
错误2.Server dropped: no data
从客户端执行netdate –d时有错误信息如下:
transmit(192.168.30.22)
transmit(192.168.30.22)
transmit(192.168.30.22)
transmit(192.168.30.22)
transmit(192.168.30.22)
192.168.30.22: Server dropped: no data
server 192.168.30.22, port 123
.....
28 Jul 17:42:24 ntpdate[14148]: no server suitable for synchronization found
出现这个问题的原因可能有2:
1。检查ntp的版本,如果你使用的是ntp4.2(包括4.2)之后的版本,在restrict的定义中使用了notrust的话,会导致以上错误。
使用以下命令检查ntp的版本:
# ntpq -c version
下面是来自ntp官方网站的说明:
The behavior of notrust changed between versions 4.1 and 4.2.
In 4.1 (and earlier) notrust meant "Don't trust this host/subnet for time".
In 4.2 (and later) notrust means "Ignore all NTP packets that are not cryptographically authenticated." This forces remote time servers to authenticate themselves to your (client) ntpd
解决:
把notrust去掉。
2。检查ntp server的防火墙。可能是server的防火墙屏蔽了upd 123端口。
可以用命令
#service iptables stop
来关掉iptables服务后再尝试从ntp客户端的同步,如果成功,证明是防火墙的问题,需要更改iptables的设置。
发表评论
-
Linux下查看及修改进程打开的文件句柄数量
2017-02-27 20:15 1225源:http://blog.csdn.net/kobe ... -
Mysql经mysql连接的空闲时间超过8小时后 MySQL自动断开该连接解决方案
2016-07-06 17:16 2091源:http://www.jb51.net/artic ... -
linux 添加时间同步 与定时
2015-12-15 17:43 528cp -rf /usr/share/zoneinfo/Asia ... -
Shell script: 获取第10+个参数
2015-11-04 14:33 442源:http://www.cnblogs.com/sheldo ... -
nginx超时设置
2015-10-21 14:15 671源:http://www.cnblogs.com/discus ... -
ssh 免密码登录
2015-10-12 11:26 390源:http://chenlb.iteye.com/blog/ ... -
Maven Release Plugin Prepare a Release and create new branch
2015-09-17 15:22 767源:http://maven.apache.org/maven ... -
Centos初始化java环境
2015-09-12 14:31 4671.上传 jdk jdk-7u65-linux-x64.tar ... -
ssh 远程不能执行JAVA启动脚本
2015-09-08 21:17 1258源:http://java.freesion.com/arti ... -
java ImageIO处理图像的封装
2015-09-06 10:17 342源:http://blog.csdn.net/hu_sheng ... -
解决eclipse显示jar源代码中文乱码问题
2015-08-07 16:47 543源:http://wmljava.iteye.com/blog ... -
超漂亮的纯JAVA浏览器(附源码)
2015-08-06 16:42 1176源:http://blog.csdn.net/lxf9601/ ... -
syntax error near unexpected token
2015-08-05 20:40 583源:http://jingyan.baidu.com/arti ... -
linux awk命令详解
2015-05-27 21:33 468源:http://www.cnblogs.com/gg ... -
quartz的任务调度,同一个任务,在相同的时间被调用了2次
2015-02-11 13:06 598源:http://www.iteye.com/topi ... -
目前常用命令
2015-02-09 20:14 579JSON格式化 http://json.parse ... -
centos 推荐使用epel源
2015-02-07 18:36 533源:http://blog.51yip.com/linux/1 ... -
CentOS 中yum命令运行错误解决办法
2015-02-03 14:10 642源:http://blog.sina.com.cn/s/blo ... -
[转]漫谈创业和管理-程序员5大思维障碍
2015-01-29 20:09 650源:http://javatar.iteye.com/blog ... -
win8 如何命令行设置 计划任务
2014-12-18 18:35 814源:http://zhidao.baidu.com/link? ...
相关推荐
下面小编就为大家带来一篇完美解决ntp的错误问题no server suitable for synchronization fo。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧
Synchronization Techniques for Digital Receivers
latest results in the field of synchronization for OFDMA systems, with tutorial objectives foremost. After quantifying the effects of synchronization errors on the system performance, we review some ...
Robust frequency and timing synchronization for OFDM
本文主要介绍mybaits非配置原因出错,这里对这个出现的问题做了详细介绍,及解决办法,有兴趣的小伙伴可以参考下
A protocol is provided in this standard that enables precise synchronization of clocks in measurement and control systems implemented with technologies such as network communication, local computing, ...
信号的同步不仅包括时间同步,还有载波同步和帧同步、网同步等。先看懂别人的算法,再写代码,如果代码写出来并且仿真结果正确,那么就基本上对这个算法理解的差不多了。当然,实际中并不像说的那么简单,有的同步还...
A Robust Timing and Frequency Synchronization for OFDM Systems,发表在IEEE Transaction on wireless communication上,很著名的一篇文档。
介绍数字接收机同步技术的权威之作,涉及时间、相位、频率同步
WaitOnAddress synchronization.lib
Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems
Packet Synchronization
英文版的 详细介绍了syncrhonization的物理概念及意义
Process synchronization
White Paper: Precision Clock Synchronization
( Adaptive finite-time control for overlapping cluster synchronization in coupled complex networks.pdf )
DS-SS system with blocks for synchronization of clock and carrier