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.json unexpected EOF #176

Open
jalbstmeijer opened this issue Mar 1, 2022 · 4 comments
Open

acme.json unexpected EOF #176

jalbstmeijer opened this issue Mar 1, 2022 · 4 comments
Labels
question Further information is requested

Comments

@jalbstmeijer
Copy link

jalbstmeijer commented Mar 1, 2022

Hi,

I sometimes get;

file.go:118: error: v2: dump failed: failed to unmarshal file "/traefik/acme.json": unexpected EOF

when having traefik-certs-dumper 2.8.1 running as;

traefik-certs-dumper file --version v2 --watch --source /traefik/acme.json --dest /data/certs --post-hook "sh /hook/hook.sh

could it be caused by multiple certificates being requested at the same time?

@ldez ldez added the question Further information is requested label Mar 1, 2022
@ldez
Copy link
Owner

ldez commented Mar 1, 2022

could it be caused by multiple certificates being requested at the same time?

The number of requested certificates doesn't influence this.

I think it's maybe because the dump happens when Traefik is writing the file.

@jalbstmeijer
Copy link
Author

Most important, will it retry? or will it just miss that certificate update?

@ldez
Copy link
Owner

ldez commented Mar 1, 2022

it will not retry.

@dwydler
Copy link

dwydler commented Apr 15, 2023

I had today the same error in my log file.

 2023/04/15 19:17:22 file.go:118: error: v2: dump failed: failed to unmarshal file "/data/acme_letsencrypt.json": unexpected EOF
traefik-certs-dumper  | dump
traefik-certs-dumper  | ├──certs
traefik-certs-dumper  | │  ├──privatebin.domain.de.crt
traefik-certs-dumper  | │  ├──traefik.domain.de.crt
traefik-certs-dumper  | └──private
traefik-certs-dumper  |    ├──letsencrypt.key
traefik-certs-dumper  |    ├──privatebin.domain.de.key
traefik-certs-dumper  |    ├──traefik.domain.de.key

After restart the container (docker compose restart traefik-certs-dumper), the dump was successfully.

traefik-certs-dumper  | dump
traefik-certs-dumper  | ├──certs
traefik-certs-dumper  |     ├──authelia..domain.de.crt
traefik-certs-dumper  | │  ├──privatebin.domain.de.crt
traefik-certs-dumper  | │  ├──traefik.domain.de.crt
traefik-certs-dumper  | └──private
traefik-certs-dumper  |    ├──authelia..domain.de.key
traefik-certs-dumper  |    ├──privatebin.domain.de.key
traefik-certs-dumper  |    ├──traefik.domain.de.key

The hoster of the domain is Hetzner Online GmbH.
In my environment dns challenge is used. As polling interval in the docker-compose.yml from traefik is 5 seconds defined.

After some tests it seems that traefik-certs-dumper sees the change in acme.json too quickly. The private key for the certificate was written to the acme.json, but the public certificate is not written yet.

Is it possible to configure a delay of x seconds when using the parameter --watch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants