台湾地区一台机器进行时间同步时,出现下面的错误。很显然,它提示的是不能找到主机time.stdtime.gov.tw。 所以我初步猜测是由于dns解析的问题

 
1
2
3
4
#  /usr/sbin/ntpdate  time.stdtime.gov.tw
Error : Temporary failure in name resolution
29 Oct 14:18:59 ntpdate[25327]: can't find host time.stdtime.gov.tw
29 Oct 14:18:59 ntpdate[25327]: no servers can be used, exiting

确认防火墙没有问题后,执行域名解析,发现失败

 
1
2
# nslookup  time.stdtime.gov.tw
;; connection timed out; no servers could be reached

尝试ping外网,以确认能正常连到外网,连网正常

 
1
2
3
4
5
6
7
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=53 time=1.48 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=53 time=1.40 ms
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 1.404/1.445/1.487/0.056 ms

修改/etc/resolv.conf文件

 
1
2
3
# cat /etc/resolv.conf
nameserver 172.0.0.29
nameserver 8.8.8.8

修改后,再次执行时间同步,ok鸟!

 
1
2
# /usr/sbin/ntpdate  time.stdtime.gov.tw
29 Oct 14:23:36 ntpdate[25337]: adjust time server 59.124.196.84 offset 0.100921 sec

解决ntp的错误:no server can be used,exiting的更多相关文章

  1. 解决ntp的错误 no server suitable for synchronization found

    当用ntpdate -d 来查询时会发现导致 no server suitable for synchronization found 的错误的信息有以下2个: 错误1.Server dropped: ...

  2. 解决Jenkins的错误“The Server rejected the connection: None of the protocols were accepted”

    1. 配置节点,配置好节点后,在节点机上运行已下载文件,双击执行,提示"The Server rejected the connection: None of the protocols w ...

  3. spring boot 连接mysql 错误The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one

    1.spring boot 整合mybatis 连接mysql时错误 The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or repr ...

  4. 解决mybatis foreach 错误: Parameter '__frch_item_0' not found

    解决mybatis foreach 错误: Parameter '__frch_item_0' not found 在遍历对象的属性(是ArrayList对象)时报错: org.mybatis.spr ...

  5. 解决WordPress设置错误的url网站不能访问的问题

    通过WordPress后台首选项更改了网站url地址之后,网站就会出现访问不了的情况,一般来说,网站后台也登陆不上去了,我从网上寻找到了四种方法,这四种方法前三种都是需要登陆到后台的,但实际上出错后, ...

  6. NPM全局安装软件包时解决EACCES权限错误

    NPM全局安装软件包时解决EACCES权限错误 Resolving EACCES permissions errors when installing packages globally npm WA ...

  7. 配置linux系统时区---解决ntp同步完时间不准问题

    ntp配置完成后时间仍然不准有下面两种情况: ntp服务端配置完ntp服务器后,查看时间和百度的时间不一样按照下面解决 ntp客户端同步完ntp服务器后,查看客户端的时间和百度不一致,按照下面解决 1 ...

  8. 解决服务器连接错误Host ‘XXX’ is not allowed to connect to this MySQL server

    这段时间在研究火车头的入库教程,在“配置登陆信息和数据库(mysql)”连接中,出现“服务器连接错误Host 'XXX' is not allowed to connect to this MySQL ...

  9. 解决mysql启动时报The server quit without updating PID file 的错误(转)

    1.一般是权限问题,把用户和组改为mysql就可以了. chown -R mysql:mysql  /var/lib/mysql 2.在启动mysql时报下列错误 [root@mysqld2 ~]#  ...

随机推荐

  1. SQL Server 2016 SP1 标准版等同企业版?!

    上周微软发布了SQL Server的历史性公告:SQL Server 标准版的SP1提供你和企业版一样得功能.你不信的话?可以点击这里. 这改变了整个关系数据库市场,重重打击了Oracle.在今天的文 ...

  2. Premiere Pro & After Effects插件开发调试方法

    在给Adobe Premiere Pro(PR)和Adobe After Effects(AE)插件开发时,对于实时调试插件有着很强的需求.除了业务需求外,单步调试插件还能够摸清楚Plugin和Hos ...

  3. The Practice of .NET Cross-Platforms

    0x01 Preface This post is mainly to share the technologies on my practice about the .NET Cross-Platf ...

  4. 淡蓝风格的手机登录HTML模板

    查看效果:http://hovertree.com/texiao/mobile/10/ 或者手机扫描二维码查看效果: 效果图: 代码如下: <!DOCTYPE html> <html ...

  5. 类型转换及返回json对象的问题

    @ResponseBody @RequestMapping(value="/user/getUserId.do")//method=RequestMethod.POST publi ...

  6. java对email邮箱的真实、有效性验证

    三种验证邮箱有效性的方式: 方式1: public static boolean checkEmail(String email) {     if (!email.matches("[\\ ...

  7. 搭建Go开发及调试环境(LiteIDE + GoClipse) -- Windows篇

    这里以Windows7 64位为例,如果是32位环境需安装对应版本程序.   一.安装golang1.2.2 1.3及1.3.1编译生成的二进制文件,无法使用LiteIDE23.2携带的gdb7.7进 ...

  8. java timer 执行任务

    1. 建立timer import java.util.Timer; import java.util.TimerTask; public class Start { public class Sta ...

  9. spice server dpkg-buildpackage 打包编译备忘

    一般我们会通过configure,make 编译.但是为了替换版本的方便需要把他编译成deb的包,而且还需要自定义下包名.下面就记录下我的修改过程. 注:前面关于spice server的编译过程掠过 ...

  10. git的使用以及github

    现在公司使用的是svn,然而,技多不压身,现在学习一下github http://blog.csdn.net/llf369477769/article/details/51917557这篇博客总结的很 ...