Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better handle Syncthing's certificate renewal #226

Closed
Martchus opened this issue Jan 14, 2024 · 3 comments
Closed

Better handle Syncthing's certificate renewal #226

Martchus opened this issue Jan 14, 2024 · 3 comments

Comments

@Martchus
Copy link
Owner

Syncthing sometimes re-generates its HTTPs certificate:

[INFO]    Loading HTTPS certificate: certificate will soon expire
[INFO]    Creating new HTTPS certificate
[INFO]    TCP listener ([::]:22000) starting

At this point this leads to tons of TLS errors on startup. The TLS error goes away by explicitly re-connecting from the settings. There's room for improvement:

  • Suppress TLS errors in the time frame these log messages occur in Syncthing's log. This will at least help if Syncthing is started via the built-in launcher.
  • Ensure the certificate is re-loaded automatically after running into an error so one doesn't need to re-connect from the settings manually.
Martchus added a commit that referenced this issue Jan 15, 2024
* Reload the certificate when running into TLS errors an it looks like the
  certificate was renewed
* See #226
@Martchus
Copy link
Owner Author

Martchus commented Jan 15, 2024

This should be fixed by 07ff8a5 where I now decided to simply reload the certificate before emitting any errors (so the first point is not necessary). Not sure whether it works because I only tested this in a rather artificial way.

Copy link

stale bot commented Mar 15, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added stale and removed stale labels Mar 15, 2024
@Martchus
Copy link
Owner Author

Martchus commented Mar 15, 2024

I haven't seen the error anymore so I suppose this worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant