azerothcore-wotlk icon indicating copy to clipboard operation
azerothcore-wotlk copied to clipboard

Installation fails during import of SQL.

Open nathanradavies opened this issue 2 years ago • 18 comments

Current Behaviour

During first launch on Docker, the command ./acore.sh docker start:app fails with the following error:

ac-worldserver_1         | ERROR 1060 (42S21) at line 3: Duplicate column name 'artkit0'
ac-worldserver_1         |
ac-worldserver_1         | Applying of file '/azerothcore/data/sql/updates/db_world/2022_06_14_01.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.
ac-worldserver_1         | Could not update the World database, see log for details.

Expected Blizzlike Behaviour

Server should start

Source

No response

Steps to reproduce the problem

  1. Follow steps on "Install with Docker" page here: https://www.azerothcore.org/wiki/install-with-docker#install-with-docker
  2. Reach Step 3: Run the containers

Extra Notes

A fix has been proposed in Discord by user Vale the Violet Mote "I'm just going to comment out these lines

ALTER TABLE `gameobject_template_addon`
    ADD COLUMN `artkit0` INT NOT NULL DEFAULT 0 AFTER `maxgold`,
    ADD COLUMN `artkit1` INT NOT NULL DEFAULT 0 AFTER `artkit0`,
    ADD COLUMN `artkit2` INT NOT NULL DEFAULT 0 AFTER `artkit1`,
    ADD COLUMN `artkit3` INT NOT NULL DEFAULT 0 AFTER `artkit2`;

no point to them since they already exist"

AC rev. hash/commit

2cde0c35ba52ac9ca9b2db167d3f20f46db0ca9c

Operating system

Windows 11 running Docker version 20.10.16, build aa7e414

Custom changes or Modules

None

nathanradavies avatar Jun 18 '22 16:06 nathanradavies

Cannot reproduce on windows and all CIs passing

Kitzunu avatar Jun 19 '22 10:06 Kitzunu

Can also confirm this on my Docker setup after upgrading from an existing database (from https://github.com/azerothcore/azerothcore-wotlk/commit/2bef6b497d24) to newly compiled one (from https://github.com/azerothcore/azerothcore-wotlk/commit/2db5f9a231be84092ea9eb2122a4f78ddd28652f).

Error:

Updating World database...
>> Applying update "2022_06_14_01.sql" '90B07D9'...
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1060 (42S21) at line 3: Duplicate column name 'artkit0'

Applying of file '/azerothcore/data/sql/updates/db_world/2022_06_14_01.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.
Closing down DatabasePool 'acore_world'.
Asynchronous connections on DatabasePool 'acore_world' terminated. Proceeding with synchronous connections.
All connections on DatabasePool 'acore_world' closed.
Closing down DatabasePool 'acore_characters'.
Asynchronous connections on DatabasePool 'acore_characters' terminated. Proceeding with synchronous connections.
All connections on DatabasePool 'acore_characters' closed.
Closing down DatabasePool 'acore_auth'.
Asynchronous connections on DatabasePool 'acore_auth' terminated. Proceeding with synchronous connections.
All connections on DatabasePool 'acore_auth' closed.

Knaspin avatar Jun 20 '22 18:06 Knaspin

Same problem with building/running from commit 61c64bbf3049d1548c55f56dc872ab03f073904f on debian 10

importing WORLD - updates ... ERROR 1060 (42S21) at line 2972: Duplicate column name 'artkit0'

GwendolineFct avatar Jun 21 '22 09:06 GwendolineFct

I am also having the same issue from commit 73bd2b4 on Arch with Docker.

azerothcore-wotlk-ac-worldserver-1  | ERROR 1060 (42S21) at line 3: Duplicate column name 'artkit0'
azerothcore-wotlk-ac-worldserver-1  | 
azerothcore-wotlk-ac-worldserver-1  | Applying of file '/azerothcore/data/sql/updates/db_world/2022_06_14_01.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.
azerothcore-wotlk-ac-worldserver-1  | Could not update the World database, see log for details.
azerothcore-wotlk-ac-worldserver-1  | Closing down DatabasePool 'acore_world'.

CrisisModel avatar Jun 21 '22 17:06 CrisisModel

So despite the long conversation about this in the AC discord, and despite further incoming reports, this remains closed. This needs to be reopened so people are at least aware that manually editing the SQL file may be required to perform docker installation.

ghost avatar Jun 21 '22 18:06 ghost

Haven't checked github in a while, saw this now.

It's very odd that you are experiencing this as artkit0 only exists once (1) in the entire directory. But we will squash the db in the coming days so I will leave it open until then.

Kitzunu avatar Jun 21 '22 18:06 Kitzunu

Thank you @Kitzunu and for all the work you and all the volunteers do on AC.

ghost avatar Jun 21 '22 18:06 ghost

But we will squash the db in the coming days so I will leave it open until then.

Would it be possible to fit this in before that squash? :3 https://github.com/azerothcore/azerothcore-wotlk/issues/11005

heyitsbench avatar Jun 21 '22 20:06 heyitsbench

Feel free to open a PR before the weekend and I'll consider it

Kitzunu avatar Jun 21 '22 20:06 Kitzunu

Can confirm, running into the issue today on the latest pull.

Jboonie avatar Jun 25 '22 20:06 Jboonie

Newcomer here, I can't get the server to run even with some tweaks found on discord. Waiting for this fix so I can try this core out for the first time. :)

NexieJolt avatar Jul 03 '22 01:07 NexieJolt

When I run “./acore.sh db-assembler import-updates ”,prompt "ERROR 1060 (42S21) at line 2972: Duplicate column name 'artkit0' . Fix it ,please. thanks

dustxdustx avatar Jul 04 '22 03:07 dustxdustx

I can confirm this is still an issue and it happens with a few other updates, not just the Akit0 column. The updates with issues are 2022_06_29_05.sql, 2022_06_28_02.sql, and 2022_06_18_04.sql. Simply deleting these files or commenting out its contents lets all the other updates to continue and start the servers just fine.

ERROR 1062 (23000) at line 7: Duplicate entry '394' for key 'pool_template.PRIMARY
ERROR 1062 (23000) at line 11: Duplicate entry '45809' for key 'creature.PRIMARY

It just keeps going...

Alex-Garay avatar Jul 04 '22 07:07 Alex-Garay

These BUGs in sql are petrified.

dustxdustx avatar Jul 05 '22 02:07 dustxdustx

Unfortuely ,This bug has be ingored for long time.

dustxdustx avatar Jul 22 '22 02:07 dustxdustx

Unfortuely ,This bug has be ingored for long time.

It's not that the bug is being ignored, it's just that the solution hasn't happened yet.

heyitsbench avatar Jul 22 '22 02:07 heyitsbench

unfortunately,How make the developer notice this bug? I can't update my database for three months.....

dustxdustx avatar Aug 03 '22 12:08 dustxdustx

There is a PR for that waiting for approval #12419

fegger-ducksify avatar Aug 03 '22 12:08 fegger-ducksify

update to latest and it should work https://github.com/azerothcore/azerothcore-wotlk/commit/3daa8e2146b97346c61b08f5d23751e27f8692f2

Kitzunu avatar Aug 21 '22 12:08 Kitzunu