# Discourse-setup: assumes nc is installed

**URL:** https://meta.discourse.org/t/discourse-setup-assumes-nc-is-installed/106549
**Category:** Bug
**Created:** [January 15, 2019, 3:10am UTC](https://meta.discourse.org/t/discourse-setup-assumes-nc-is-installed/106549 "2019-01-15T03:10:28Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [January 15, 2019, 3:10am UTC](https://meta.discourse.org/t/discourse-setup-assumes-nc-is-installed/106549/1 "2019-01-15T03:10:28Z")

</div>

Ran through the install using `discourse-setup` (I don’t think I ever have yet, so no time like the present!) and the following error showed up:

```plaintext
Checking your domain name . . .
WARNING:: This server does not appear to be accessible at dotest.example.net:443.

A connection to http://dotest.example.net (port 80) also fails.

This suggests that dotest.example.net resolves to the wrong IP address
or that traffic is not being routed to your server.

Google: "open ports YOUR CLOUD SERVICE" for information for resolving this problem.

You should probably answer "n" at the next prompt and disable Let's Encrypt.

This test might not work for all situations,
so if you can access Discourse at http://dotest.example.net, you might try anyway.

```

I believe this happened as `nc` isn’t installed so it couldn’t properly run the test. We should ensure `nc` is available before erroring out on this check.

---

<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: [January 15, 2019, 3:51am UTC](https://meta.discourse.org/t/discourse-setup-assumes-nc-is-installed/106549/2 "2019-01-15T03:51:26Z")

</div>

I totally believe that I assumed that `nc` was installed and that on some OSs it’s not.

The messages do suggest that it could be wrong. Did Let’s Encrypt work?

What OS is this? What cloud service?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [January 15, 2019, 4:24am UTC](https://meta.discourse.org/t/discourse-setup-assumes-nc-is-installed/106549/3 "2019-01-15T04:24:34Z")

</div>

Fresh debian-9 on DO.

Everything else worked A-OK and it’s up and running great! 👍

---

<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: [January 15, 2019, 6:50pm UTC](https://meta.discourse.org/t/discourse-setup-assumes-nc-is-installed/106549/4 "2019-01-15T18:50:02Z")

</div>

Hmm. Then the question becomes, does `discourse-doctor` install `nc` just for one test that might not be necessary, or just say, “well, you don’t have `nc`, so you’re on your own to see that you have ports open and mapped correctly.”?

I don’t like installing software if it’s not necessary. I think I’ll change the message to recommend installing `nc` if they want it.

@codinghorror? @mpalmer want to weigh in?

---

<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: [January 15, 2019, 8:32pm UTC](https://meta.discourse.org/t/discourse-setup-assumes-nc-is-installed/106549/5 "2019-01-15T20:32:56Z")

</div>

Wasn’t this addressed in a different way by @supermathie?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [January 15, 2019, 8:34pm UTC](https://meta.discourse.org/t/discourse-setup-assumes-nc-is-installed/106549/6 "2019-01-15T20:34:45Z")

</div>

> [@pfaffman](#):
>
> well, you don’t have `nc` , so you’re on your own to see that you have ports open and mapped correctly.

I’m all for this 👍

> [@codinghorror](#):
>
> Wasn’t this addressed in a different way

I addressed the problem where Discourse’s email test rake task didn’t properly pick up the STARTTLS option. This is separate.

---

<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: [January 15, 2019, 8:36pm UTC](https://meta.discourse.org/t/discourse-setup-assumes-nc-is-installed/106549/7 "2019-01-15T20:36:01Z")

</div>

In that case either stop the script and tell them to re-run with nc installed, or print a warning that the check was skipped because nc was not installed?

---

<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: [January 16, 2019, 2:51am UTC](https://meta.discourse.org/t/discourse-setup-assumes-nc-is-installed/106549/8 "2019-01-16T02:51:56Z")

</div>

I was going to let the script continue with the warning, adding the bit about `nc`. As it is, it does work, it just suggests that it probably won’t.

---

<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: [July 22, 2019, 10:56am UTC](https://meta.discourse.org/t/discourse-setup-assumes-nc-is-installed/106549/9 "2019-07-22T10:56:04Z")

</div>

Can we close this as good @pfaffman?

---

<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: [July 22, 2019, 5:46pm UTC](https://meta.discourse.org/t/discourse-setup-assumes-nc-is-installed/106549/10 "2019-07-22T17:46:19Z")

</div>

Well, it’s 6 months later. I haven’t added a “you don’t have `nc`, so I can’t test your ports” message, but no one else has complained. Perhaps the language:

```plaintext
     Google: \"open ports YOUR CLOUD SERVICE\" for information for resolving this problem.
    
     You should probably answer \"n\" at the next prompt and disable Let's Encrypt.
    
     This test might not work for all situations,
     so if you can access Discourse at http://$HOST, you might try anyway.

```

is good enough. It was never a 🐛 but really an annoyance for someone who had enough sysadmin sense to not want to use Ubuntu. It works as expected on Ubuntu (I haven’t checked other distros to see). I’m inclined to let this sleeping dog lie.

---

<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: [July 22, 2019, 11:56pm UTC](https://meta.discourse.org/t/discourse-setup-assumes-nc-is-installed/106549/11 "2019-07-22T23:56:28Z")

</div>


