mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 23:23:32 +01:00
dehydrated with broken pipe in cat... #305
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TB1234 on GitHub (Mar 15, 2018).
Old Version: VERSION="0.4.0" -> working - no problem
Vew Version: VERSION="git-master-after-0.6.1" -> throws this problem
System: ArchLinux x64
I create an renew certificates with dehydrated. For this I call the script with a PHP-Script with call the paramteres. A call looks like this:
In the old version everything works fine. New certificates are created an old ones are renewed.
If this script is called in a cronjob I cot a broken pipe error:
The output of dehydrated which I pipe to a logfile is the folowing:
If I call the script directly on the bash, everything works fine.
I set the PATH and environment SHELL in the crontab. I also tried to run the command above with
/usr/bin/bash -cbut no change in the result.Any ideas? Thank you!
@lukas2511 commented on GitHub (Mar 15, 2018):
Can you run
bash -x dehydrated -cand post the last few lines before it exits?@TB1234 commented on GitHub (Mar 15, 2018):
Of course, here it is:
@lukas2511 commented on GitHub (Mar 15, 2018):
@TB1234 please run it like this:
bash -x /opt/dehydrated/dehydrated -c -o /etc/ssl/reksys -a secp384r1 -d domain.de >> /var/log/dehydrated/dehydrated.log 2>&1@TB1234 commented on GitHub (Mar 15, 2018):
Here it is, but also with an
unkown parameter detect?!@TB1234 commented on GitHub (Mar 15, 2018):
Oh, above there's an error in the call of dehydratet. I fixed that, but the problem is still the same:
@lukas2511 commented on GitHub (Mar 15, 2018):
@TB1234 please just run it exactly like this:
bash -x /opt/dehydrated/dehydrated -c -o /etc/ssl/reksys -a secp384r1 -d domain.deyour output is unusable since you are passing your actual command as parameter, which makes no sense
@TB1234 commented on GitHub (Mar 15, 2018):
Oh sorry, my fault...
@lukas2511 commented on GitHub (Mar 15, 2018):
Hu, that looks really weird...
Can you look for this section in the code (end of
http_requestmethod)......and add some debug code like this...
... and tell me what the result is?
Also the output of
dehydrated --versionwould be helpful.@TB1234 commented on GitHub (Mar 15, 2018):
Here's the version output:
And here's the output including your Debug Code:
@lukas2511 commented on GitHub (Mar 15, 2018):
My best guess is that somehow filedescriptor 4 is open when the script starts and closes on first operation (which would be the check if it's open...)
Could you try placing something like
{ true >&4; } 2>/dev/null || trueright at the beginning of the script (aboveset -e) and see if that changes anything?@TB1234 commented on GitHub (Mar 15, 2018):
I changes the script to this:
But there is noch change if I see that right:
@lukas2511 commented on GitHub (Mar 15, 2018):
Can you try adding...
... above
set -eand see if that changes anything?@TB1234 commented on GitHub (Mar 15, 2018):
IT WORKED! :-D
The Certificate was created sucessfully. I will test it the next days but at the moment that could be the solutions for this strange problem.
@lukas2511 commented on GitHub (Mar 15, 2018):
Merged into master, will be in the next release unless somebody screams that this breaks lots of other stuff ¯\(ツ)/¯