Mod_md Cant renew certificates due to internal error

Hi!
I run LetsEncrypt for years using apache md module, but now it is a month since I met a problem I do not understand how to solve.

After apache restart the only thing I get is:

[Sun Oct 27 18:43:15.472216 2024] [md:error] [pid 2421:tid 2422] (20014)Internal error (specific information not available): md[inbox.dv.lv] problem[urn:org:apache:httpd:log:AH10109:] detail[MDMessageCmd /etc/httpd/md_message.sh failed with exit code 64.]

job.json under staging/inbox.dv.lv contains 66 similar entries since September 27:

"when": "Sun, 27 Oct 2024 16:43:15 GMT",
"type": "message-error",
"status": "renewing",
"detail": "MDMessageCmd /etc/httpd/md_message.sh failed with exit code 64."

System: Slackware64 15.0, apache 2.4.63, mod_md 2.4.28

Welcome to the community @Jancs-E

We don't see mod_md failures here very often. And this looks unusual. You might try posting on the github for mod_md

The only guess I have is it relates to your local "mail" setup. The md_message.sh is very simple (see Sample: mod_md/scripts/md_message.sh at master · icing/mod_md · GitHub)

It is invoked to format a message. The partial SAMPLE is below. Could this problem be related to changes to your local mail package?

# Edit the USER you want to notify. Comment the "msg=" lines where 
# you do not want to receive notifications for.
domain="$2"
USER="webmaster@$domain"

... (formatting)

if test "x$msg" = "x"; then exit 0; fi

mail -s "$subject" "$USER" <<EOF
$msg
EOF

Your last good cert was issued July 28 so any changes after that might just be seen now (or starting Sep 27 like you see as that is when renewal attempts would have started).

4 Likes

Possible format error.
What does the command line look like?

Did you create, alter, or maintain that file?

3 Likes

Hi!
Thank you very much for pointing out to the "mail" - indeed, the cmd format of it changed in summer. I corrected the md_message,sh accordingly and now it seems working again.
The mail cmd before correction was:
mail -s "$subject" -r $USER <<EOF
now it is:
mail -s "$subject" $USER <<EOF

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.