Jump to content
TrinityCore

Multiple servers on a single machine


Bhalandros
 Share

Recommended Posts

Hello.

I know this question has been asked many times, but I've seen some of the topics and none seem to really explain how to do it.

My question is simple. How can I make so that multiple servers, with different world databases (In fact, completely different versions, a master branch server and a 3.3.5 branch server) I don't really want them to be RUNNING at the same time, Just that if I go to the folder where I have the server for the master branch, it opens without problems, and then if I open the server on the 3.3.5 branch, they don't affect each other.

So how would I do it? New MySQL connection? Rename databases? (as in, Auth335 or something like that, on the same MySQL connection)

I figured it'd be renaming databases, but I don't know exactly all I have to change, and where. Is it enough if I change it on the .conf files or do I have to change something pre-compile?

Thanks in advance to everyone.

(I hope I made myself clear, it cost me a lot to write this down for some reason)

Link to comment
Share on other sites

The easiest way, as it wouldn't require any changes to the database or TrinityCore, would be run multiple virtual machines using VirtualBox. You could set up very small Debian 8 based VMs that have only enough installed to build and run SQL and TrinityCore (and the VirtualBox Guest Additions) from the command line, which should only use about 6GB of HD space each. And the nice thing is that you could make one, then simply duplicate it. Once they are setup, you could use Linux file sharing to make your two sets of TrinityCore and server directories available to either your "bare metal" OS or an another VM where you use your preferred IDE, text editor, etc.

It would take a while to set it all up, but once did you would have two separate servers with a unified work environment. You could even run both servers at the same time if you wanted.

You would need at least 8GB of RAM to do this in a testing environment. 3GB min per VM when building using 4 threads (4.5GB if building with 6 threads) and about 2GB per VM when just running the server while testing things.

Link to comment
Share on other sites

I run 335 & master out of the box in 'prod' like this essentially from a small gitlab ci / chef. in this example its two ip addresses for consistent ports, but it could be changed for port changes on a single address.

This provides 335 and master on the same machine and 335 using the master auth. when a user with a different client logs in they will see incompatible for the other client-server version pair as would be expected.

In the 'nonprod' i have the same scheme, different addresses, and the userbase sees those as ptr/dev which they cannot login into/create on.

If something like this should be written up it would e my pleasure, i can revise it step by step and mark it up for confluence.

These are my notes.

*** TC ***

tc builds
 - 335 (tc335)
  * world server is only running, auth and bnet are not
  * auth is provided by master
  * tc335 stack binds to 192.168.0.20 (eg, *server.conf, BindIP = "192.168.0.20", SOAP.IP = "192.168.0.20")
  * worldserver.conf RealmID = 1 (needs to be in tc_master_auth.realmlist)
 - master (tcmaster)
  * auth, bnet, world servers are running
  * 335 support is provided
  * tcmaster stack binds to 192.168.0.21 (eg, *server.conf, BindIP = "192.168.0.21", SOAP.IP = "192.168.0.21")
  * worldserver.conf RealmID = 2 (needs to be in tc_master_auth.realmlist)

*** MYSQL ***

mysql> show databases;
+----------------------+
| Database             |
+----------------------+
| information_schema   |
| tc_335_auth          | <-- not used
| tc_335_characters    |
| tc_335_world         |
| tc_master_auth       |
| tc_master_characters |
| tc_master_hotfixes   |
| tc_master_world      | <- dual realm (335 + master, realmid= #)
+----------------------+
8 rows in set (0.08 sec)

mysql> select id,name,address,localaddress,localsubnetmask,port,gamebuild from tc_master_auth.realmlist;
+----+----------+--------------+--------------+-----------------+------+-----------+
| id | name     | address      | localaddress | localsubnetmask | port | gamebuild |
+----+----------+--------------+--------------+-----------------+------+-----------+
|  1 | tc335    | 192.168.0.20 | 192.168.0.20 | 255.255.255.0   | 8085 |     12340 |
|  2 | tcmaster | 192.168.0.21 | 192.168.0.21 | 255.255.255.0   | 8085 |     23937 |
+----+----------+--------------+--------------+-----------------+------+-----------+
2 rows in set (0.00 sec)

Link to comment
Share on other sites

They are not compatible in the way that you can run one and connect from both clients but they can share the same database (even if you run them both at the same time - but you need to use the database structure from master, there are more fields in tables)

Link to comment
Share on other sites

6 hours ago, Shauren said:

They are not compatible in the way that you can run one and connect from both clients but they can share the same database (even if you run them both at the same time - but you need to use the database structure from master, there are more fields in tables)

 

Are you saying that master's auth database is backward compatible with 335? Otherwise, can you elaborate how the mixed world servers from 335 and master are not compatible with having 335 auth run on master's auth?

For 335 and master, both the world cli and soap allow creation, deletion, modification of accounts, bnets, bans, mutes, otp. In the wow client side, soap and console, changing passwords, character customizations, etc all work. Population 'low/med/high' works. I don't see any sql errors or erroneous behavior. I can imagine at scale I could be missing something, I don't think I have reached over 100 client connections.

If allowing 335 to use master's auth is not compatible, are you also saying that multiple 335 worlds cannot use a single 335 auth (obviously after the config realmid and the realmlist table is sorted out)?
 

 

 

 

 

 

Link to comment
Share on other sites

Alright, so I managed to get some time to make some tests and did this

image1.PNG

Now that I've read that auth is backwards compatible, I'll probably change the auth to be the same (though I don't know how it would work). But first of all, I would need some help with this; when I open authserver, it works fine (it seems), but when I open worldserver, i get this: https://pastebin.com/h3cREhUe

Edit: I've tried to change the .sql files' name, but doesn't seem to work anyways.

Link to comment
Share on other sites

  • 9 months later...
  1. DBUpdater: Given update include directory "C:/TrinityCore335/sql/updates/auth335" does not exist, skipped!
  2. DBUpdater: Given update include directory "C:/TrinityCore335/sql/custom/auth335" does not exist, skipped!
  3. DBUpdater: Given update include directory "C:/TrinityCore335/sql/old/3.3.5a/auth335" does not exist, skipped!
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Sandra Kaimraptor
      Dear Community,
      currently I am using screen to manage the daily restart of that server to prevent overloads. But screen is not a clean solution for that. I want to integrate the worldserver and authserver as services to my system. Unfortunately I do not know how I can write into the running daemon any command via Bash shell? sighup shutdown via killall is no option because I need to shutdown the server with 5 minutes delay and informing all players about the shutdown.
      Has anyone any idea how to resolve that issue?
      Kind Regards
      Sandra Kaimraptor
    • By blkht
      The worldserver crashes whenever I create a character. Seems like there is an issue with mysql, but I have no idea what the issue is. Anybody knows what`s happening here?
       

    • By eulondon
      Hello from Brazil!
      I was able to compile both 3.3.5 and 6.x branchs on a virtual box machine with debian 8 and get both working.
      However the system compiled a 32bit .elf and tools only for linux.
      I bypassed this by mounting WoW directory and using the linux tools in the mounted directory.
      However, now I want to compile portable worldservers, auth and bnetservers EXEs on the debian virtual machine.
      What Flags, Parameters would make this possible?
       
    • By Keldo
      I successfully built the current revision on Windows and Ubuntu 14 but when I attempted to patch a 4.3.4 client to 6.2.0, Blizzards stream launcher patched to 6.2.2
      So I am wondering if anyone knows where I can get a good guide on patching to 6.2.0 or a full 6.2.0 client download.
       
      I'm using this as an edcucational project to learn game development in C++
    • By damian054
      ####### English Version ########
      Hello Everyone!.
      I am requesting a script to change username in php, someone would be so kind as to contribute?.
      Thanks in advance
       
      ###### Version Español ######
      Hola a todos.
      Estoy necesitando un codigo php para cambiar el nombre de usuario, alguno podria aportarlo?
      se los agradeceria mucho. saludos!
       
      Version: TrinityCore 3.3.5a.
×
×
  • Create New...