Jump to content
  • 0

[Tutorial] Multi Servers


Cydh

Question


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

This tutorial will leads you to

  • Set multiple char-server as shown as multi services after login in RO Client
  • Set multiple map-servers for 1 char-server
  • A Lazy setup
    • So called Lazy setup because this guide only "copy" the necessary super minimum config file.
    • The Lazy config will runs same server cores, so if server is compiled in renewal, you only can change the rates as example
    • to make different server types (mod, renewal vs pre) you have to copy/separate the rathena files, u will understand if you can understand this basic (... that's what I thought)
    • How to make it no lazy? Just copy the folders, restructure by using decent directory names... so lazy to write it now, maybe later

I've seen the setup before, years ago, can't recall where, maybe in old wiki? Because in current wiki is just like this: Multiple Servers.

 

1 Login-server with Multiple Char-Server

1 login-server

  1. set just like your normal setup
  2. add 1 more connection account in login (sex = 'S'), the username & password must be different with the first one. Example by default is s1 and p1, this entry be s2 and p2

2 char-servers

  • char-server A
    • set just like your normal setup
    • map-server A.1
      • set just like normal setup
  • char-server B
    • copy conf/char_athena.conf as conf/char_athena2.conf
    • change the userid: s2
    • change the passwd: p2
    • change the server_name: rAthena-2
    • change the char_port: 6122
    • map-server B.1
      • copy conf/map_athena.conf as conf/map_athena2.conf
      • change the userid: s2
      • change the passwd: p2
      • change the char_port to match char-server B, 6122
      • change the map_port: 5122
      • in addition maybe you later can copy conf/battle/* to conf/battle2/*, so just do this int this example. So you need to copy conf/battle_athena.conf to conf/battle2/battle_athena.conf

MySQL Databases

  1. DB1
    1. Create database with name (if default is) ragnarok
    2. Do normal config, import everything just like normal config
  2. DB2
    1. Create database with name  ragnarok2 
    2. Do normal config, import everything just like normal config

inter_athena.conf setup

  1. Inter-1
    1. set as normal setup
  2. Inter-2
    1. copy conf/inter_athena.conf as conf/inter_athena2.conf
    2. set as normal setup
    3. change the char_server_id to  ragnarok2 
    4. change the map_server_id to  ragnarok2 
    5. change the log_db_id to  ragnarok2 

Run the servers

  1. Run login-server
  2. Run char-server A and map-server A1 just like running a server
  3. For the 2nd server (char-server B and map-server B.1) follow this
    1. You can run manually by open command line or copy the charserv.bat and mapserv.bat file (that's why I against deleting .bat file in compilation), by following
    2. char-server.exe--inter-config conf/inter_athena2.conf --char-config conf/char_athena2.conf
    3. map-server.exe --inter-config conf/inter_athena2.conf --map-config conf/map_athena2.conf --battle-config conf/battle2/battle_athena.conf

 

1 Char-Server with Multiple Map-servers

  • By simple examples you want 2nd map-server have towns only
  • And this map-servers are part of Char-Server B
  • be careful between map_athena and maps_athena, there's "s" and there is not.

Map-Server B.1

  1. From conf/map_athena2.conf
    • Change import: conf/maps_athena.conf to import: conf/maps_athenaB1.conf
  2. Copy conf/maps_athena.conf to conf/maps_athenaB1.conf
  3. Remove/comment payon, prontera, izlude, morocc, and other cities from this map-server in file conf/maps_athenaB1.conf
  4. Copy npc/script

Map-server B.2

  1. Copy conf/map_athena2.conf to conf/map_athena2a.conf
    1. Set map_port: 5123 (5121 used for Map-server B.1, while 5122 for B.2)
    2. Change import: conf/maps_athenaB1.conf to import: conf/maps_athenaB2.conf
  2. Make a new file conf/maps_athenaB2.conf
  3. Add the entries 
    map: payon
    map: prontera
    map: izlude
    map: morocc
    // ...

     

  4. Now re-run the Map-server B2 then following by B3
    1. map-server.exe --inter-config conf/inter_athena2.conf --map-config conf/map_athena2.conf --battle-config conf/battle2/battle_athena.conf
    2. map-server.exe --inter-config conf/inter_athena2.conf --map-config conf/map_athena2a.conf --battle-config conf/battle2/battle_athena.conf
  5. Your map-servers will be run wil neat error messages because missing NPC LOL. Because map-server will hardcoded-ly reads NPC scripts listing from /npc/[pre-]re/scripts_main.conf, you can redefine the path in config file LOL. That's why I say this setup is lazy, because I lazy to copy 'rathena' dir to another dir > then to give an example to remove unnecesary NPCs

 

Known Multi Server Issues

Multi Char-server issues

  • None yet

Multi Map-server issues

  • Some atcommands, such who commands
  • Calling player from other map-server, such Emergency Call skill
  • Channel System
  • Guild storage dupe, yeah, never enable (at)gstorage command if you run this mode
  • The rest later, I forgot all topic references
  • Map-server reads scripts_main.conf from same root directory, can redefine

Image, video, or any materials to make this tutorial can be fancier, will be added later (so much later....)

  • Upvote 5
  • Love 1
  • MVP 2
  • Like 1
Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  99
  • Reputation:   2
  • Joined:  02/23/14
  • Last Seen:  

Good topic.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

Maybe you can also extend the guide for 1 login -> multi char -> multi map on different VMs. Seen an question about it.

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   0
  • Joined:  08/20/17
  • Last Seen:  

i did the 1 login server 2 character it works but when i try to login to the second server i just stay on loading after server selection till i get timed out 

[Info]: request connect - account_id:2000000/login_id1:1339871948/login_id2:2014410845
[Info]: Session #7 timed out
 

the main emulatuor is rathena and the other one is 3CeAM

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

On 11/26/2018 at 10:41 AM, omar said:

the main emulatuor is rathena and the other one is 3CeAM

you really can't expect two different emulators to work with each other seamlessly unless you create a compatibility layer in-between them.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   0
  • Joined:  08/20/17
  • Last Seen:  

26 minutes ago, Ninja said:

you really can't expect two different emulators to work with each other seamlessly unless you create a compatibility layer in-between them.

yea i realized that i though 3CeAM was rathena based not eathena but idk how to delete comment @@

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  236
  • Reputation:   189
  • Joined:  11/27/11
  • Last Seen:  

And what about 1 login-server, 2 char-server, 1 map-server.

Is this configuration possible? ? 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   76
  • Joined:  06/13/13
  • Last Seen:  

On 3/14/2020 at 12:03 AM, Vykimo said:

And what about 1 login-server, 2 char-server, 1 map-server.

kindly ask what is the purpose of this? afaik char server is only responsible for saving data, as for multi map server is for like other game online where the same map channel, it some scenario is like boss poring is killed in map channel a and not yet on the channel b or so

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  99
  • Reputation:   2
  • Joined:  02/23/14
  • Last Seen:  

can work on linux ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  05/10/12
  • Last Seen:  

Hi there,

I wanna dig up à bit on this not-that-new thread, as I have some issue running multiple serveur with 1 login.

 

My goal is to have 2 char/map connecting to 1 login, and 1 database (on the same machine). 

 

The first set (calling it Stable) seems to run fine when launched alone.

The second set (calling it PK) seems to run fine when launched alone too.

Note: the logon server used in both case is the same.

But here is the fail.

With the main login running, the first Char I run runs fine, but the second one fail to connect (login report credentials may be wrong). Doesnt matter which ordre, Stable-> PK or PK->Stable, the second one always fail with same error.

Servers are in their own folders, login is in Stable. Each conf files are modified properly, without mixing them, in each folder for their respective server. (Properly but i guess not correctly...)

In the databse i have 2 'S' account with different IDs, one for each. I tried with using the same account, same result.

 

I guess I am doing something dumbly wrong. I'm ready to get anyone's idea.

Thanks for your time.

 

EDIT - Short update, after creating a new player account (200000) and trying to connect, I have an Unregistered ID error. Seems like it's a server/database communication bias ? But when I'm changing the char/map account in the databse to unmatch them from conf files, Serveurs can't connect anymore. I am a bit lost here o.O

 

EDIT2 - Seems to be a stupid error on the backend side. I changed the software of the AMP stack, and it works finally correctly. (Well, now I have another issue, but not related to this topic)

Edited by Bucheron
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...