HTTPS : issue while trying to set up SSL certification

Hey there !

So I was trying to enable HTTPS for my website following this nice tutorial. Everything went fine until I tried rebuilding the app, typing ./launcher rebuild app.

I ran discourse-doctor to try figuring this out and I finally found something :

==================== END REBUILD LOG ====================
Failed to rebuild app.

Checking your domain name . . .

Connection to discourse.mydomain.com succeeded.
You should probably remove any non-standard plugins and rebuild.
Attempting to restart existing container. . .

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

Note : I’ve replaced a long chain of characters with some_random_characters and my domain name with discourse.mydomain.com.

This pretty weird since I sticked up to the tutorial ; I have no idea of how to fix this.

Any help would be greatly appreciated !

Have a nice day,

nekodroid

You’d need to share your app.yml for further diagnosis. Make sure you remove any sensitive emails and passwords before posting.

2 Likes
--- 
env: 
  DISCOURSE_DEVELOPER_EMAILS: myemailadress@maildomain.com
  DISCOURSE_HOSTNAME: discourse.mydomain.com
  DISCOURSE_SMTP_ADDRESS: stmp.eu.mailgun.org
  DISCOURSE_SMTP_PASSWORD: smtppasswordwithoutquotes
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: postmaster@discourse.mydomain.com
  LANG: en_US.UTF-8
  LETSENCRYPT_ACCOUNT_EMAIL: myemailadress@maildomain.com
  UNICORN_WORKERS: 2
expose: 
  - "80:80"
  - "443:443"
hooks: 
  after_code: 
    - 
      exec: 
        cd: $home/plugins
        cmd: 
          - "git clone https://github.com/discourse/docker_manager.git"
params: 
  db_default_text_search_config: pg_catalog.english
  db_shared_buffers: 128MB
run: 
  - 
    exec: "echo \"Beginning of custom commands\""
  - 
    exec: "echo \"End of custom commands\""
templates: 
  - templates/postgres.template.yml
  - templates/redis.template.yml
  - templates/web.template.yml
  - templates/web.ratelimited.template.yml
  - templates/web.template.yml
  - templates/web.ssl.template.yml
  - templates/web.letsencrypt.ssl.template.yml
volumes: 
  - 
    volume: 
      guest: /shared
      host: /var/discourse/shared/standalone
  - 
    volume: 
      guest: /var/log
      host: /var/discourse/shared/standalone/log/var-log

Here is it ~

Did you read this part?

It looks like there is a problem with your docker install.

And why did you completely re-write the order of the stuff in app.yml?

1 Like

I had actually read this guide, and it blocked on the command wget -qO- https://get.docker.com/ | sh ; it said "wrong usage of command wget" from what I remember. So I skipped to the next steps, and I remember Docker being auto-installed after typing the command ./discourse-setup.

This is probably my problem…

I will completely restart my Discourse installation from the beginning then update this thread.

Thank you a lot for your help, friends ! :smiley_cat:

Yes! This got added at some point. Not sure when it got added.

Glad you’re up.

thank you :uwu:

By the way, I’m having another error now !

I’ve ran the discourse-setup autosetup program and added an email adress for Let’s encrypt encryption when prompted. Now it says that :

Checking your domain name . . .
WARNING:: This server does not appear to be accessible at discourse.apertureproject.me:443.

A connection to http://discourse.apertureproject.me (port 80) also fails.

According to this, the error is due to unopened ports, and I absolutely got no idea of how to fix this. And I wouldn’t launch my website without encryption, so I won’t disable Let’s Encrypt.

EDIT !

I’ve found my host’s documentation (OVH) about how to open ports. But my IP manager is empty, and it should be filled with several IP adresses according to the doc’s screenshots.

I’m sorry, it’s in french, but as you can see, the IP adresses list is completely empty.

The test can fail when there is no actual problem, so you can see what happens.

Is DNS set up? No. discourse.apertureproject.me doesn’t resolve. You have to set up DNS before you can have https.

What OS are you using? What platform? (Some have ports turned off by default)

If you run nc at the command line do you get “command not found”?

2 Likes

Alright, how can I do that ?

I know it’s about DNS records, but what type of value is it, etc ?

By value, I mean A, AAAA, NS, etc

Because I’ve already added the following in the DNS servers category :

Thank you a lot for your help also ~ :smiley_cat:

you need an A record pointing to your droplet IP.

2 Likes

I’ve done that.

Another question, I have an issue I never had before : it now displays the nginx welcome page when I type apertureproject.me

It was showing Discourse successful install message before

it opens installation page. it is normal. hurry up to install it.

Then how do I install it ? I don’t understand. I never had this page before

Sorrie I’m a bit new to this… confusing :tired_face:

only follow instructions.

You mean 30 minute installation guide ? I’ve followed it

no, you already did it. you are now on admin register step.

Ah… Still not getting it x’( What do you advise me to do ?

what do you see when you browse your domain ?

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

no, i see register page. clear your cache, browser history and try again.

2 Likes