Hi, just tried to setup Discourse and all went good except for launching it.
It gives the following error:
starting up existing container
+ /usr/bin/docker start app
Error response from daemon: Cannot start container app: Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
FATA[0000] Error: failed to start one or more containers
Which suggests the port is already in use. On the system we run a web (apache, teamspeak and minecraft server.
I am not the best with Linux and Apache, so I was wondering if anyone could help.
Thanks in advance, if you need any more information, let me know.
I am not sure though if I am capable of doing all of that, I am really a beginner with Linux and the stuff there seems quite tricky, especially since it has to be configured with other webservices as well (Or so it seems according to the last part of the guide, suggesting to add other services to the proxy as well.)
I managed to get it running (the container, that is) but I don’t really understand yet what port it runs on and how I can access it. forum.mydomain.com gives me nothing, probably because I haven’t set up DNS yet? and wouldn’t know where else it should be on. :4001 doesn’t work either but tinkering with firewall now.
This error comes up often enough that I think our startup scripts should offer guidance for it. I am getting really sick of reading the “oh no, port 80 is in use” install topics.
I understand. That’d be very useful. I think I set things up correctly now with @riking’s way - if that’s the advice you mean - it’s just that it refuses the connection when I try to connect to mydomain:4001 (All ports in that topic mentioned that so I am figuring that is the point it redirects it to?)
The first post isn’t using port 4001 anymore, but rather a UNIX socket connection to get into the container. It’s supposed to get you to set up a nginx on the host that proxies to either Discourse or your other sites.
I followed everything in your guide except for the firewall part since I thought that was only for security and can be done later when stuff actually works, and because even in the replies there were a couple of issues with it.
I set up nginx correctly with atleast Discourse, but I still can’t acces discourse. Do I have to do anything on the DNS side to be able to connect to the Discourse subdomain?
You’ll want to go to your DNS provider and Cloudflare (which might be the same thing) and set up forum. to point to the same IP address. Make sure to disable content optimizations in CloudFlare - they mess up the Discourse JS.
Would this be something that might happen at some point? I’m trying to get Discourse to bind to an alt port (9000?) like I recall vaguely that it used to. It seems that there’s always been some ambiguity on how to bind this to other IP’s on the host or even alternate ports.