Ghost hostname after hostname change

Hello from a new hosted Discourse user. :wave:

Problem statement:

  1. After install and setup, I changed the domain name after making all necessary changes. (Cloudflare DNS, app.yml, droplet hostname, new SSL certs, rebuilt docker, etc, etc, etc.)
  2. Everything worked fine
  3. Until: Activating S3 backups yields 500 error when visiting /admin/backups
  4. /admin/logs reports certificate verify mismatch (Hostname mismatch)
  5. Switching back to local backups and all works fine.

Question:

  • Where might the original hostname be hiding? I know you canโ€™t tell me what I forgot so maybe you can enumerate where those settings reside.

FYI:

Seahorse::Client::NetworkingError (SSL_connect returned=1 errno=0 peeraddr=162.243.189.2:443 state=error: certificate verify failed (Hostname mismatch))
lib/s3_helper.rb:426:in `s3_bucket'
lib/s3_helper.rb:240:in `list'
lib/backup_restore/s3_backup_store.rb:122:in `unsorted_files'
lib/backup_restore/backup_store.rb:23:in `files'
app/controllers/admin/backups_controller.rb:24:in `block (2 levels) in index'
app/controllers/admin/backups_controller.rb:13:in `index'
app/controllers/application_controller.rb:412:in `block in with_resolved_locale'
app/controllers/application_controller.rb:412:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:368:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/request_tracker.rb:202:in `call'

See Change the domain name or rename your Discourse. Make sure cloudflare is dns only

1 Like

Thank you Jay for the link. I hadnโ€™t found that topic yet. :slight_smile:

Based on your inputs and that linked topic, I have:

  1. Disabled Cloudflare and confirmed via DNSChecker.org my A records resolve to my DO droplet IP
  2. Doublechecked my app.yml (it was fine)
  3. Entered app container and ran discourse remap from old to new domain name and it made changes. To confirm, I ran it second time and it exited with no changes
  4. Used recursive grep looking inside and outside the app container for the old domain name and found nothing
  5. Rebuilt the app and studied the docker run command. Found no issues.
  6. Went into my admin and changed backup from local to S3
  7. Continued to get the 500 error as before. :crying_cat_face:
  8. Changed back to local backup and everything was fine again.
  9. Enabled Cloudflare and confirmed it is proxying once again

I am feeling stuck and am basically :man_shrugging:

Occams Razor

Solved:

  • At /admin/site_settings/category/files
  • s3 endpoint should not include bucket name :person_facepalming:

Pretty obvious in retrospect

2 Likes

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