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

acme_client "got renewal info" (logger does not respect go-log config) #8

Open
Tracked by #10580
lidel opened this issue Nov 6, 2024 · 2 comments
Open
Tracked by #10580
Labels
bug Something isn't working

Comments

@lidel
Copy link
Contributor

lidel commented Nov 6, 2024

We properly set logger in client and in certmagic, but we also use acmez library which seems to have extra one here.

It seems to be produce periodic got renewal info entry in kubo log (info level logger even when go-log level set to error):

1.7308261718038344e+09	info	acme_client	got renewal info	{"names": ["*.peerid.libp2p.direct"], "window_start": 1735390961.3333333, "window_end": 1735563761.3333333, "selected_time": 1735465398, "recheck_after": 1730847771.803828, "explanation_url": ""}
1.730848371749988e+09	info	acme_client	got renewal info	{"names": ["*.peerid.libp2p.direct"], "window_start": 1735390961.3333333, "window_end": 1735563761.3333333, "selected_time": 1735484853, "recheck_after": 1730869971.74998, "explanation_url": ""}

Filling issue to track it down and set to logger we use in other places.

@lidel lidel mentioned this issue Nov 6, 2024
28 tasks
@lidel lidel added the bug Something isn't working label Nov 6, 2024
@lidel
Copy link
Contributor Author

lidel commented Nov 7, 2024

This should be taken care of by replacing defualt logger (above) with our custom go-log one (below):

Logger: certCfg.Logger,

Tested latest code from #4 and it seems to log "got renewal info" with correct logger now:

2024-11-07T00:49:22.468+0100	INFO	autotls.acme_client	acme/ari.go:215	got renewal info	{"names": ["*.peerid.libp2p.direct"], "window_start": "2024-12-09T17:15:20.000Z", "window_end": "2024-12-11T17:15:20.000Z", "selected_time": "2024-12-09T17:51:39.000Z", "recheck_after": "2024-11-07T06:49:22.468+0100", "explanation_url": ""}
2024-11-07T00:49:22.470+0100	INFO	autotls	certmagic@v0.21.4/maintain.go:584	updated ACME renewal information	{"identifiers": ["*.peerid.libp2p.direct"], "cert_hash": "FOO", "ari_unique_id": "BAR", "cert_expiry": "2025-01-09T16:55:50.000Z", "selected_time": "2024-12-11T02:13:01.000Z", "next_update": "2024-11-07T06:49:22.468+0100", "explanation_url": ""}

Let's park this until Kubo 0.32.0-rc2 ships and runs for a while. If the log no longer appears (kubo defaults to ERROR), we will close this once 0.32.0 ships.

If it is still there in rc2, we have some other race condition than the one fixed in f599f48

lidel added a commit to ipfs/kubo that referenced this issue Nov 7, 2024
this should help with debugging
ipshipyard/p2p-forge#8
on boxes with debug log level
(and hide noise from normal users)
@lidel
Copy link
Contributor Author

lidel commented Nov 8, 2024

ipfs/kubo@e18fdf2 helped identify the source of the log:

2024-11-08T00:15:44.453Z	INFO	autotls.default_acme_client_fixme.acme_client	acme/ari.go:215	got renewal info	{"names": ["*.peerid.libp2p.direct"], "window_start": "2024-12-28T13:02:41.333Z", "window_end": "2024-12-30T13:02:41.333Z", "selected_time": "2024-12-30T07:19:41.000Z", "recheck_after": "2024-11-08T06:15:44.453Z", "explanation_url": ""}

So we may need to refactor the way newCertmagicConfig and certCfg.Issuers = []certmagic.Issuer{myACME} interact.

If certmagic.Config.Issuers are not set when certmagic.New is called inside of newCertmagicConfig, then the default Issuer (certmagic.DefaultACME) with default client and default logger seems to be set somewhere inside of certmagic.

Does not look like a blocker, but def. a bug to fix once we tackle bigger problems.

@lidel lidel mentioned this issue Nov 14, 2024
47 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant