# Error in discourse-setup around handling of Lets Encrypt

**URL:** <https://meta.discourse.org/t/error-in-discourse-setup-around-handling-of-lets-encrypt/63354>\
**Category:** Bug\
**Created:** [2017 年 5 月 25 日午後 12:36 UTC](https://meta.discourse.org/t/error-in-discourse-setup-around-handling-of-lets-encrypt/63354 "2017-05-25T12:36:21Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Philip\_Colmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/philip_colmer/32/120245_2.png) [@Philip\_Colmer](https://meta.discourse.org/u/Philip_Colmer)\
**Post date:** [2017 年 5 月 25 日午後 12:36 UTC](https://meta.discourse.org/t/error-in-discourse-setup-around-handling-of-lets-encrypt/63354/1 "2017-05-25T12:36:21Z")

</div>

Running discourse-setup on an AWS instance results in the following error occurring:

```
Checking your domain name . . .
./discourse-setup: line 37: [: too many arguments
-----------------------------------------
blah.example.com does not resolve to 172.30.1.83.
IT IS ALMOST CERTAINLY A BAD IDEA TO TURN ON LET'S ENCRYPT!!
Unless you know why this check failed, DO NOT USE Let's Encrypt.

```

That error is reasonably easy to fix - line 37 is using single [but changing it to [[ and]] fixes the “too many arguments” error but not the resolving problem.

For my host, I’ve CNAMEd [blah.example.com](http://blah.example.com) (not the real server name!) to the underlying ec2 host name rather than the raw IP address. The bash variable RESOLVED\_IP therefore doesn’t get set to just the IP address, it gets set to something like:

[ec2-52-90-11-22.compute-1.amazonaws.com](http://ec2-52-90-11-22.compute-1.amazonaws.com). 123.123.123.123

where the last bit (123.123.123.123) is the actual IP address of the host and what RESOLVED\_IP needs to be set to.

My bash skills aren’t up to fixing that bit, otherwise I would and then submit a pull request but hopefully there is enough information there to help someone fix it.

---

_[View the full topic](https://meta.discourse.org/t/error-in-discourse-setup-around-handling-of-lets-encrypt/63354)._
