# Apache took port 80 and caused Discourse not to start

**URL:** https://meta.discourse.org/t/apache-took-port-80-and-caused-discourse-not-to-start/82610
**Category:** Self-hosting
**Created:** [3월 9, 2018, 11:58오전 UTC](https://meta.discourse.org/t/apache-took-port-80-and-caused-discourse-not-to-start/82610 "2018-03-09T11:58:21Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![mofosyne](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mofosyne/32/91669_2.png) [@mofosyne](https://meta.discourse.org/u/mofosyne)
#### Post date: [3월 9, 2018, 11:58오전 UTC](https://meta.discourse.org/t/apache-took-port-80-and-caused-discourse-not-to-start/82610/1 "2018-03-09T11:58:21Z")

</div>

I’m still not sure what happened, but basically after updating today, I found my server went down.

| staff\_user | action | subject | created\_at | details | context |
| --- | --- | --- | --- | --- | --- |
| mofosyne | custom\_staff | | 2018-03-08 23:12:34 UTC | “from\_version: b040e11 \n repository: /var/www/discourse” | |
| mofosyne | custom\_staff | | 2018-03-08 08:54:32 UTC | “from\_version: 7570b37 \n repository: /var/www/discourse/plugins/docker\_manager” | |
| mofosyne | grant\_admin | xxxx | 2018-02-03 11:00:08 UTC | | |
| mofosyne | change\_trust\_level | xxxx | 2018-02-03 10:48:57 UTC | “old trust level: 1 \n new trust level: 4” | |
| mofosyne | change\_site\_setting | force\_https | 2018-01-22 11:08:38 UTC | | |
| mofosyne | custom\_staff | | 2018-01-20 05:16:21 UTC | “from\_version: 727a451 \n repository: /var/www/discourse” | |
| mofosyne. | custom\_staff | | 2018-01-20 05:08:42 UTC | “from\_version: 59ed646 \n repository: /var/www/discourse/plugins/docker\_manager” | |
| … etc … | | | | | |

* * *

When I did `./launcher stop app` and `./launcher start app` it gave this error

```plaintext
root@DesigningOpenDemocracy:/var/discourse# ./launcher start app

starting up existing container
+ /usr/bin/docker start app
Error response from daemon: driver failed programming external connectivity on endpoint app (e99d36a67d2dd83c7f9dd0e0c60452e183306fc03c864c509d905161f8a5ba24): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
Error: failed to start containers: app

```

Solution is to shutdown `apache2` then run `./launcher start app`. This is weird as this server is only hosting this single website. Not sure why `apache2` is getting in the way.

```plaintext

root@DesigningOpenDemocracy:~# lsof -n -i
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
systemd-n 429 systemd-network 13u IPv4 14595 0t0 UDP 45.76.126.24:bootpc 
systemd-r 513 systemd-resolve 11u IPv4 16035 0t0 UDP *:hostmon 
systemd-r 513 systemd-resolve 12u IPv4 16036 0t0 TCP *:hostmon (LISTEN)
systemd-r 513 systemd-resolve 13u IPv6 16038 0t0 UDP *:hostmon 
systemd-r 513 systemd-resolve 14u IPv6 16039 0t0 TCP *:hostmon (LISTEN)
systemd-r 513 systemd-resolve 17u IPv4 16042 0t0 UDP 127.0.0.53:domain 
sshd 758 root 3u IPv4 17570 0t0 TCP *:ssh (LISTEN)
sshd 758 root 4u IPv6 17578 0t0 TCP *:ssh (LISTEN)
apache2 787 root 4u IPv6 17624 0t0 TCP *:http (LISTEN)
apache2 788 www-data 4u IPv6 17624 0t0 TCP *:http (LISTEN)
apache2 789 www-data 4u IPv6 17624 0t0 TCP *:http (LISTEN)
sshd 1042 root 3u IPv4 18435 0t0 TCP 45.76.126.24:ssh->118.127.104.26:60332 (ESTABLISHED)
root@DesigningOpenDemocracy:~# cd /var/discourse/
root@DesigningOpenDemocracy:/var/discourse# ./launcher start app

starting up existing container
+ /usr/bin/docker start app
Error response from daemon: driver failed programming external connectivity on endpoint app (e99d36a67d2dd83c7f9dd0e0c60452e183306fc03c864c509d905161f8a5ba24): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
Error: failed to start containers: app
root@DesigningOpenDemocracy:/var/discourse# sudo ./launcher start app

starting up existing container
+ /usr/bin/docker start app
Error response from daemon: driver failed programming external connectivity on endpoint app (c9e149a0b9d61fb37b39131f1cc3dda51607b74a39a634c3a2c89cb9e95e998c): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
Error: failed to start containers: app
root@DesigningOpenDemocracy:/var/discourse# 
root@DesigningOpenDemocracy:/var/discourse# 
root@DesigningOpenDemocracy:/var/discourse# 
root@DesigningOpenDemocracy:/var/discourse# 
root@DesigningOpenDemocracy:/var/discourse# 
root@DesigningOpenDemocracy:/var/discourse# /etc/init.d/apache2 stop
[ok] Stopping apache2 (via systemctl): apache2.service.
root@DesigningOpenDemocracy:/var/discourse# lsof -n -i
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
systemd-n 429 systemd-network 13u IPv4 14595 0t0 UDP 45.76.126.24:bootpc 
systemd-r 513 systemd-resolve 11u IPv4 16035 0t0 UDP *:hostmon 
systemd-r 513 systemd-resolve 12u IPv4 16036 0t0 TCP *:hostmon (LISTEN)
systemd-r 513 systemd-resolve 13u IPv6 16038 0t0 UDP *:hostmon 
systemd-r 513 systemd-resolve 14u IPv6 16039 0t0 TCP *:hostmon (LISTEN)
systemd-r 513 systemd-resolve 17u IPv4 16042 0t0 UDP 127.0.0.53:domain 
sshd 758 root 3u IPv4 17570 0t0 TCP *:ssh (LISTEN)
sshd 758 root 4u IPv6 17578 0t0 TCP *:ssh (LISTEN)
sshd 1042 root 3u IPv4 18435 0t0 TCP 45.76.126.24:ssh->118.127.104.26:60332 (ESTABLISHED)
root@DesigningOpenDemocracy:/var/discourse# ./launcher start app

starting up existing container
+ /usr/bin/docker start app
app
root@DesigningOpenDemocracy:/var/discourse# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a1695959c956 local_discourse/app "/sbin/boot" 24 minutes ago Up 10 seconds 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp app

```

This may just be some server weirdness, but it would be good to hear if anyone else had the same issue today.

---

<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: [3월 9, 2018, 12:32오후 UTC](https://meta.discourse.org/t/apache-took-port-80-and-caused-discourse-not-to-start/82610/2 "2018-03-09T12:32:54Z")

</div>

From the error messages you posted, it looks like something on your server (Apache) ganked port 80, nothing weird here.

---

<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: [3월 9, 2018, 8:57오후 UTC](https://meta.discourse.org/t/apache-took-port-80-and-caused-discourse-not-to-start/82610/3 "2018-03-09T20:57:59Z")

</div>

> [@mofosyne](#):
>
> , but it would be good to hear if anyone else had the same issue today.

Not likely.

You should remove or disable Apache. Something like

```
apt purge apache2

```

---

<div class="post-metadata">

### Author: ![Vaping\_Community](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vaping_community/32/89248_2.png) [@Vaping\_Community](https://meta.discourse.org/u/Vaping_Community)
#### Post date: [3월 9, 2018, 9:48오후 UTC](https://meta.discourse.org/t/apache-took-port-80-and-caused-discourse-not-to-start/82610/4 "2018-03-09T21:48:07Z")

</div>

> [@mofosyne](#):
>
> Solution is to shutdown apache2 then run ./launcher start app. This is weird as this server is only hosting this single website. Not sure why apache2 is getting in the way.

Apache runs on Port 80 so does your Discourse install, they conflict.

---

<div class="post-metadata">

### Author: ![mofosyne](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mofosyne/32/91669_2.png) [@mofosyne](https://meta.discourse.org/u/mofosyne)
#### Post date: [3월 11, 2018, 1:10오후 UTC](https://meta.discourse.org/t/apache-took-port-80-and-caused-discourse-not-to-start/82610/5 "2018-03-11T13:10:24Z")

</div>

That sounds about right. I must have accidentally installed Apache while I was trying to work out how to follow the install instructions. Ah well, at least this post would give people some idea how to deal with similar issues in the future.

---

<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:37오후 UTC](https://meta.discourse.org/t/apache-took-port-80-and-caused-discourse-not-to-start/82610/6 "2024-06-08T12:37:48Z")

</div>

이 주제는 2283일 후 자동으로 닫혔습니다. 새로운 답변은 더 이상 허용되지 않습니다.
