Cannot Install due to unknown Error

Hi there,

I have received the following error message when installing LetsEncrypt:

[root@server scripts]# ./letsencrypt.sh request server.vindjouwtrainer.nl 4096
Setting up certificate for a hostname: server.vindjouwtrainer.nl
Getting challenge for server.vindjouwtrainer.nl from acme-server…
./letsencrypt.sh: line 318: /var/www/html/.well-known/acme-challenge/: Is a directory
./letsencrypt.sh: line 321: [: -ne: unary operator expected
Waiting for domain verification…
rm: cannot remove ‘/var/www/html/.well-known/acme-challenge/’: Is a directory
Challenge is . Details: . Exiting…

Can someone please help me?

Are you sure you’re using the client you think you are? The official client is certbot (though it was formerly called “letsencrypt” or “py-letsencrypt”), but you seem to be using letsencrypt.sh, which is a third party client.

I’ve never used letsencrypt.sh, it may be perfectly good, but you’re probably not going to get many people here with experience using it. Maybe you can find a solution by going through the client’s usage guide, and failing that, perhaps post an issue at github?

1 Like

It's fairly popular as the bash clients go, but the syntax @VindJouwTrainer is using isn't even remotely correct for letsencrypt.sh. It doesn't look right for acme.sh either. And, of course, it doesn't even begin to resemble the syntax for certbot.

@VindJouwTrainer, where did you get the "letsencrypt.sh" you're using?

1 Like

Ah, I stand corrected. The syntax used didn't resemble what was shown on the letsencrypt.sh site I linked above, but I didn't feel confident in commenting on that. I have zero experience with that client.

1 Like

The format of the JSON from the ACME servers changed slightly in the last week, I’m not sure if letsencrypt.sh has been updated to deal with that, which may be causing the issue. You’ll certainly need the latest version of it though. The other two main bash scripts had a similar issue and the latest versions work fine.

As @DarkSteve says, it’s probably worth opening an issue on github.

1 Like

Looks you're spot-on, letsencrypt.sh updated 3 days ago to fix "a json-parsing bug which made letsencrypt.sh incompatible with up-to-date ACME servers".

You're just too good, serverco :slight_smile: I didn't realise the ACME servers updated json recently, I'm not paying enough attention!

1 Like

I wrote / maintain the getssl bash client - and got a very similar error when the the JSON format changed, so I had a slight advantage in recognising it :wink:

1 Like

@VindJouwTrainer, if you haven’t resolved this yet, update the client (letsencrypt.sh) and try again. This was an issue that was introduced on the ACME server side, but the developer recognised the issue and has since fixed it.

Good luck!

1 Like

Oh! You cheated! :stuck_out_tongue_winking_eye:

2 Likes

@serverco @DarkSteve Thanks guys! Let me give it a try :slight_smile:

@DarkSteve Hi Steve, I have tried to update the client several times with the link you provided but the documentation doesn’t work. Any tips how to proceed? :slight_smile:

You can either use git to obtain a copy or just

wget https://raw.githubusercontent.com/lukas2511/letsencrypt.sh/master/letsencrypt.sh

should get you a copy of the latest version.

You may need to set the file permissions ( chmod 700 ./letsencrypt.sh ) and then you can run

./letsencrypt.sh -h

to get help and work from there.

1 Like

@serverco Thank you Andy! This time it worked :smile:

1 Like

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