设为首页收藏本站language 语言切换
查看: 1604|回复: 16
收起左侧

设置NTP的问题,在那里看同步错误信息?

[复制链接]
发表于 2013-1-2 10:27:08 | 显示全部楼层 |阅读模式
本帖最后由 Activer007 于 2-1-2013 21:45 编辑
我是在一台Windows 2003的服务器上设置了NTP服务,用Windows客户端 连接该服务器 能成功更新时间,
用XP客户端可以,用Windows7客户端也可以
但是在ESXi里面设置好之后 还是无法更新时间,试过好多台都是一样,防火墙配置中已经看到 NTP客户端 出站许可的。 这个应该怎么办呢?
2013-02-01 21:45 更新
多谢大家,现在暂时非完美解决
-----------------------------------------
我用SSH登录到ESXi上 抓包可以看到NTP请求的包能发出去,但是回来的基本没有
然后在Windows服务器上 也抓包,看到有数据包收到,而且相应的数据包也发回去了。
只是有点区别,Windows客户端的NTP请求好像是 v3版本,而ESXi的NTP请求包是v2版本
后来我在Windows服务器上安装了单独的NTP服务(原先是用Windows自带的W32Time)
这下ESXi可以顺利更新时间,有一台不行,正准备重启,
另外这次在Windows服务器上抓包看到的是 v4,奇怪,也就是说ESXi的NTP请求包变成v4版本了
但是这样却出现了一个问题,Windows的客户端更新时间却不行了,不太明白为啥。
发表于 2013-1-2 10:37:43 | 显示全部楼层
ESXi上的NTP,是手动启动还是自动启动?
有时候,需要重启一次ESXi主机的 —— 好像仅仅重启一次ESXi上的NTP也可以。
沙发 2013-1-2 10:37:43 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-1-2 10:39:41 | 显示全部楼层
ESXI NTP也遇到过设置了NTP服务器,一直不生效,后来没办法加入AD,马上同步
板凳 2013-1-2 10:39:41 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-1-2 12:30:46 | 显示全部楼层
你配置了ntp服务器 还要启动ntp服务
地板 2013-1-2 12:30:46 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-1-2 12:37:03 | 显示全部楼层
同步信息估计在 /var/log/message 或者 /var/log/hostd.log 里能看到
5# 2013-1-2 12:37:03 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-1-2 13:54:47 | 显示全部楼层
学习学习!!!
6# 2013-1-2 13:54:47 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-1-2 14:52:56 | 显示全部楼层
我配置NTP server的时候,点选"重启NTP服务以更改应用"
7# 2013-1-2 14:52:56 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-1-2 16:16:48 | 显示全部楼层

重新启动过一台ESXi, 居然发现启动时卡住了,好像停顿在 “初始化 电源信息 ” 吓我一大跳 大过年的
后来强制关机重启又好了
8# 2013-1-2 16:16:48 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-1-2 10:37:00 | 显示全部楼层
本帖最后由 Activer007 于 2-1-2013 16:26 编辑
多谢大家,现在暂时非完美解决
-----------------------------------------
我用SSH登录到ESXi上 抓包可以看到NTP请求的包能发出去,但是回来的基本没有
然后在Windows服务器上 也抓包,看到有数据包收到,而且相应的数据包也发回去了。
只是有点区别,Windows客户端的NTP请求好像是 v3版本,而ESXi的NTP请求包是v2版本
后来我在Windows服务器上安装了单独的NTP服务(原先是用Windows自带的W32Time)
这下ESXi可以顺利更新时间,有一台不行,正准备重启,
另外这次在Windows服务器上抓包看到的是 v4,奇怪,也就是说ESXi的NTP请求包变成v4版本了
但是这样却出现了一个问题,Windows的客户端更新时间却不行了,不太明白为啥。
9# 2013-1-2 10:37:00 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-1-2 16:21:58 | 显示全部楼层

刚才看了一下 又忘记了,好像是/var/log/syslog
不过 我后来还是抓包了
10# 2013-1-2 16:21:58 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-1-2 16:23:17 | 显示全部楼层

我这边业务基本不需要用AD 所以没有搞AD
在网上搜索的时候 也看到有老外提到这个方法
11# 2013-1-2 16:23:17 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-1-2 12:37:00 | 显示全部楼层

嗯  这个我懂得
12# 2013-1-2 12:37:00 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-1-2 16:25:17 | 显示全部楼层
Configure ESX/ESXi NTP and Likewise Clients
Configure ESX/ESXi to synchronize time with the Windows server Active Directory Domain Controller:
    Connect to the ESX/ESXi host or vCenter Server using the vSphere Client.
    Select the ESX/ESXi host in the inventory.
    Click the Configuration tab.
    Under the Software heading, click Time Configuration.
    Click Properties.
    Ensure that the NTP Client Enabled option is selected.
    Click Options.
    Click NTP Settings.
    Click Add and specify the fully qualified domain name or IP address of the Windows server Domain Controller(s).
    Click OK.
    Click OK to save the changes.
Additional configuration must be done from the command line.
    Open a console to the ESX or ESXi host. For more information, see Connecting to an ESX host using a SSH client (1019852) or Using Tech Support Mode in ESXi 4.1 and ESXi 5.0 (1017910).
    Open the file /etc/ntp.conf in a text editor. For more information, see Editing configuration files in VMware ESXi and ESX (1017022).
    Add the tos maxdist command on its own line:
    tos maxdist 30
    Save the configuration file.
    Make the file /etc/likewise/lsassd.conf writable using the command:
    chmod +w /etc/likewise/lsassd.conf
    Open the file /etc/likewise/lsassd.conf in a text editor. For more information, see Editing configuration files in VMware ESXi and ESX (1017022).
    Locate the sync-system-time option, uncomment it, and set the value to no:
    sync-system-time = no
    Save the configuration file.
    On ESXi, save the configuration changes to the boot bank so they persist across reboots using the command:
    /sbin/auto-backup.sh
    Restart the ntpd and lsassd service for the configuration change to take effect using the commands:
    service lsassd restart
    service ntpd restart
    Note: To restart the ntpd and lsassd services on an ESXi host use these commands:
    ./etc/init.d/lsassd restart
    ./etc/init.d/ntpd restart
If the ntpd and lsassd services are not restarting, consider restarting the management agents first. For more information about restarting the management agent, see Restarting the Management agents on an ESX or ESXi Server (1003490).
Once the configuration changes are completed, ensure that the time is synchronized between the ESX/ESXi host and the Windows server. For more information, see Troubleshooting NTP on ESX and ESXi (1005092).
http://kb.vmware.com/selfservice ... ;externalId=1035833
13# 2013-1-2 16:25:17 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-1-2 10:39:00 | 显示全部楼层
没遇到过,不过可以/etc/init.d/ntpd status
ntpd is running   
先看下状态,如果正常的话
ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*192.168.1.225     61.153.197.226   3 u  678 1024  377    1.859   -4.276   1.704
会有类似的结果,不行就
/etc/init.d/ntpd restart,指定好同步服务器先
14# 2013-1-2 10:39:00 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-1-2 16:25:28 | 显示全部楼层

暂时没有部署AD,  so this is not work for me , but thx any way
15# 2013-1-2 16:25:28 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-3-7 04:04 , Processed in 0.110392 second(s), 23 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表