• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] runing 2 3.3.5 realms on the same host goes wrong ...

Status
Not open for further replies.

darksoke

OnTop500
Well i want to run 2 3.3.5 realms on the same host 1 will be a dev realm but whenever i try to start the 2nd realm it close instantly after loading all data.
My settings are the following.


All settings done in auth and worldserver.conf

1st realm.
REALMID=1
REALMPORT=8085
REALM_CHAR_DB=characters
WORLD_DB=world


2nd realm
REALMID=2
REALMPORT=8087
REALM_CHAR_DB=chars_2
WORLD_DB=world (Same as first realm because I use it for development but it should not affect the startup since it load correctly)


Both realms use the same auth


Ok so i'm using linux ubuntu and i'm runing both realms from the same user ('NO ROOT') just different paths , 2nd realm is just an repack of the first realm. The problem is whenever I start the second realm , it loads everything and then i get 'Healthing process started....' and it's gone like both realms use the same port .. I have changed the 2nd realm port in auth database and worldserver too , restarted authserver but same issue ... Anny ideea what could be the problem ? do i need to setup a new path for test realm or change it to a different user ?
 

Sylica

Exalted Member
On Linux, you need to compile different worldservers, cause the configurations you make before compiling, is coded into the server. You might need to compile a new server under a new folder.
 

Rochet2

Moderator / Eluna Dev
On Linux, you need to compile different worldservers, cause the configurations you make before compiling, is coded into the server. You might need to compile a new server under a new folder.
Exactly this.

On windows the configs need to be where the exe is, so you can freely move the server anywhere.
On linux the configuration file folder path is hardcoded upon compile / cmake and it is not relative by default nor configurable afterwards.
This means that if you simply duplicated (copy paste) the server folders and hoped it to work, the original config path is still used on both servers and thus the ports and settings are same, resulting in the failure.

In my opinion it is a nice feature to be able to configure the config path where ever you want, but its a little stupid that the absolute path would be hardcoded.

Some links:
https://github.com/TrinityCore/TrinityCore/blob/3.3.5/cmake/platform/unix/settings.cmake#L9L13
https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/worldserver/CMakeLists.txt#L149L153
https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/worldserver/Main.cpp#L53L55
 
Last edited:

Rochet2

Moderator / Eluna Dev
You /should/ be able to also set up a relative path in cmake for the conf_dir
Try using -DCONF_DIR="../etc/"
when doing the cmake part
 

yvoms

Exalted Member
You may have to compile a new worldserver, and you may want to create a separate world DB for it too.
 

Sylica

Exalted Member
You may have to compile a new worldserver, and you may want to create a separate world DB for it too.

Having a separate world db is not required, unless the databases are different. I've ran up to 8 realms on a single world db and no issues. Its nothing but data. Its how the system is setup.
 

Rochet2

Moderator / Eluna Dev
Having a separate world db is not required, unless the databases are different. I've ran up to 8 realms on a single world db and no issues. Its nothing but data. Its how the system is setup.

Though there WILL be issues for example if on 2 servers running that use the same world DB (and separate other DBs)..
and then on both servers someone spawns an NPC (and saves it), like .npc add 36 or something.
The cores will make up a guid for the creature, which will be identical on both servers. (its last guid +1 naturally)
Both will try to write to the world DB creatures table with same guid and the other will likely fail, causing a crash.

This is just theorethical, but the core generates the guids and inserts the data to DB (does not delete and insert or use replace) and all DB errors crash, so ..

The cores will run fine if nothing tries to write to the DB or if everything written will not conflict with anything like in example above (lets say like auto incremented keys..)
 

Sylica

Exalted Member
Though there WILL be issues for example if on 2 servers running that use the same world DB (and separate other DBs)..
and then on both servers someone spawns an NPC (and saves it), like .npc add 36 or something.
The cores will make up a guid for the creature, which will be identical on both servers. (its last guid +1 naturally)
Both will try to write to the world DB creatures table with same guid and the other will likely fail, causing a crash.

This is just theorethical, but the core generates the guids and inserts the data to DB (does not delete and insert or use replace) and all DB errors crash, so ..

The cores will run fine if nothing tries to write to the DB or if everything written will not conflict with anything like in example above (lets say like auto incremented keys..)

True... Good point though.
 

darksoke

OnTop500
well in this case the 2nd realm will be identically with the first realm nut i'll need to restart it many times to apply new updates and such witouth restarting the first realm
 

yvoms

Exalted Member
Copy over the entire server to a new folder, rename it, change port 8085 to 8086, add a row in the realmlist table and launch it?
 
Status
Not open for further replies.
Top