# 关于INSTALL-cloud.md指示的问题

**URL:** https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314
**Category:** Self-hosting
**Created:** [2016年四月27日 12:28 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314 "2016-04-27T12:28:27Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [2016年四月27日 12:28 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/1 "2016-04-27T12:28:27Z")

</div>

I haven’t tried following the [INSTALL-cloud.md](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md) instructions for a while, and they’ve changed and now there’s this new `./discourse-setup` script. Problem is, it doesn’t work, at least on the base Ubuntu image for DigitalOcean.

1. First, there isn’t execute permission on the `./discourse-setup` script. Easy enough to change but might block some.
2. After answering the prompts, I get the following.

* * *

```
Press ENTER to continue, 'n' to try again, or ^C to exit:
LETSENCRYPT_ACCOUNT_EMAIL change failed.
web.ssl.template.yml enabled
letsencrypt.ssl.template.yml enabled

Unfortunately, there was an error changing containers/app.yml

root@host:/var/discourse#

```

This seems like some type of permissions issue, but not sure.

**Update:** Apparently these is super (like hours) new, so I guess someone had to be first! 🙂

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2016年四月27日 12:59 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/2 "2016-04-27T12:59:19Z")

</div>

Thanks for the report! I’ll see if I can fix those things in the next few hours.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [2016年四月27日 13:03 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/3 "2016-04-27T13:03:34Z")

</div>

And, hmm … FWIW, I manually kicked off the bootstrap process, but it ended up giving me letsencrypt errors. (I haven’t messed with let’s encrypt before, so not sure how to fix it, so I’m just removing it from my app.yml for now and rebuilding.)

The container also isn’t listening on port 80 or 443 …

Never really had these kind of problems before, so not sure what’s going on.

---

<div class="post-metadata">

### Author: ![savef](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/savef/32/115698_2.png) [@savef](https://meta.discourse.org/u/savef)
#### Post date: [2016年四月27日 13:48 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/4 "2016-04-27T13:48:19Z")

</div>

> [@downey](#):
>
> The container also isn’t listening on port 80 or 443 …

I think I’m experiencing this problem too, is there a way to manually fix this till discourse\_docker can be updated?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2016年四月27日 13:57 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/5 "2016-04-27T13:57:09Z")

</div>

> [@savef](#):
>
> I think I’m experiencing this problem too, is there a way to manually fix this till discourse\_docker can be updated?

I didn’t notice any changes that should have broken launcher (in a quick look on my phone), so you should be able to:

```plaintext
cp samples/standalone.yml containers/app.yml

```

And then edit app.yml with your favorite editor and

```
./launcher bootstrap app

```

---

<div class="post-metadata">

### Author: ![savef](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/savef/32/115698_2.png) [@savef](https://meta.discourse.org/u/savef)
#### Post date: [2016年四月27日 14:11 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/6 "2016-04-27T14:11:45Z")

</div>

Thanks for the quick reply, I should’ve provided more information in my last message. I was having this issue with the ports not being bound with my existing `app.yml`, but am continuing to get it after generating a new one (with the `discourse-setup`). I’ve rebuilt several times and rebooted the containers, docker and the server quite a few times and can’t figure out what’s happened.

I should also mention that this started after an _out of memory_ exception during an upgrade (through `/admin/upgrade`). I had to change my SMTP settings anyway so after the exception I just did a `launcher rebuild` and my forum hasn’t been online since. I know the container and nginx are running because inside the container I can do `nc localhost 80` and get a response, whereas on the host I’ll get a _connection refused_.

But it’s as if some changes have been made to `discourse_docker` that have simply broken the app config file’s ability to declare the ports it needs to forward. ☹

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2016年四月27日 14:16 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/7 "2016-04-27T14:16:10Z")

</div>

I can’t imagine what’s up with the port stuff.

Is

```plaintext
expose:
  - "80:80" # http
  - "443:443" # https

```

in your app.yml?

