ntpdate更新系统时间时报错Can't find host ntp1.aliyun.com: Servname not supported for ai_socktype (-8)

所报错误:

[root@web01 ~]# ntpdate ntp1.aliyun.com

Error resolving ntp1.aliyun.com: Servname not supported for ai_socktype (-8)

11 Feb 20:58:03 ntpdate[3318]: Can't find host ntp1.aliyun.com: Servname not supported for ai_socktype (-8)

11 Feb 20:58:03 ntpdate[3318]: no servers can be used, exiting

原因:/etc/services 文件被改动或者不存在 导致域名解析错误

[root@web01 etc]# ls -l servic*

-rw-r--r--. 1 root root  10240 Feb 11 02:27 services

-rw-r--r--  1 root root 641020 Feb 11 02:22 services.bak  长格式对比后发现源文件已改动

[root@web01 etc]# mv services /tmp

[root@web01 etc]# ls -l servic*

-rw-r--r-- 1 root root 641020 Feb 11 02:22 services.bak

[root@web01 etc]# mv services.bak  services

[root@web01 etc]# ls -l servic*

-rw-r--r-- 1 root root 641020 Feb 11 02:22 services

[root@web01 etc]# ntpdate ntp1.aliyun.com

12 Feb 17:00:54 ntpdate[3363]: step time server 182.92.12.11 offset 71111.641937 sec

ntpdate更新系统时间时报错Can't find host ntp1.aliyun.com: Servname not supported for ai_socktype (-8)的更多相关文章

  1. Linux命令-更新系统时间和硬件时间

    查看系统时间和时区: date 查看系统时间date -R 查看时区 修改时区: tzselect 修改时区 或 cp /usr/share/zoneinfo/Asia/Shanghai /etc/l ...

  2. C# 同步更新系统时间

    前言 在定位用户问题时,发现有些电脑,会出现系统时间不是最新的问题. 可能原因: 取消了勾选服务器时间同步 当前安装的系统,是一个未知来源系统,导致系统时间更新失败 而系统时间不正确,会导致IE选项- ...

  3. Jmeter联机负载时报错: connection refused to host localhost,nested exception is:java.net ConnectException:Connection refused:connect

    Jmeter联机负载时报错: connection refused to host localhost,nested exception  is:java.net ConnectException:C ...

  4. 更新系统时间 & 查看/修改LINUX时区和时间

    一.时区0. date '+%Y%M%D' 按照格式显示当前日期,结果如下: date "+%Y-%m-%d %H:%M:%S" 1. 查看当前时区 :[root@master ~ ...

  5. Appium在Android7.0及以上系统运行时报错的解决方案

    背景:在使用Samsung S系列手机进行自动化测试时,发现同样脚本的情况下华为荣耀系列可以正常运行,最终发现差异在于Android7.0及以上系统和appium版本不匹配,需要升级appium.但需 ...

  6. CentOS 7更新系统时间

    Linux系统在安装的时候,总是会出现时区,时间的错误. 将Linux系统时间和本地区网络时间同步,ntpdate可以从网络同步时间, 需要安装sudo yum install ntp ntpdate ...

  7. linux更新系统时间

    查看时间 date 更新时间 yum install ntpdate ntpdate time.windows.com

  8. mysql更新表数据时报错 You can't specify target table 'RES_CATALOG_CLASSIFY' for update in FROM clause

    You can't specify target table for update in FROM clause含义:不能在同一表中查询的数据作为同一表的更新数据. 将sql语句 UPDATE RES ...

  9. Mysql 插入时间时报错Incorrect datetime value: '' for column 'createtime'

    在网上找了很多方法总结如下: 1.MySQL驱动版本的问题.这种一般是在mYSQL版本更新了之后才会报错.解决方法在jdbc里添加“&useOldAliasMetadataBehavior=t ...

随机推荐

  1. Java经典算法50道题

    [程序1]题目:古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少? 月   数量  1    1  2   ...

  2. TCP-IP ---三次握手和四次挥手来啦

  3. jQuery Validation Engine(二) checkHello data-errormessage

    <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title> ...

  4. 四、java基础-面向过程_对象_类中可出现的因素

    1.面向过程和面向对象区别: 1)面向过程:开发一个应用程序.一个项目,必须先了解整个过程,了解各个步骤.模块间的因果关系,使的面向过程方式去开发程序时,代码和代码之间的关联程度是非常强.所以其中任何 ...

  5. (2)LoraWAN:Lora LMIC library 编程模型及API

    二.LMIC library 编程模型及API LMiC库可以通过一组API函数(API functions),运行时函数(run-time functions),回调函数(callback func ...

  6. tomcat在windows下的监测

    一些老旧的系统部署在了windwos服务器上,而且总是容易挂,新机器申请不到,只能.. %tomcat%bin下有service.bat的tomcat版本 service.bat install se ...

  7. redis、mongodb、memcache安装好后设置开机自启动

    vim /etc/rc.d/rc.local /usr/local/mongodb/bin/mongod --smallfiles /usr/local/bin/redis-server/usr/lo ...

  8. Object.getOwnPropertyDescriptors()

    Object.getOwnPropertyDescriptors() 前面说过,Object.getOwnPropertyDescriptor方法会返回某个对象属性的描述对象(descriptor). ...

  9. Tensorflow 将训练模型保存为pd文件

    前言 保存 模型有2种方法. 方法 1.使用TensorFlow模型保存函数 save = tf.train.Saver() ...... saver.save(sess,"checkpoi ...

  10. 虚拟机安装安全狗apache服务的一些问题解决方式(11.5)

    首先本文鸣谢bonga的解答大部分问题=.= 由于本人比较懒所以还是喜欢问,不喜欢查啦 1.windows网站安全狗分为:IIS  和  APACHE  版本    我下载的是APACHE版本 (因为 ...