База знаний/Troubleshooting

TLS handshake fails

Симптомы

agent: x509: certificate signed by unknown authority

Причины

  1. CA не доверяется — агент не знает наш CA bundle
  2. System time skew — cert валиден от X до Y, а часы агента вне диапазона
  3. SNI mismatch — cert выписан на one.example.com, агент стучится по another.example.com

Решения

  1. unimoni-agent --ca-bundle /etc/ssl/unimoni-ca.crt
  2. sudo systemctl restart systemd-timesyncd + проверка timedatectl status
  3. Используйте hostname из cert SAN (openssl s_client -connect host:8443 | openssl x509 -noout -text)