> [@savef](#):
>
> I should also mention that this started after an out of memory exception during an upgrade

If you have a 1GB droplet, do you have swap enabled? How much ram do you have?

And if you had a working Discourse already I’m not sure why you’d have used this code. Do you have your old app.yml still around?

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [2016年四月27日 14:16 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/8 "2016-04-27T14:16:25Z")

</div>

I agree. My app settings look correct AFAICT with regard to ports exposed, and the ports are listening inside the container, but not on the host. Unfortunately I used all the time I allocated for this install already today, so it will be a while before I can investigate further. Maybe someone can repro with a new clean install.

---

<div class="post-metadata">

### Author: ![savef](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/savef/32/115698_2.png) [@savef](https://meta.discourse.org/u/savef)
#### Post date: [2016年四月27日 14:28 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/9 "2016-04-27T14:28:35Z")

</div>

> [@pfaffman](#):
>
> Is [ports] in your app.yml?

Yep, in both (the old working one and the newly generated one). It sounds like @downey is experiencing the same thing so I’m at least glad it’s not just my machine and not my fault.

> If you have a 1GB droplet, do you have swap enabled? How much ram do you have?

Yes, 1GB droplet with 1GB of swap. A long time ago these used to be quite common for us during upgrades, but adding the swap back then fixed it. This is the first time I’ve seen one since.

> And if you had a working Discourse already I’m not sure why you’d have used this code.

Because my working Discourse isn’t working! 😛

And yes I kept my old app.yml. It has quite a few customisations so I’ll be switching back to it once this ports issue is sorted.

The main reason I tried using the script is because I figured my app.yml must’ve been outdated, so I was expecting that after generating a new one I’d be able to see what was different and go from there in terms of fixing mine, but since the newly generated one didn’t work either… 😖

---

<div class="post-metadata">

### Author: ![savef](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/savef/32/115698_2.png) [@savef](https://meta.discourse.org/u/savef)
#### Post date: [2016年四月27日 15:19 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/10 "2016-04-27T15:19:45Z")

</div>

My server is back online, unfortunately I don’t have time at all to look into what’s going on though. I checked out [`HEAD~25`](https://github.com/discourse/discourse_docker/commit/1c9150801f433020cea14a3d4e80bfb032afd294) and rebuilt and it works. Hopefully that’ll narrow down where the problem might be for whoever looks into it.

**Edit** : I decided to take a quick look anyway, my guess is it’s [this bit](https://github.com/discourse/discourse_docker/commit/c2d3ee4a824958d4075774b25ff01f0b4c749fcc#diff-f3e08b5119358a8f58f17a678759f60cL753) which was removed from `launcher`.

---

<div class="post-metadata">

### Author: ![penzoiders](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/penzoiders/32/121828_2.png) [@penzoiders](https://meta.discourse.org/u/penzoiders)
#### Post date: [2016年四月27日 17:12 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/11 "2016-04-27T17:12:00Z")

</div>

I found the problem. and solved.

in discourse-setup shell script at line 281

` sed -i -e "s/^ #LETSENCRYPT_ACCOUNT_EMAIL: your.email@example.com/ LETSENCRYPT_ACCOUNT_EMAIL: $letsencrypt_account_email/w $changelog" $config_file`

you have to replace `your.email@example.com` with `me@example.com` and after that the script works

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [2016年四月27日 17:15 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/12 "2016-04-27T17:15:51Z")

</div>

> [@penzoiders](#):
>
> you have to replace [your.email@example.com](mailto:your.email@example.com) with [me@example.com](mailto:me@example.com) and after that the script works

Likely due to the change @codinghorror made 9 hours ago:  
[https://github.com/discourse/discourse\_docker/commit/650f4c25d4897dc36e0ebf04f46051cdb59c6528](https://github.com/discourse/discourse_docker/commit/650f4c25d4897dc36e0ebf04f46051cdb59c6528)

---

<div class="post-metadata">

### Author: ![penzoiders](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/penzoiders/32/121828_2.png) [@penzoiders](https://meta.discourse.org/u/penzoiders)
#### Post date: [2016年四月27日 17:29 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/13 "2016-04-27T17:29:42Z")

</div>

> [@DeanMarkTaylor](#):
>
> Likely due to the change @codinghorror made 9 hours ago:

yes, sorry, didn’t notice… I’m just a git-goat (pull and run) I should have checked that.. anyway glad it will be fixed. cheers

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2016年四月27日 17:38 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/14 "2016-04-27T17:38:22Z")

</div>

> [@savef](#):
>
> My server is back online, unfortunately I don’t have time at all to look into what’s going on though. I checked out HEAD~25 and rebuilt and it works. Hopefully that’ll narrow down where the problem might be for whoever looks into it.
> 
> Edit: I decided to take a quick look anyway, my guess is it’s this bit which was removed from launcher.

That looks like the problem with launcher to me.

> [@penzoiders](#):
>
> sed -i -e “s/^ #LETSENCRYPT\_ACCOUNT\_EMAIL: [your.email@example.com](mailto:your.email@example.com)/ LETSENCRYPT\_ACCOUNT\_EMAIL: $letsencrypt\_account\_email/w $changelog” $config\_file
> 
> you have to replace [your.email@example.com](mailto:your.email@example.com) with [me@example.com](mailto:me@example.com) and after that the script works

I’ve fixed the `sed` replacement so that it’s not so finicky about those addresses in a soon-to-be submitted PR. This seems to fix the config\_file edits, but it looks to me that the `launcher` problem above is the real culprit.

I’ll submit a PR that fixes `launcher` in a few minutes.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [2016年四月27日 18:05 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/15 "2016-04-27T18:05:03Z")

</div>

The ports not being published problem has been fixed. See [https://meta.discourse.org/t/upgraded-docker-site-brokedown/43328/8?u=tgxworld](https://meta.discourse.org/t/upgraded-docker-site-brokedown/43328/8)

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [2016年四月27日 19:20 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/16 "2016-04-27T19:20:06Z")

</div>

> [@tgxworld](#):
>
> The ports not being published problem has been fixed

I went through the directions again (doing my app.yml manually for now) with a fresh/clean install starting from nothing, but the ports still weren’t active. I’m trying to the workaround (commenting out the line in `launcher`) in the other post, though, and that worked… but Lets Encrypt is still causing errors so the site isn’t functional.

---

<div class="post-metadata">

### Author: ![pztrick](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pztrick/32/120845_2.png) [@pztrick](https://meta.discourse.org/u/pztrick)
#### Post date: [2016年四月27日 19:41 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/17 "2016-04-27T19:41:58Z")

</div>

@downey After pulling latest changes for port expose, port 80 worked but not SSL.

Then, for SSL, I also had to follow advice in another thread and delete the /var/discourse/shared/standalone/ssl and /var/discourse/shared/standalone/letsencrypt folders. Then, SSL worked. Could try that?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2016年四月27日 19:59 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/18 "2016-04-27T19:59:50Z")

</div>

Sorry for the issues, the port problem was 100% my mistake! Thanks for that fix @tgxworld.

We’re trying to make setup a bit easier by prompting people for common values using the `discourse-setup` script. I can confirm the version as of right now works fine, I just built and bootstrapped a site with it.

I am not 100% sure the Let’s Encrypt stuff works, but @pfaffman will be testing it and looking into it today or tomorrow.

---

<div class="post-metadata">

### Author: ![Kevin\_McKinney](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kevin_mckinney/32/54497_2.png) [@Kevin\_McKinney](https://meta.discourse.org/u/Kevin_McKinney)
#### Post date: [2016年四月27日 20:19 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/19 "2016-04-27T20:19:24Z")

</div>

I found I still had to manually edit `app.yml` and then run `sudo ./launcher bootstrap app`. This was because the `discourse-setup` script requires SMTP username and password, and I don’t need to set that (it’s an internal SMTP server at my company). Fortunately I’d gone through the process recently so I knew what to do, but if I hadn’t done so before I might’ve been lost when the `discourse-setup` process said it couldn’t continue. Just posting in case anyone else runs into that.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2016年四月27日 20:26 UTC](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314/20 "2016-04-27T20:26:37Z")

</div>

> [@Kevin\_McKinney](#):
>
> This was because the discourse-setup script requires SMTP username and password, and I don’t need to set that (it’s an internal SMTP server at my company).

I was afraid of that. I’ll figure out a way to deal with that case.

[下一頁](https://meta.discourse.org/t/problems-with-install-cloud-md-directions/43314.md?page=2)
