# Cannot connect to IP address and no errors in log

**URL:** https://meta.discourse.org/t/cannot-connect-to-ip-address-and-no-errors-in-log/106464
**Category:** Self-hosting
**Created:** [January 14, 2019, 2:48am UTC](https://meta.discourse.org/t/cannot-connect-to-ip-address-and-no-errors-in-log/106464 "2019-01-14T02:48:19Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Real\_Time](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/real_time/32/132757_2.png) [@Real\_Time](https://meta.discourse.org/u/Real_Time)
#### Post date: [January 14, 2019, 2:48am UTC](https://meta.discourse.org/t/cannot-connect-to-ip-address-and-no-errors-in-log/106464/1 "2019-01-14T02:48:19Z")

</div>

I am not sure how much information to include in this topic, so let me know if information should be added. Here is a summary:

1. I am installing Discourse on a Digital Ocean droplet, using my own ssl keys.
2. The initial install resulted in the IP resolving, but not the domain.
3. When I added the ssl keys and then performed rebuild, neither domain nor IP resolved.
4. The log file had several errors, and I resolved them one by one by looking up the causes in the Discourse forums. There are a couple remaining errors, but the forums said to disregard.

Below is the log file output:

```plaintext
run-parts: executing /etc/runit/1.d/00-ensure-links
run-parts: executing /etc/runit/1.d/00-fix-var-logs
run-parts: executing /etc/runit/1.d/anacron
run-parts: executing /etc/runit/1.d/cleanup-pids
Cleaning stale PID files
run-parts: executing /etc/runit/1.d/copy-env
run-parts: executing /etc/runit/1.d/enable-brotli
Started runsvdir, PID is 41
ok: run: redis: (pid 51) 0s
ok: run: postgres: (pid 55) 0s
rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
rsyslogd: activation of module imklog failed
Server listening on 0.0.0.0 port 22.
Server listening on :: port 22.
2019-01-14T01:05:43.285264+00:00 Discourse-sfo2-01-app rsyslogd: [origin software="rsyslogd" swVersion="8.16.0" x-pid="59" x-info=] start
2019-01-14T01:05:43.280184+00:00 Discourse-sfo2-01-app rsyslogd-2307: warning: ~ action is deprecated, consider using the 'stop' statement instead ]
supervisor pid: 52 unicorn pid: 80

```

This is the port info:

```plaintext
root@Discourse-sfo2-01:~# sudo netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1440/sshd
tcp6 0 0 :::22 :::* LISTEN 1440/sshd

```

The domain is [keepinglookout.com](http://keepinglookout.com), and the ip is 178.128.2.158.

I look forward to any advice anyone has.

---

<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 14, 2019, 3:26am UTC](https://meta.discourse.org/t/cannot-connect-to-ip-address-and-no-errors-in-log/106464/2 "2019-01-14T03:26:33Z")

</div>

It looks like your ports 80 and 443 aren’t forwarding to your docker container.

Can you show us:

- the errors you needed to resolve and the changes you made
- output of `docker ps` on the server?

> [@Real\_Time](#):
>
> When I added the ssl keys and then performed rebuild, neither domain nor IP resolved.

DNS “resolution” is the process of turning a name ([keepinglookout.com](http://keepinglookout.com)) into an IP address (178.128.2.158). That’s the part that’s working:

```plaintext
○ → host keepinglookout.com
keepinglookout.com has address 178.128.2.158

```

I think what you mean is that you can’t connect to the name or IP?

---

<div class="post-metadata">

### Author: ![Real\_Time](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/real_time/32/132757_2.png) [@Real\_Time](https://meta.discourse.org/u/Real_Time)
#### Post date: [January 14, 2019, 4:09am UTC](https://meta.discourse.org/t/cannot-connect-to-ip-address-and-no-errors-in-log/106464/3 "2019-01-14T04:09:30Z")

</div>

Thank you for the quick reply! I believe nearly all the changes that I remember making that had appeared in the log were regarding “rsyslog”. For example, I changed “xconsole” to “console”, and commented out parts of the yml. I can provide you with the yml, but honestly I cannot remember the exact changes. I should have kept a record of that. Another change I made was in regards to the ssl files. The log said I had placed them in the wrong folder, and I believe the change in location fixed that problem.

You are correct that i intended to say that I just cannot connect to the name or IP.

Below is the docker ps:

```plaintext
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8c697843abcf local_discourse/app "/sbin/boot" 3 hours ago Up 3 hours app

```

Thanks again for the quick reply.

---

<div class="post-metadata">

### Author: ![Real\_Time](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/real_time/32/132757_2.png) [@Real\_Time](https://meta.discourse.org/u/Real_Time)
#### Post date: [January 14, 2019, 7:26am UTC](https://meta.discourse.org/t/cannot-connect-to-ip-address-and-no-errors-in-log/106464/4 "2019-01-14T07:26:15Z")

</div>

Also, regarding the following instructions found on this page ( [Allow SSL / HTTPS for your Discourse Docker setup](https://meta.discourse.org/t/advanced-setup-only-allowing-ssl-https-for-your-discourse-docker-setup/13847) ):

### Configure NGINX

Add a reference to the nginx ssl template from your `app.yml` configuration file:

```plaintext
templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/sshd.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ssl.template.yml"

```

### Configure your Docker Container

Tell your container to listen on SSL

```plaintext
expose:
  - "80:80"
  - "2222:22"
  - "443:443"

```

Would I implement the above recommendations in the app.yml (as I understand them to read), or in some other place, such as the “docker container” or nginx ssl template?

---

<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 14, 2019, 11:21am UTC](https://meta.discourse.org/t/cannot-connect-to-ip-address-and-no-errors-in-log/106464/5 "2019-01-14T11:21:11Z")

</div>

Did you have a reason not to use Let’s encrypt as suggested in that topic?

Do you not have ports 443 and 80 in the expose section?

---

<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 14, 2019, 9:14pm UTC](https://meta.discourse.org/t/cannot-connect-to-ip-address-and-no-errors-in-log/106464/6 "2019-01-14T21:14:14Z")

</div>

> [@Real\_Time](#):
>
> Below is the docker ps

You’ve removed the part that tells docker to forward 80 (HTTP) and 443 (HTTPS) to Discourse. You need those in place.

You should follow this guide: [Set up HTTPS support with Let's Encrypt](https://meta.discourse.org/t/setting-up-https-support-with-lets-encrypt/40709)

Yes, that expose command goes into your `app.yml`

---

<div class="post-metadata">

### Author: ![Real\_Time](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/real_time/32/132757_2.png) [@Real\_Time](https://meta.discourse.org/u/Real_Time)
#### Post date: [January 14, 2019, 11:50pm UTC](https://meta.discourse.org/t/cannot-connect-to-ip-address-and-no-errors-in-log/106464/7 "2019-01-14T23:50:15Z")

</div>

I initially tried to use Let’s Encrypt, but after many, many attempts was unsuccessful (many dozen, I am sure). I then decided to attempt adding my own SSL. After dozens of attempts there, I decided to post my forum question. I nearly decided to pay someone to configure for me since I lost so much time in failed attempts. I cannot say it was a total loss, though, because I learned a lot about the process along the way and became VERY familiar with the instructions.

Ultimately, today, I decided to attempt Let’s Encrypt again. I noticed a sentence in the instructions I had never noticed before,

> **Note:** `./discourse-setup` will enable Let’s Encrypt. And as of March 2017, you can run it again, and press return a few times and enter your email address ; the script will include the required templates and insert your email address as required. If you installed Discourse a _long time ago_ , you might still have to edit `app.yml` by hand.

This was what I was missing. I was apparently over-configuring by editing the yml. Today I was successful, though. Hooray!

I’m not sure if the process is too simple or if the “how-to” instruction is not clear enough, but I have spent an embarrassing amount of time troubleshooting this problem.

I really like this forum, though. Everyone is very helpful and the responses from people are fast! I look forward to learning more from you all and playing with the product.

---

<div class="post-metadata">

### Author: ![Real\_Time](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/real_time/32/132757_2.png) [@Real\_Time](https://meta.discourse.org/u/Real_Time)
#### Post date: [January 14, 2019, 11:56pm UTC](https://meta.discourse.org/t/cannot-connect-to-ip-address-and-no-errors-in-log/106464/8 "2019-01-14T23:56:17Z")

</div>

Thank you for the response. I un-commented the corresponding portion of that yml countless times. I even learned yml validation in the process. Oddly, in my case, I was able to resolve my problem without editing the yml today. Like I said in my other comment moments ago, the key sentence in the installation how-to has been staring at me for a week while I made a thousand different errors that brought me back to square one and forced me to re-read the how-to more carefully:

> **Note:** `./discourse-setup` will enable Let’s Encrypt. And as of March 2017, you can run it again, and press return a few times and enter your email address ; the script will include the required templates and insert your email address as required. If you installed Discourse a _long time ago_ , you might still have to edit `app.yml` by hand.
