Wildfly 15 - how to configure and execute certbot

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:smart-mrt.co.il

I ran this command:
sudo certbot certonly --manual --preferred-challenges http -d smart-mrt.co.il -d www.smart-mrt.co.il --manual-auth-hook /opt/SSLCertificates/authenticator.sh --non-interactive --manual-public-ip-logging-ok

where opt/SSLCertificates/authenticator.sh

if I have this info:

TARGET_DIR=/opt/wildfly/standalone/deployments/mrt.war/.well-known/acme-challenge
mkdir -p $TARGET_DIR
echo $CERTBOT_VALIDATION > $TARGET_DIR/$CERTBOT_TOKEN

it fail on mrt.war is not a directory and failed to create the related hiden directories

in general I’m following this doc:

It produced this output:
Running manual-auth-hook command: /opt/SSLCertificates/authenticator.sh
manual-auth-hook command “/opt/SSLCertificates/authenticator.sh” returned error code 1
Error output from manual-auth-hook command authenticator.sh:
mkdir: cannot create directory ‘/opt/wildfly/standalone/deployments/mrt.war’: Not a directory
/opt/SSLCertificates/authenticator.sh: line 5: /opt/wildfly/standalone/deployments/mrt.war/.well-known/acme-challenge/TUSVVmbo_aVe-FJpSzMPgeCsYQTM5iGb2hFL8Bjh-ao: Not a directory

Running manual-auth-hook command: /opt/SSLCertificates/authenticator.sh
manual-auth-hook command “/opt/SSLCertificates/authenticator.sh” returned error code 1
Error output from manual-auth-hook command authenticator.sh:
mkdir: cannot create directory ‘/opt/wildfly/standalone/deployments/mrt.war’: Not a directory
/opt/SSLCertificates/authenticator.sh: line 5: /opt/wildfly/standalone/deployments/mrt.war/.well-known/acme-challenge/p715Ov-Wi-YF2qLRGVreTPF-Z-kzpDC9Su3HCW22IYM: Not a directory

Waiting for verification…
Challenge failed for domain smart-mrt.co.il
Challenge failed for domain www.smart-mrt.co.il
http-01 challenge for smart-mrt.co.il
http-01 challenge for www.smart-mrt.co.il
Cleaning up challenges
Some challenges have failed.

IMPORTANT NOTES:

My web server is (include version):wildfly 15.0.0.1

The operating system my web server runs on is (include version):CentOS 7

My hosting provider, if applicable, is: BOX (co.il)

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): certbot 0.35.1

Hi @Danny

please read your output:

Looks like you use a wrong definition.

Thanks for your replay.

Yes I know that, the question was more if someone had the chance using letsencript and what was the proper way for them as for me was not able to make it work this way.

Thanks.

ok, I got the answer from the wildfly team and it looks I just neet o make the war as exploded war.
Thanks.

Starting from WildFly 14, it is possible to obtain and manage certificates from Let’s Encrypt using the WildFly CLI. See the following blog post for details:

https://developer.jboss.org/people/fjuma/blog/2018/08/31/obtaining-certificates-from-lets-encrypt-using-the-wildfly-cli

1 Like