Originally created by @basbebe on GitHub (Feb 6, 2018).
Since dehydrated 0.5.0, when I run dehydrated -c -g only the first domain in my domains.txt is being checked / renewed.
The cron job works as expected (run via FreeBSD periodic scripts), but when I run it manually only one domain gets checked.
Originally created by @basbebe on GitHub (Feb 6, 2018).
Since dehydrated 0.5.0, when I run `dehydrated -c -g` only the first domain in my `domains.txt` is being checked / renewed.
The cron job works as expected (run via FreeBSD periodic scripts), but when I run it manually only one domain gets checked.
Can you provide any more information on this? Is there a weird exit code? Are you running dehydrated with bash or zsh? Can you post the output of dehydrated -v please?
@lukas2511 commented on GitHub (Feb 6, 2018):
Can you provide any more information on this? Is there a weird exit code? Are you running dehydrated with bash or zsh? Can you post the output of `dehydrated -v` please?
# Which public key algorithm should be used? Supported: rsa, prime256v1 and secp384r1
KEY_ALGO="secp384r1"
@basbebe commented on GitHub (Feb 6, 2018):
There is no exit code – the execution just ends (note that since I added an alias for the first domain, the first two lines are being executed):
```
~ # ❯❯❯ dehydrated -c -g
# INFO: Using main config file /usr/local/etc/dehydrated/config
Processing www.[XXX].com with alternative names: [XXX].com www.[XXX].de [XXX].de
+ Checking domain name(s) of existing cert... unchanged.
+ Checking expire date of existing cert...
+ Valid till Apr 6 02:48:35 2018 GMT (Longer than 30 days). Skipping renew!
+ OSCP stapling file is still valid (skipping update)
Processing www.[XXX].com with alternative names: [XXX].com www.[XXX].de [XXX].de
+ Using certificate specific config file!
+ KEY_ALGO = secp384r1
+ Checking domain name(s) of existing cert... unchanged.
+ Checking expire date of existing cert...
+ Valid till May 7 13:10:53 2018 GMT (Longer than 30 days). Skipping renew!
+ Updating OCSP stapling file
~ # ❯❯❯
```
This is my main config (note that for some reason the file `registration_info.json` does *not* exist:
```
~ # ❯❯❯ dehydrated -e
# dehydrated configuration
# INFO: Using main config file /usr/local/etc/dehydrated/config
declare -- CA="https://acme-v01.api.letsencrypt.org/directory"
declare -- LICENSE=""
declare -- CERTDIR="/usr/local/etc/dehydrated/certs"
declare -- CHALLENGETYPE="http-01"
declare -- DOMAINS_D=""
declare -- DOMAINS_TXT="/usr/local/etc/dehydrated/domains.txt"
declare -- HOOK="/usr/local/etc/dehydrated/hook.sh"
declare -- HOOK_CHAIN="no"
declare -- RENEW_DAYS="30"
declare -- ACCOUNT_KEY="/usr/local/etc/dehydrated/accounts/aHR0cHM6Ly9hY21lLXYwMS5hcGkubGV0c2VuY3J5cHQub3JnL2RpcmVjdG9yeQo/account_key.pem"
declare -- ACCOUNT_KEY_JSON="/usr/local/etc/dehydrated/accounts/aHR0cHM6Ly9hY21lLXYwMS5hcGkubGV0c2VuY3J5cHQub3JnL2RpcmVjdG9yeQo/registration_info.json"
declare -- KEYSIZE="4096"
declare -- WELLKNOWN="/usr/local/www/dehydrated"
declare -- PRIVATE_KEY_RENEW="yes"
declare -- OPENSSL_CNF="/usr/local/etc/ssl/openssl.cnf"
declare -- CONTACT_EMAIL="hostmaster@[XXX].comcom"
declare -- LOCKFILE="/usr/local/etc/dehydrated/lock"
```
This is my `domains.txt`:
```
www.[XXX].com [XXX].com www.[XXX].de [XXX].de
www.[XXX].com [XXX].com www.[XXX].de [XXX].de > www.[XXX].com.ecdsa
cloud.[XXX].com
cloud.[XXX].com > cloud.[XXX].com.ecdsa
tools.[XXX].com push.[XXX].com adminer.[XXX].com webmail.[XXX].com rspamd.[XXX].com
tools.[XXX].com push.[XXX].com adminer.[XXX].com webmail.[XXX].com rspamd.[XXX].com > tools.[XXX].com.ecdsa
mail.[XXX].com
mail.[XXX].com > mail.[XXX].com.ecdsa
```
and this is my `www.[XXX].com.ecdsa/config`:
```
# Which public key algorithm should be used? Supported: rsa, prime256v1 and secp384r1
KEY_ALGO="secp384r1"
```
And please run bash -x dehydrated -c -g and paste the last few dozen lines, that would show where it stops.
@lukas2511 commented on GitHub (Feb 6, 2018):
And please run `bash -x dehydrated -c -g` and paste the last few dozen lines, that would show where it stops.
IP_VERSION is only for communication with the CA not the other way around, so it doesn't make sense on a per-certificate basis.
registration_info.json is only created in more recent versions of dehydrated, if you have a very old account key that file just was never generated
Unfortunately I kinda posted you the directions in the wrong order so now I see only the trace of a fully working run. Could you try removing ocsp.der for one of your certificates and run the debug command again? I'm guessing it fails on the openssl command... which openssl version are you using?
@lukas2511 commented on GitHub (Feb 6, 2018):
`IP_VERSION` is only for communication with the CA not the other way around, so it doesn't make sense on a per-certificate basis.
`registration_info.json` is only created in more recent versions of dehydrated, if you have a very old account key that file just was never generated
Unfortunately I kinda posted you the directions in the wrong order so now I see only the trace of a fully working run. Could you try removing `ocsp.der` for one of your certificates and run the debug command again? I'm guessing it fails on the openssl command... which openssl version are you using?
Meh... I kinda guessed that would be the problem, the syntax probably is a bit different...
Would you mind going into the script, look for the line containing if grep -qE "^(0|(1\.0))\." <<< "$(${OPENSSL} version | awk '{print $2}')"; then and replace the whole line with a if true; then. It should then use the syntax for the old OpenSSL version, I'm wondering if that might actually do the trick...
@lukas2511 commented on GitHub (Feb 6, 2018):
Meh... I kinda guessed that would be the problem, the syntax probably is a bit different...
Would you mind going into the script, look for the line containing `if grep -qE "^(0|(1\.0))\." <<< "$(${OPENSSL} version | awk '{print $2}')"; then` and replace the whole line with a `if true; then`. It should then use the syntax for the old OpenSSL version, I'm wondering if that might actually do the trick...
Since c0bcf91410 dehydrated will show an error message if fetching of the ocsp stapling file fails. Since enabling this kinda shows that the user needs and may rely on it I'll keep this as a hard failure.
@lukas2511 commented on GitHub (Mar 11, 2018):
Since c0bcf91410a57f292416ac911440c606524f16e6 dehydrated will show an error message if fetching of the ocsp stapling file fails. Since enabling this kinda shows that the user needs and may rely on it I'll keep this as a hard failure.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @basbebe on GitHub (Feb 6, 2018).
Since dehydrated 0.5.0, when I run
dehydrated -c -gonly the first domain in mydomains.txtis being checked / renewed.The cron job works as expected (run via FreeBSD periodic scripts), but when I run it manually only one domain gets checked.
@lukas2511 commented on GitHub (Feb 6, 2018):
Can you provide any more information on this? Is there a weird exit code? Are you running dehydrated with bash or zsh? Can you post the output of
dehydrated -vplease?@basbebe commented on GitHub (Feb 6, 2018):
There is no exit code – the execution just ends (note that since I added an alias for the first domain, the first two lines are being executed):
This is my main config (note that for some reason the file
registration_info.jsondoes not exist:This is my
domains.txt:and this is my
www.[XXX].com.ecdsa/config:@lukas2511 commented on GitHub (Feb 6, 2018):
Mh, can you check if it works when disabling
OCSP_FETCH?@lukas2511 commented on GitHub (Feb 6, 2018):
And please run
bash -x dehydrated -c -gand paste the last few dozen lines, that would show where it stops.@basbebe commented on GitHub (Feb 6, 2018):
yes, it works when disabling
COSP_FETCHAny information on why I don't have the file
registration_info.json?And: Is IP_VERSION on a per-certificate basis planned for future releases?
Thanks!
These are the last few dozen lines:
@lukas2511 commented on GitHub (Feb 6, 2018):
IP_VERSIONis only for communication with the CA not the other way around, so it doesn't make sense on a per-certificate basis.registration_info.jsonis only created in more recent versions of dehydrated, if you have a very old account key that file just was never generatedUnfortunately I kinda posted you the directions in the wrong order so now I see only the trace of a fully working run. Could you try removing
ocsp.derfor one of your certificates and run the debug command again? I'm guessing it fails on the openssl command... which openssl version are you using?@basbebe commented on GitHub (Feb 6, 2018):
It does work in any case with OpenSSL (just checked)
@lukas2511 commented on GitHub (Feb 6, 2018):
Meh... I kinda guessed that would be the problem, the syntax probably is a bit different...
Would you mind going into the script, look for the line containing
if grep -qE "^(0|(1\.0))\." <<< "$(${OPENSSL} version | awk '{print $2}')"; thenand replace the whole line with aif true; then. It should then use the syntax for the old OpenSSL version, I'm wondering if that might actually do the trick...@lukas2511 commented on GitHub (Mar 11, 2018):
Since
c0bcf91410dehydrated will show an error message if fetching of the ocsp stapling file fails. Since enabling this kinda shows that the user needs and may rely on it I'll keep this as a hard failure.