# Can't connect to discourse install

**URL:** https://meta.discourse.org/t/cant-connect-to-discourse-install/266848
**Category:** Self-hosting
**Created:** [June 1, 2023, 5:22am UTC](https://meta.discourse.org/t/cant-connect-to-discourse-install/266848 "2023-06-01T05:22:51Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Daggy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daggy/32/309276_2.png) [@Daggy](https://meta.discourse.org/u/Daggy)
#### Post date: [June 1, 2023, 5:22am UTC](https://meta.discourse.org/t/cant-connect-to-discourse-install/266848/1 "2023-06-01T05:22:51Z")

</div>

Trying to fresh install discourse on bare metal OVH server running Fedora Server 38 and installation went fine but I cannot connect to it using the hostname I specified in the app.yml `forums.dogsrv.dev`.  
OVH edge firewall is disabled, firewalld is disabled, iptables is disabled, DNS resolves fine, I’m lost at what else to check at this point, any ideas would be appreciated.

---

<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: [June 2, 2023, 7:11am UTC](https://meta.discourse.org/t/cant-connect-to-discourse-install/266848/2 "2023-06-02T07:11:42Z")

</div>

You can look at /var/discourse/shared/standalone/log/var-log/nginx/production.log. My guess is that you got rate limited by let’s encrypt because dns or something else kept a certificate from being issued.

If that’s the case you can wait a week or use a different subdomain (like forum instead of forums).

Did you run discourse-setup?

---

<div class="post-metadata">

### Author: ![Daggy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daggy/32/309276_2.png) [@Daggy](https://meta.discourse.org/u/Daggy)
#### Post date: [June 2, 2023, 8:52am UTC](https://meta.discourse.org/t/cant-connect-to-discourse-install/266848/3 "2023-06-02T08:52:06Z")

</div>

Oddly enough I don’t have a production.log in that folder, however I do have an error.log which contains nothing but this error over and over

```plaintext
2023/06/02 07:27:34 [emerg] 289163#289163: cannot load certificate "/shared/ssl/forums.dogsrv.dev.cer": PEM_read_bio_X509_AUX() failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)

```

and indeed when I looked at that cert file it was empty.

I did run discourse-setup initially but it would always error out with

```plaintext
Hostname for your Discourse? [forums.dogsrv.dev]:

Checking your domain name . . .
WARNING: Port 443 of computer does not appear to be accessible using hostname: forums.dogsrv.dev.
WARNING: Connection to http://forums.dogsrv.dev (port 80) also fails.

```

Which I assumed was due to the .dev TLD being on Google’s HSTS preload list by default so I just configured the app.yml manually and ran ./launcher rebuild app which seemed to work fine.

I’ve tried switching the subdomain over to forum instead and rebuilt the app but still having the same issue and getting the same error as before except with forum instead of forums.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [June 2, 2023, 9:00am UTC](https://meta.discourse.org/t/cant-connect-to-discourse-install/266848/4 "2023-06-02T09:00:22Z")

</div>

Have you open ports on your firewall outside Docker?

---

<div class="post-metadata">

### Author: ![Daggy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daggy/32/309276_2.png) [@Daggy](https://meta.discourse.org/u/Daggy)
#### Post date: [June 2, 2023, 9:34am UTC](https://meta.discourse.org/t/cant-connect-to-discourse-install/266848/5 "2023-06-02T09:34:57Z")

</div>

Yep, firewalld is disabled completely along with iptables. If I manually install and configure apache or nginx on the server itself I can see that on both port 80 and 443 traffic is allowed but because of HSTS I need to have HTTPS rewrite enabled on all HTTP requests and a working SSL cert which is the thing that’s being an issue at the moment.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [June 2, 2023, 9:36am UTC](https://meta.discourse.org/t/cant-connect-to-discourse-install/266848/6 "2023-06-02T09:36:32Z")

</div>

Perhaps you should open ports 80 and 443 then?

---

<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: [June 2, 2023, 9:47am UTC](https://meta.discourse.org/t/cant-connect-to-discourse-install/266848/7 "2023-06-02T09:47:16Z")

</div>

It still sounds like something is interfering with incoming traffic. Are you using cloudflare for dns?

---

<div class="post-metadata">

### Author: ![Daggy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daggy/32/309276_2.png) [@Daggy](https://meta.discourse.org/u/Daggy)
#### Post date: [June 2, 2023, 10:12am UTC](https://meta.discourse.org/t/cant-connect-to-discourse-install/266848/8 "2023-06-02T10:12:26Z")

</div>

Nope, using Google.

---

<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: [June 2, 2023, 10:33am UTC](https://meta.discourse.org/t/cant-connect-to-discourse-install/266848/9 "2023-06-02T10:33:40Z")

</div>

If the test that Discourse-setup is doing is failing then you need to find the explanation for that. It’s pretty clear that it’s right and that let’s encrypt can’t assign a certificate.

Since you know to install nginx and apache you can try getting let’s encrypt to issue a certificate, but it’s pretty clear that so it’s blocking 80 and/or 443.

---

<div class="post-metadata">

### Author: ![Daggy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daggy/32/309276_2.png) [@Daggy](https://meta.discourse.org/u/Daggy)
#### Post date: [June 3, 2023, 9:25am UTC](https://meta.discourse.org/t/cant-connect-to-discourse-install/266848/10 "2023-06-03T09:25:52Z")

</div>

Ok so the issue was that discourse-setup is broken when using newer netcat versions as can be seen in this pull request: [https://github.com/discourse/discourse\_docker/pull/697](https://github.com/discourse/discourse_docker/pull/697)  
Removing the -p flag fixes discourse-setup from falsely reporting that it cannot establish a connection on the ports and then it finishes and rebuilds the app successfully and I can now connect to my install flawlessly.  
Thanks for the help.

---

<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: [June 3, 2023, 10:24am UTC](https://meta.discourse.org/t/cant-connect-to-discourse-install/266848/11 "2023-06-03T10:24:04Z")

</div>

Glad you got it working! I’m confused about why the rebuild was failing to get the certificate, as I thought that you’d do the rebuild and skipped the discourse-setup step.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [July 3, 2023, 10:24am UTC](https://meta.discourse.org/t/cant-connect-to-discourse-install/266848/12 "2023-07-03T10:24:28Z")

</div>

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