BitsFlowCloud香港VPS时间同步问题排查与解决
问题描述 在使用BitsFlowCloud香港VPS配置Google Authenticator二步验证时,始终提示验证码错误。经过反复测试,确认输入的动态验证码是正确的,但系统始终拒绝认证。 问题排查 1. 初步检查 首先检查了系统时间状态: $ timedatectl Local time: Thu 2025-02-13 15:02:45 CST Universal time: Thu 2025-02-13 07:02:45 UTC RTC time: Thu 2025-02-13 07:02:45 Time zone: Asia/Shanghai (CST, +0800) System clock synchronized: no NTP service: active 发现系统时间比实际时间快了约2分钟,且 System clock synchronized: no 表明NTP同步未成功。 2. 时间同步验证 尝试手动同步NTP: $ ntpdate -q pool.ntp.org Server 162.159.200.123: no server suitable for synchronization found 测试NTP端口连通性: $ nc -uvz pool.ntp.org 123 nc: connect to pool.ntp.org port 123 (udp) failed: Connection timed out UDP 123端口连接超时,确认NTP服务被上游封锁。 ...