I got a problem when starting ./launcher start app


(Paul Schlacter) #1

Hey guys,

Can somebody help me with this, i don’t know why.

root@mahanavo:/var/discourse# ./launcher start app

+ /usr/bin/docker run -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=4 -e UNICORN_SIDEKIQS=1 -e RUBY_GC_MALLOC_LIMIT=40000000 -e RUBY_HEAP_MIN_SLOTS=800000 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e DISCOURSE_DEVELOPER_EMAILS=dev@dhammanussati.com -e DISCOURSE_HOSTNAME=discourse.dhammanussati.com -e DISCOURSE_SMTP_ADDRESS=smtp.dhammanussati.com -h mahanavo-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log local_discourse/app /sbin/boot 8c5ec12248e919279dac33060fe4337f2efc8a8d53623b13739d21aa925cba4a
docker: Error response from daemon: failed to create endpoint app on network bridge: Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use.

Thank You


Help us test our new post rendering engine!
#2

That’s saying your port is already in use. Are you running a webserver outside the container? Phrased differently, do you have websites running on the same server besides the discourse forums?

Try this:

sudo netstat -plnt | grep ':80'

Copy over the output from that command in a reply here.


(Paul Schlacter) #3
root@mahanavo:/etc/nginx/conf.d# sudo netstat -plnt | grep ':80'
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      17469/nginx
tcp6       0      0 :::80                   :::*                    LISTEN      17469/nginx

I did it just like this " Running other websites on the same machine as Discourse"


(Paul Schlacter) #4

i’m trying to make a subdomain discourse and a html sites


#5
nano /etc/nginx/conf.d/discourse.conf

post the contents

Also, did you follow this line


(Paul Schlacter) #6

root@mahanavo:/etc/nginx/conf.d# cat discourse.conf

server {
    listen 80; listen [::]:80;
    server_name discourse.dhammanussati.com;  # <-- change this

    location / {
            proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock:;
            proxy_set_header Host $http_host;
            proxy_http_version 1.1;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

#7

That’s the issue,

remove the

- "80:80" # fwd host port 80 to container port 80 (http)

then rebuild


I need help with my nginx settings for multiple sites
(Paul Schlacter) #8
templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
  - "templates/web.socketed.template.yml"

## which TCP/IP ports should this container expose?
expose:
  - "80:80"   # fwd host port 80   to container port 80 (http)

yup


(Paul Schlacter) #9

it works.

THANK YOU!!!


(Régis Hanol) #10