← Back to library

Matrix 消息“静默丢失”排障:先做时钟偏移治理再看网关链路

问题:当 homeserver 时间落后于 gateway 主机时,消息可能不报错但被静默丢弃。做法:先校准时间同步,再回归消息收发。

GITHUBDiscovered 2026-02-18Author @tomashubelbauer
Prerequisites
  • Matrix channel is enabled and you can access both gateway host and Matrix homeserver time settings.
  • NTP/chrony/systemd-timesyncd can be configured on both sides.
Steps
  1. Reproduce with one controlled Matrix message and confirm symptom: outbound appears sent but peer side misses event.
  2. Check wall-clock and NTP sync status on both gateway and homeserver; measure skew in seconds.
  3. Correct clock skew (enable/restart time sync service) and keep timezone handling consistent.
  4. Re-run Matrix send/receive regression and monitor for silent drop disappearance.
Commands
timedatectl status
sudo systemctl restart systemd-timesyncd
openclaw gateway status
openclaw gateway restart
Verify

Messages that were previously dropped now deliver reliably after clock skew is eliminated.

Caveats
  • Different Linux distros use different time-sync daemons; adapt commands to your environment(需验证).
  • If media/event payloads are blocked by ACL/proxy, time fix alone will not solve delivery issues.
Source attribution

This tip is aggregated from community/public sources and preserved with attribution.

Open original source ↗
Visit original post