aws EC2 服务器的时间比正确时间快3min

今天在测试APP的一个功能的时候,发现API 服务器的时间比正确的时间快了3min。于是就想设置一个同步更新服务器时间的ntp 服务。

进入EC2的控制页面,运行:

```

$ ntpq -p

remoterefidst t when poll reachdelayoffsetjitter

==============================================================================

tick.mdacore.ne .INIT.16 u- 102400.0000.0000.000

static-96-244-9 .INIT.16 u- 102400.0000.0000.000

209.208.79.69.INIT.16 u- 102400.0000.0000.000

propjet.latt.ne .INIT.16 u- 102400.0000.0000.000

```

发现同步服务器一直不通,经过调查,发现是服务器没有开启 UDP 123

开启之后,再次运行上面的命令:

```

$ntpq -p

remoterefidst t when poll reachdelayoffsetjitter

==============================================================================

*nox.prolixium.c 209.51.161.2382 u4464334.06714.0236.109

+zombie.frizzen. 216.45.49.1003 u4164363.22822.2232.438

+mdnworldwide.co 127.67.113.922 u4264343.47619.1842.684

-europa.ellipse. 216.229.0.1792 u3964347.07729.6372.475

```

Over

你可能感兴趣的:(aws EC2 服务器的时间比正确时间快3min)