The discussion revolves around troubleshooting a multisite Discourse instance, focusing on password reset issues and database configuration. pfaffman initially reports that password reset links fail to work, leading to a broader investigation into database setup and configuration. sam explains how to specify a database using RAILS_DB, but pfaffman finds the command doesn’t use the specified database, prompting a discussion on whether the system should fail on invalid database names instead of defaulting. DeanMarkTaylor identifies issues in the multisite.yml configuration, such as a typo in hooks and incorrect hook placement, which are corrected. pfaffman also encounters errors related to missing tables, which are resolved after fixing the configuration. The thread also addresses Sidekiq issues, with DeanMarkTaylor clarifying that only one Sidekiq instance runs for all sites. codinghorror emphasizes the need to fix the behavior of falling back to default databases, and sam commits to implementing a warning for invalid database names. The issue is resolved, and pfaffman thanks the community for their help.
I have a multisite instance & when I try to reset password for an admin user (the only user), I receive the email, but clicking the link just takes me to the home page, not logged in, and no prompt to change the password.
Related: how do I pass a database name to rake admin:create?
I think that’s what I thought, but it doesn’t seem to be passing the database.
root@support-multi:/var/www/discourse# RAILS_DB=bob rake admin:create
Email: pfaffman@gmail.com
User with this email already exists! Do you want to reset the password for this email? (Y/n)
I didn’t name the database ‘bob’, so I’d expect an error here. It seems to be accessing the default database.
Data is in the same container (though I would really like to move it to a separate container).
Edit: my current hypothesis is that at some point I had screwed up the db_id numbers for a couple sub-hosts. I’m rebuilding the container with a different name now and don’t see that error. . .
Well, I got the error again with a clean build. My config file is at this gist.
Looks like it might be a bug, though I’m a novice at multisite.
I get a bunch of errors like this:
Failed to initialize site discourse_instance2
2017-05-10 21:17:15 UTC [20343-1] discourse@discourse_trena ERROR: relation "site_settings" does not exist at character 36
2017-05-10 21:17:15 UTC [20343-2] discourse@discourse_trena STATEMENT: SELECT name, data_type, value FROM site_settings
URGENT: ERROR: relation "site_settings" does not exist
LINE 1: SELECT name, data_type, value FROM site_settings
^
```