# Docker engine with 443 port already occupied

**URL:** https://meta.discourse.org/t/docker-engine-with-443-port-already-occupied/108788
**Category:** Support
**Created:** [10.Февраль.2019 17:49:39 UTC](https://meta.discourse.org/t/docker-engine-with-443-port-already-occupied/108788 "2019-02-10T17:49:39Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![xiasummer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xiasummer/32/82790_2.png) [@xiasummer](https://meta.discourse.org/u/xiasummer)
#### Post date: [10.Февраль.2019 17:49:39 UTC](https://meta.discourse.org/t/docker-engine-with-443-port-already-occupied/108788/1 "2019-02-10T17:49:39Z")

</div>

It seems that my containers running on the docker have problems listening to the 443 port.

```plaintext
root@vultr:/var/discourse# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ed694ee6041b local_discourse/app "/sbin/boot" 14 minutes ago Created app
2c0e953c6a3f discourse/base:2.0.20181031 "/bin/bash -c 'cd ..." 8 hours ago Exited (143) 8 hours ago unruffled_clarke

```

**While it should be**

```plaintext
root@vultr:/var/discourse# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b6c9cde8ee4a local_discourse/app "/sbin/boot" 12 days ago Up 4 days 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp app

```

* * *

I tried to change the domain of the discourse site but seems the web condition is not so good, that caused there being an “app.yml.swap” file and the ssh connectivity stopped.

Then I found a new place with better web condition and tried rebuilding the app discourse.The rebuilding process ends well but it seems that something is already running and occupied the 443 port

```plaintext
/usr/bin/docker: Error response from daemon: driver failed programming external connectivity 
on endpoint app (56426f5559c3daa85c652e960468e83ab887ca4a79376a857da359604a1d233f):              
Error starting userland proxy: listen tcp 0.0.0.0:443: bind: address already in use.

```

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [10.Февраль.2019 18:01:33 UTC](https://meta.discourse.org/t/docker-engine-with-443-port-already-occupied/108788/2 "2019-02-10T18:01:33Z")

</div>

Where is this hosted? Is there another webserver already on the machine?

---

<div class="post-metadata">

### Author: ![xiasummer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xiasummer/32/82790_2.png) [@xiasummer](https://meta.discourse.org/u/xiasummer)
#### Post date: [11.Февраль.2019 14:06:22 UTC](https://meta.discourse.org/t/docker-engine-with-443-port-already-occupied/108788/3 "2019-02-11T14:06:22Z")

</div>

NO. There’s only one docker and only one discourse running on the server.

I only want to change the discourse name form [AAAA.com](http://AAAA.com) to [BBBB.com](http://BBBB.com) （don’t click, only for example）

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [11.Февраль.2019 14:07:59 UTC](https://meta.discourse.org/t/docker-engine-with-443-port-already-occupied/108788/4 "2019-02-11T14:07:59Z")

</div>

Well something is listening on 443, and as you’ve evidenced in your list it’s not docker.

---

<div class="post-metadata">

### Author: ![xiasummer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xiasummer/32/82790_2.png) [@xiasummer](https://meta.discourse.org/u/xiasummer)
#### Post date: [11.Февраль.2019 14:12:09 UTC](https://meta.discourse.org/t/docker-engine-with-443-port-already-occupied/108788/5 "2019-02-11T14:12:09Z")

</div>

I think its the letsencrypt of the former website‘'s fault.  
I simply deleted the old letsencrypt folder “[AAAA.com](http://AAAA.com)”, now there only being a folder of “[BBBB.com](http://BBBB.com)”.  
And now the website works fine.

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/9/291e42acdc51124a5ce0b92c7268052b1625d780.png)

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [11.Февраль.2019 14:14:34 UTC](https://meta.discourse.org/t/docker-engine-with-443-port-already-occupied/108788/6 "2019-02-11T14:14:34Z")

</div>

If there’s a website on the machine in addition to a discourse install you can’t free up 443 just by renaming the site. Your server can only have one application listening under that port.

If you `netstat -tulpn | grep 443` what’s the output?

---

<div class="post-metadata">

### Author: ![xiasummer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xiasummer/32/82790_2.png) [@xiasummer](https://meta.discourse.org/u/xiasummer)
#### Post date: [11.Февраль.2019 14:58:05 UTC](https://meta.discourse.org/t/docker-engine-with-443-port-already-occupied/108788/7 "2019-02-11T14:58:05Z")

</div>

Now it woks fine

```plaintext
tcp6 0 0 :::443 :::* LISTEN 5677/docker-proxy

```

---

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [11.Февраль.2019 19:39:25 UTC](https://meta.discourse.org/t/docker-engine-with-443-port-already-occupied/108788/8 "2019-02-11T19:39:25Z")

</div>

`docker ps`

What is the output of that?

---

<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: [13.Март.2019 19:39:32 UTC](https://meta.discourse.org/t/docker-engine-with-443-port-already-occupied/108788/9 "2019-03-13T19:39:32Z")

</div>

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