Letsencrypt.sh/dehydrated: line 80: unexpected argument `(' to conditional binary operato

Hi,

I have problem on this line

letsencrypt.sh/dehydrated: line 80: unexpected argument `(’ to conditional binary operator

And i change argument with add “” in (http-01|dns-01)

from :
[[ “${CHALLENGETYPE}” =~ (http-01|dns-01) ]] || _exiterr “Unknown challenge type ${CHALLENGETYPE}… can not continue.”

to :
[[ “${CHALLENGETYPE}” =~ “(http-01|dns-01)” ]] || _exiterr “Unknown challenge type ${CHALLENGETYPE}… can not continue.”

after that. i run ./letsencrypt.sh --config /etc/pki/config.sh --cron
and i get error

ERROR: Challenge is invalid! (returned: invalid) (result: {
“type”: “http-01”,
“status”: “invalid”,
“error”: {
“type”: “urn:acme:error:unauthorized”,
“detail”: “Invalid response from http://mydomain.com/.well-known/acme-challenge/Usgd6o2T9GnMK5tc5hkmd0JYU4eJGYNLY6HIFOrB1SM: “\u003c!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”\u003e\n\u003chtml\u003e\u003chead\u003e\n\u003ctitle\u003e404 Not Found\u003c/title\u003e\n\u003c/head\u003e\u003cbody\u003e\n\u003ch1\u003eNot Found\u003c/h1\u003e\n\u003cp””,
“status”: 403

Additional information:
cat /proc/version
Linux version 2.6.18-8.el5 (brewbuilder@ls20-bc2-14.build.redhat.com) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1 SMP Fri Jan 26 14:15:21 EST 2007

uname -a
Linux 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686 i686 i386 GNU/Linux

cat /etc/*release
Red Hat Enterprise Linux Server release 5 (Tikanga)

what should i do to fix it?

Thank you in advance

I’d say exactly as you have done - open an issue on the github pages for that client.

1 Like

i has been open case in github, until this time not get respon

Anybody to help me,

It’s not a client I know well enough to fix. You could try one of the other alternate clients - there are a few other Bash ones which should work.

I has been update new script but still error like it

ERROR: Challenge is invalid! (returned: invalid) (result: {
“type”: “http-01”,
“status”: “invalid”,
“error”: {
“type”: “urn:acme:error:unauthorized”,
“detail”: “Invalid response from http://mydomain.com/.well-known/acme-challenge/fwRgqjv5Mccmvp9tgrsL1n4HwUiI20K4VdizOv82nh4: “\u003c!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”\u003e\n\u003chtml\u003e\u003chead\u003e\n\u003ctitle\u003e404 Not Found\u003c/title\u003e\n\u003c/head\u003e\u003cbody\u003e\n\u003ch1\u003eNot Found\u003c/h1\u003e\n\u003cp””,
“status”: 403

Without your domain name it’s difficult to be able to test fully.

The script should upload a text file to mydomain.com/.well-known/acme-challenge/fwRgqjv5Mccmvp9tgrsL1n4HwUiI20K4VdizOv82nh4 (where mydomain.com is your real domain name). That then needs to be reachable from the internet as a pure text file.

From the bit of the response you have there, it would appear that it’s getting a 404 page not found response, rather than the text file. Maybe you have the web root location incorrect ?

I use real domain but soryy i can not share it
i have settting like this

cat /etc/httpd/conf.d/letsencrypt.conf
Alias /.well-known/acme-challenge /www/public_html/new/letsencrypt
<Directory /www/public_html/new/letsencrypt/>

I would like to know what is the root cause for this type of error and how can I resolve this. Thanks

There you have your error. You are not sending the challenge file but some HTML which says the file was not found. You need to fix your web server to serve the challenge file correctly.

hi kayyazka

following on from TCM and serverco not every web server allows you to serve files without extensions.

This could be one of two problems - folder and a MIME Mapping

You can do one of two things

A) Opt for DNS Validation which does not require a file to be uploaded but does require you to be able to add a TXT record to your domains DNS
B) Make Sure the folder is setup correctly in the web root and that the webserver has permissions on the folder.
C) Make Sure that the MIME is set up correctly.
D) If this is all working you should be able to browse to the file location using an internet browser and it should ask you to download a txt file with the correct context.

Without knowing what web server you are running and what operating system you are running it’s hard to provide further input on B and C.

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