# Discourse\_docker: discourse-setup incorrectly relies on "addr:" in ipconfig output

**URL:** https://meta.discourse.org/t/discourse-docker-discourse-setup-incorrectly-relies-on-addr-in-ipconfig-output/73389
**Category:** Support
**Created:** [11월 3, 2017, 9:02오후 UTC](https://meta.discourse.org/t/discourse-docker-discourse-setup-incorrectly-relies-on-addr-in-ipconfig-output/73389 "2017-11-03T21:02:27Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![tomreyn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tomreyn/32/120428_2.png) [@tomreyn](https://meta.discourse.org/u/tomreyn)
#### Post date: [11월 3, 2017, 9:02오후 UTC](https://meta.discourse.org/t/discourse-docker-discourse-setup-incorrectly-relies-on-addr-in-ipconfig-output/73389/1 "2017-11-03T21:02:27Z")

</div>

I previously posted this on the GitHub issue tracker which has now been removed (including my post), so I’m posting it here again.

On a Debian GNU/Linux 9.0 “stretch” VM runing in a KVM environment, the output of the ipconfig command does not return a string containing a pattern such as

` inet addr:123.123.123.123`

but just

` inet 123.123.123.123`

As a result, discourse-setup sets the IP variable to an empty string and the installation fails with

` mydomain.net does not appear to resolve to .`

A better approach would be to use something similar to

`ip -f inet addr show $IFACE | grep -Po 'inet \K[\d.]+' | head -n1`

---

<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: [11월 3, 2017, 9:07오후 UTC](https://meta.discourse.org/t/discourse-docker-discourse-setup-incorrectly-relies-on-addr-in-ipconfig-output/73389/2 "2017-11-03T21:07:04Z")

</div>

Have you done a git pull recently? That code has changed and now uses `curl` and `nc` to attempt to see that the domain name hits the current server and the port is open.

Please let me know if it works for you.

---

<div class="post-metadata">

### Author: ![tomreyn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tomreyn/32/120428_2.png) [@tomreyn](https://meta.discourse.org/u/tomreyn)
#### Post date: [11월 3, 2017, 9:51오후 UTC](https://meta.discourse.org/t/discourse-docker-discourse-setup-incorrectly-relies-on-addr-in-ipconfig-output/73389/3 "2017-11-03T21:51:11Z")

</div>

I had not done a git pull on the docker setup script recently. I am one of those backward people who appreciate versioned releases of software and frown at developers who only support the latest git commit. (I do not know nor claim whether this is the case for the Discourse Docker installer, yet, though it is the first impression I got).

Indeed the installer script looks much better on the latest commit and should work with single server installations. It would not reliably work in a load balancing scenario where HTTP(S) requests to a single IP address may end up on different servers to the backend (LB pool). But I do not know whether this scenario is even supported at this time.

---

<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: [11월 3, 2017, 9:55오후 UTC](https://meta.discourse.org/t/discourse-docker-discourse-setup-incorrectly-relies-on-addr-in-ipconfig-output/73389/4 "2017-11-03T21:55:11Z")

</div>

> [@tomreyn](#):
>
> It would not realiably work in a load balancing scenario where HTTP(S) requests to a single IP address may end up on different servers to the backend (LB pool).

I don’t think that acme would work in that scenario, but in any case, if you’re capable of doing that kind of work, you can probably crank up `vim` and edit the file by hand.

It also won’t work if you use a domain name that resolves only from inside the container.

---

<div class="post-metadata">

### Author: ![tomreyn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tomreyn/32/120428_2.png) [@tomreyn](https://meta.discourse.org/u/tomreyn)
#### Post date: [11월 3, 2017, 9:59오후 UTC](https://meta.discourse.org/t/discourse-docker-discourse-setup-incorrectly-relies-on-addr-in-ipconfig-output/73389/5 "2017-11-03T21:59:57Z")

</div>

I agree with your latest statements.

This said, if moderators here tend to somehow mark topics in the “bug” category ‘solved’ at some point then I suggest to do so for this one.

---

<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: [11월 3, 2017, 10:02오후 UTC](https://meta.discourse.org/t/discourse-docker-discourse-setup-incorrectly-relies-on-addr-in-ipconfig-output/73389/6 "2017-11-03T22:02:14Z")

</div>

Not for the #Contribute > Bug category, but you should be able to mark it as solved now. I can’t since it’s not my question and I’m not an admin/moderator.

---

<div class="post-metadata">

### Author: ![tomreyn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tomreyn/32/120428_2.png) [@tomreyn](https://meta.discourse.org/u/tomreyn)
#### Post date: [11월 3, 2017, 10:17오후 UTC](https://meta.discourse.org/t/discourse-docker-discourse-setup-incorrectly-relies-on-addr-in-ipconfig-output/73389/7 "2017-11-03T22:17:56Z")

</div>

Thanks, Jay, I just did.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [6월 8, 2024, 12:44오후 UTC](https://meta.discourse.org/t/discourse-docker-discourse-setup-incorrectly-relies-on-addr-in-ipconfig-output/73389/8 "2024-06-08T12:44:01Z")

</div>

이 주제는 2408일 후 자동으로 닫혔습니다. 더 이상 새 답글을 작성할 수 없습니다.
