-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Error with renewing / obtaining SSL Certificates when using 3rd party storage #6721
Comments
Thank you for the report! Can you provide more details? Ideally, we need to be able to reproduce the bug in the most minimal way possible. This allows us to write regression tests to verify the fix is working. If we can't reproduce it, then you'll have to test our changes for us until it's fixed -- and then we can't add test cases, either. I've attached a template below that will help make this easier and faster! This will require some effort on your part -- please understand that we will be dedicating time to fix the bug you are reporting if you can just help us understand it and reproduce it easily. This template will ask for some information you've already provided; that's OK, just fill it out the best you can. 👍 I've also included some helpful tips below the template. Feel free to let me know if you have any questions! Thank you again for your report, we look forward to resolving it! Template
Helpful tips
Example of a tutorial: Create a config file: |
Thank you @mohammed90 1. Environment1a. Operating system and versionI have the problem on Debian Bookworm and In the Official Docker Image caddy:builder Dockerfile: FROM caddy:builder AS builder
RUN xcaddy build \
--with github.com/zhangjiayin/caddy-mysql-storage
FROM caddy:builder-alpine
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
CMD ["caddy", "docker-proxy"]
1b. Caddy version (run
|
Please share the full config |
|
Sounds like the storage module is returning the key instead of the value or something like that. Might be an issue to take upstream. |
I did here, just for reference: zhangjiayin/caddy-mysql-storage#3 I'm not really familiar with go, so not sure if i'm getting this right, but looking at the storage implementation there doesn't seem to be anything weird with that. In the community post with the same issue this also seems to be a problem with a postgres implementation. Also to quote the author of the community post:
But my go understanding is not good enough to verify this. If you can give me some instructions on how to debug this further i'm happy to do so. |
What I generally do is put some print statements in as an easy way to see where values are coming from and what the variables are. Are you up for adding some print statements in various places and compiling and running? (I appreciate that you filled out the help template above; just very busy rn!) |
No worries, i appreciate the help. If you could give me some rough instructions what's of interest in the logs and best practice in how to compile with the changes etc. would be very helpful. |
Hmm, well, I didn't author the mysql storage module, so I'm not super familiar with its code. But in CertMagic you could try putting some logs in this function for example:
|
I'm using https://caddyserver.com/docs/modules/caddy.storage.mysql as storage with caddy v2.8.4 and when renewing or trying to obtain a new certificate because of an previous error i'm getting this error:
There's another bug post in the community with the postgres storage which seems to have the same issue and with more details: https://caddy.community/t/invalid-email-default-json-when-retrieving-cert-from-lets-encrypt/17451
When deleting the entries for key
acme/acme-v02.api.letsencrypt.org-directory/users/default/default.json
andacme/acme-v02.api.letsencrypt.org-directory/users/default/default.key
in the database everything works fine again. But as they're always created again this is not a longterm solution.Any help is very much appreciated, thank you in advance.
The text was updated successfully, but these errors were encountered: