Skip to content
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

Issue with Docker setup on fresh clone/setup #21399

Open
Wayne-Twinborn opened this issue Feb 11, 2025 · 5 comments
Open

Issue with Docker setup on fresh clone/setup #21399

Wayne-Twinborn opened this issue Feb 11, 2025 · 5 comments

Comments

@Wayne-Twinborn
Copy link

Preface: This is being run on local hardware, on a fresh bare-metal Debian install.

Steps to reproduce:

  1. Setup a server with a fresh copy of the latest Debian
  2. Install and verify docker and the compose plugin
  3. git clone the azerothcore-wotlk repo
  4. cd into the repo folder and run 'docker compose build'
  5. Once it finishes, run 'docker compose up -d'

For reference, this seems to also happen with acore-docker though all of the notes here are working with the azerothcore-wotlk repo.

I followed the instructions on the Wiki for the Docker setup and during the docker compose up, the ac-db-import container crashes with this error

Text:

ERROR 1146 (42S02) at line 17 in file: '/azerothcore/data/sql/updates/db_world/2024_12_18_00.sql': Table 'acore_world.smart_scripts' doesn't exist

Applying of file '/azerothcore/data/sql/updates/db_world/2024_12_18_00.sql' to database 'acore_world' failed! If you are a user, please pull the latest revision from the repository. Also make sure you have not applied any of the databases with your sql client. You cannot use auto-update system and import sql files from AzerothCore repository with your sql client. If you are a developer, please fix your sql query.
Could not update the World database, see log for details.

Screenshot:
Image

Running the ac-database container and connecting into it with mysql, I use the ac_world database then list tables to get this output.

Text (corrected to markdown):

MySQL [acore_world]> show tables;
Tables_in_acore_world
-----------------------------------
achievement_criteria_data
achievement_dbc
achievement_reward
areatrigger_involvedrelation
areatrigger_teleport
auctionhouse_dbc
bankbagslotprices_dbc
broadcast_text
broadcast_text_locale
charstartoutfit_dbc
cinematiccamera_dbc
command
conditions
creature_onkill_reputation
creature_questender
creature_questitem
creature_queststarter
creature_summon_groups
creature_template
creature_template_model
creature_template_movement
creature_template_resistance
creature_text_locale
creaturefamily_dbc
creaturemodeldata_dbc
creaturespelldata_dbc
currencytypes_dbc
destructiblemodeldata_dbc
disables
disenchant_loot_template
dungeon_access_requirements
dungeon_access_template
dungeonencounter_dbc
event_scripts
faction_dbc
game_event_battleground_holiday
game_event_condition
game_event_creature_quest
gameobject_addon
gameobject_questitem
gameobject_queststarter
gameobject_template_addon
gtchancetospellcrit_dbc
gtchancetospellcritbase_dbc
gtcombatratings_dbc
gtregenhpperspt_dbc
holiday_dates
item_set_names
item_set_names_locale
item_template
itembagfamily_dbc
itemextendedcost_dbc
lfg_dungeon_template
light_dbc
linked_respawn
lock_dbc
map_dbc
milling_loot_template
movie_dbc
namesprofanity_dbc
namesreserved_dbc
npc_spellclick_spells
npc_text_locale
npc_vendor
overridespelldata_dbc
page_text
page_text_locale
pet_name_generation_locale
player_class_stats
player_factionchange_achievement
player_factionchange_titles
player_loot_template
playercreateinfo
playercreateinfo_action
playercreateinfo_spell_custom
points_of_interest
pool_gameobject
pool_pool
quest_details
quest_greeting_locale
quest_money_reward
quest_offer_reward
quest_offer_reward_locale
quest_poi
quest_poi_points
quest_request_items
questsort_dbc
randproppoints_dbc
reference_loot_template
reputation_reward_rate
skill_extra_item_template
skill_perfect_item_template
skillline_dbc
skinning_loot_template
spell_cooldown_overrides
spell_dbc
spell_group_stack_rules
spell_loot_template
spell_mixology
spell_scripts
spell_target_position
spell_threat
spellcategory_dbc
spelldifficulty_dbc
spellfocusobject_dbc
spellitemenchantmentcondition_dbc
summonproperties_dbc
teamcontributionpoints_dbc
totemcategory_dbc
transportrotation_dbc
transports
updates
updates_include
vehicle_seat_addon
vehicle_template_accessory
warden_checks
waypoint_data
waypoint_scripts
worldmaparea_dbc
-----------------------------------
119 rows in set (0.007 sec)

Through data/sql/base/db_world, I grabbed the "create table" portion of the query and manually created it.

After that, I re-ran the docker compose up command, then the same issue came up for a different table. With the base/db_world directory (and metallinos on discord) I created the missing table, re-ran the command, and hit the issue. Rinse and repeat.

In order the order they happened, the failures were (and yes, this was a long and tedious process)

table file
smart_scripts 2024_12_18_00.sql
item_loot_table 2024_12_20_00.sql
creature_loot_template 2024_12_20_01.sql
gameobject 2024_12_20_02.sql
pooltemplate 2024_12_20_02.sql
quest_request_items_locale 2024_12_22_02.sql
spell_script_names 2024_12_28_01.sql
gossip_menu 2024_12_29_00.sql
npc_text 2024_12_29_00.sql
gameobject_template_locale 2024_12_29_01.sql
quest_template_locale 2024_12_29_03.sql
creature 2024_12_30_02.sql
creature_addon 2024_12_30_02.sql
pool_creature 2024_12_31_00.sql
creature_text 2025_01_04_01.sql
creature_template_addon 2025_01_05_02.sql
creature_formations 2025_01_07_00.sql
gameobject_template 2025_01_09_00.sql
spell_proc_event 2025_01_10_01.sql
acore_string 2025_01_10_03.sql
creature_equip_template 2025_01_12_00.sql
spell_custom_attr 2025_01_19_02.sql
areatrigger_scripts 2025_01_19_02.sql
waypoints 2025_01_19_02.sql
game_event 2025_01_31_00.sql
game_event_creature 2025_01_31_00.sql
gossip_menu_option 2025_01_31_00.sql
game_event_npc_vendor 2025_01_31_00.sql
quest_template_addon 2025_02_07_04.sql

After that there was a new error

Text:

In mysql_stmt_prepare() id: 8, sql: "INSERT INTO graveyard_zone (ID, GhostZone, Faction) VALUES (?, ?, ?)"
Table 'acore_world.graveyard_zone' doesn't exist
In mysql_stmt_prepare() id: 9, sql: "DELETE FROM graveyard_zone WHERE ID = ? AND GhostZone = ? AND Faction = ?"
Table 'acore_world.graveyard_zone' doesn't exist
In mysql_stmt_prepare() id: 10, sql: "INSERT INTO game_tele (id, position_x, position_y, position_z, orientation, map, name) VALUES (?, ?, ?, ?, ?, ?, ?)"
Table 'acore_world.game_tele' doesn't exist
In mysql_stmt_prepare() id: 11, sql: "DELETE FROM game_tele WHERE name = ?"
Table 'acore_world.game_tele' doesn't exist
In mysql_stmt_prepare() id: 78, sql: "DELETE FROM game_event_model_equip WHERE guid = ?"
Table 'acore_world.game_event_model_equip' doesn't exist
In mysql_stmt_prepare() id: 88, sql: "UPDATE version SET core_version = ?, core_revision = ?"
Table 'acore_world.version' doesn't exist
Could not prepare statements of the World database, see log for details.

Image

While the error changed, it was basically still missing tables. So I resumed from here and added the following in order.

table
graveyard_zone
game_tele
game_event_model_equip
version

then another error

In mysql_stmt_prepare() id: 0, sql: "SELECT entry, pool_entry FROM pool_quest"
Table 'acore_world.pool_quest' doesn't exist
In mysql_stmt_prepare() id: 63, sql: "SELECT eventEntry, prerequisite_event FROM game_event_prerequisite"
Table 'acore_world.game_event_prerequisite' doesn't exist
In mysql_stmt_prepare() id: 68, sql: "SELECT id, quest, eventEntry FROM game_event_gameobject_quest"
Table 'acore_world.game_event_gameobject_quest' doesn't exist
In mysql_stmt_prepare() id: 69, sql: "SELECT quest, eventEntry, condition_id, num FROM game_event_quest_condition"
Table 'acore_world.game_event_quest_condition' doesn't exist
In mysql_stmt_prepare() id: 71, sql: "SELECT guid, eventEntry, npcflag FROM game_event_npcflag"
Table 'acore_world.game_event_npcflag' doesn't exist
In mysql_stmt_prepare() id: 72, sql: "SELECT questId, eventEntry FROM game_event_seasonal_questrelation"
Table 'acore_world.game_event_seasonal_questrelation' doesn't exist
In mysql_stmt_prepare() id: 74, sql: "SELECT pool_template.entry, game_event_pool.eventEntry FROM pool_template JOIN game_event_pool ON pool_template.entry = game_event_pool.pool_entry"
Table 'acore_world.game_event_pool' doesn't exist
In mysql_stmt_prepare() id: 75, sql: "SELECT eventEntry FROM game_event_arena_seasons WHERE season = ?"
Table 'acore_world.game_event_arena_seasons' doesn't exist
In mysql_stmt_prepare() id: 86, sql: "SELECT Experience FROM player_xp_for_level WHERE Level = ?"
Table 'acore_world.player_xp_for_level' doesn't exist
Could not prepare statements of the World database, see log for details.

Image

Tables don't exist so back to the grindstone.

table
pool_quest
game_event_prerequisite
game_event_gameobject_quest
game_event_quest_condition
game_event_npcflag
game_event_seasonal_questrelation
game_event_pool
game_event_arena_seasons
player_xp_for_level

After that the containers came up, so I attempted to attach to the ac-worldserver, which worked. Thenshortly thereafter I got a new error.

Image

Added the missing table, got another one, and it kept going again... It did get another error though

Image

Added the missing tables.

table
module_string
module_string_locale
areatable_dbc
achievement_category_dbc
achievement_criteria_dbc
areapoi_dbc
battlemasterlist_dbc
barbershopstyle_dbc

At this point, I hit the limit of my patience for tedium when I know that I'm treating symptoms not the sickness. At this point I dipped off of the above and am currently digging around to try and figure out the issue. Will report back if I figure something out, but I wanted to submit this issue so I can answer questions and see if anyone else has any ideas.

@Wayne-Twinborn Wayne-Twinborn changed the title Rendered Markdown Preview Issue with Docker setup on fresh clone/setup Issue with Docker setup on fresh clone/setup Feb 11, 2025
@TheSCREWEDSoftware
Copy link
Contributor

Are you running mysql or Mariadb? And debian isn't a supported Linux version by us

@sogladev
Copy link
Member

Both docker-compose.yml in acore-docker and the main repo are identical.

I did a fresh clone of the main repo with the following .env file in root directory to avoid port conflicts with my existing mysqld. Also symlinked existing client data to avoid downloading client data again

DOCKER_DB_EXTERNAL_PORT=3310
DOCKER_AUTH_EXTERNAL_PORT=3028
DOCKER_WORLD_EXTERNAL_PORT=8086

I can up the acore services without any errors. I've linked the commands + logs below.

The issue seems on your end. Can you run the ac-db-import service by itself and upload a gist of that log?

force build images and print output to console + text file
docker compose up --build 2>&1 | tee fresh.txt
or just ac-db-import (includes db)
docker compose up --build ac-db-import 2>&1 | tee output.txt

The correct output should look like below

included gist with 4 logs:
https://gist.github.com/sogladev/c06c5c7c85401513a63ae0a0ec94f704
docker log of ac-db-import
docker log of ac-worldserver
docker log of console output (docker compose up --build 2>&1 | tee fresh.txt)
log of classic full install console output

@sogladev sogladev added the Platform-Docker Docker related label Feb 11, 2025
@Wayne-Twinborn
Copy link
Author

Wayne-Twinborn commented Feb 11, 2025

@TheSCREWEDSoftware Debian is mentioned in https://www.azerothcore.org/wiki/linux-requirements for the classic install and no specific version is mentioned in the docker instructions. if Debian isn't supported then that page should probably be updated.

@sogladev When you did your setup was it on Debian? I ask because in an update for 12-17 ubuntu is specifically mentioned in the dockerfile. 12-18 is the first sql file to hit an issue. I'm still digging to see if I can find the actual issue.

I seem to have gotten things running. I reset again then went in the dockerfile and set ENV AC_UPDATES_ENABLE_DATABASES to 1 before building. After that I ran the compose and went to bed. It seems to either be working or at least has gotten a lot farther than last night. I'm able to attach to ac-worldserver.

I will try again fresh to get the info you want, but probably not today. The last 2 days I have deleted/pulled the repo and reset everything in docker 8 times trying different things before I spent hours creating the tables mentioned in the OP trying to get to a running state without modifying any files. A bit burned atm.

Edit:
Should mention that I only set the NV AC_UPDATES_ENABLE_DATABASES flag for the world server, not the auth. The world server was the only one throwing issues during the troubleshooting I did in the OP, so I only set that flag. I'll be able to test and make sure things are actually working in-game in about an hour.

@Kitzunu
Copy link
Member

Kitzunu commented Feb 11, 2025

@michaeldelago docker expert pinged

@Wayne-Twinborn
Copy link
Author

I can confirm that everything seems to be working after flipping that setting. I've gotten in game, made configuration changes through docker-compose.override.yaml, and did a rebuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants