-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker configuration clarification, Auth database errors #36
Comments
I see your auth and char databases are on two separate hosts ( You can remove these, they won't have any effect:
|
Got it, so the intended use is one auth db per realm then? I am currently running a separate auth db because I have multiple realms on different hosts that the auth server points to. I expect that changing this to support a discrete auth server would be a breaking change then, as that would be changing every call to the auth db. I could attempt this myself, but would that be mergable functionality, or would that be an unsupported use case? |
Ideally I should have split the queries into two to allow for different database hosts, but the Also if you want a hackfix in the meantime you can just disable const [rows] = await this.armory.getCharactersDb(realm.name).query({
sql: `
SELECT \`characters\`.\`guid\`, \`characters\`.\`name\`, \`race\`, \`class\`, \`gender\`, \`level\`, \`skin\`, \`face\`, \`hairStyle\`, \`hairColor\`, \`facialStyle\`, \`playerFlags\`, \`online\`, \`guild\`.\`name\` AS \`guild\`
FROM \`characters\`
LEFT JOIN \`guild_member\` ON \`guild_member\`.\`guid\` = \`characters\`.\`guid\`
LEFT JOIN \`guild\` ON \`guild\`.\`guildid\` = \`guild_member\`.\`guildid\`
WHERE ${where}
`,
values: [character],
timeout: this.armory.config.dbQueryTimeout,
}); |
Thank you so much for the guidance! I made these changes (sorry for the formatting):
Essentially I just split the query into a base + additional query. Then perform the query itself after its constructed. This way when hideGameMasters is false, the authdb is never queried in the first place, which should have a performance benefit in addition to fixing this issue. Though to witness this benefit would be pretty rare, as you would need a server with a ton of characters, and also not be filtering GMs. This /should/ be a non-breaking change as the code path for the GM filter enabled should be exactly the same. The server now works perfectly, with this change and the setting change. I would still like the ability to filter GMs, but that will require more fiddling as you said, to actually make a separate db connection and handling the config changes. Would it be possible for you to add this change? EDIT: I've made a pull request #37 if this is the recommended way to push a change. |
Your question
I've got this servier running in Docker, however when I open the page I get this error:
DataTables warning: table id=results - Ajax error. For more information about this error, please see http://datatables.net/tn/7
Logs from docker show:
The Docker logs lead me to believe that there is a problem with the database, however, I can log into the database from within the container no problem using this command to verify the credientials are correct:
mysql -u $ACORE_ARMORY_REALMS__0__AUTH_DATABASE__USER -p$ACORE_ARMORY_REALMS__0__AUTH_DATABASE__PASSWORD -h $ACORE_ARMORY_REALMS__0__AUTH_DATABASE__HOST -P $ACORE_ARMORY_REALMS__0__AUTH_DATABASE__PORT $ACORE_ARMORY_REALMS__0__AUTH_DATABASE
My configs look like this, with basically all defaults to test that it works:
There is only a setting: "ACORE_ARMORY_REALMS__0__AUTH_DATABASE" but the example env file doesn't have a place to put the host, port, user, pass so I added them in using the same schema as the other database configurations, but it seems that's not the case? Where am I supposed to put the password and other settings for the auth database? Or am I just totally misunderstanding the architecture of these settings?
I'm not at all familiar with TypeScript, but a basic look into the code @./src/armory/Armory.ts:74
This looks to only be actually connecting to the the Character and World databases. So this check isn't validating the Auth database anyway, if the server is supposed to also use the Auth database, shouldn't it be checked during this for loop?
Thank you for the assistance. Please let me know if any other logs would be useful, or if I'm missing some documentation somewhere.
The text was updated successfully, but these errors were encountered: