Docker engine with 443 port already occupied

(xiasummer) #1

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

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

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

/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.

0 Likes

(Stephen) #2

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

2 Likes

(xiasummer) #3

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 to BBBB.com (don’t click, only for example)

0 Likes

(Stephen) #4

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

0 Likes

(xiasummer) #5

I think its the letsencrypt of the former website‘'s fault.
I simply deleted the old letsencrypt folder “AAAA.com”, now there only being a folder of “BBBB.com”.
And now the website works fine.
image

0 Likes

(Stephen) #6

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?

0 Likes

(xiasummer) #7

Now it woks fine

tcp6       0      0 :::443                  :::*                    LISTEN      5677/docker-proxy
1 Like

(Robby O'Connor) #8

docker ps

What is the output of that?

0 Likes

(system) closed #9

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

0 Likes