Multiple shards on one server?

Sharky

Member
Oct 19, 2015
12
0
43
The centralized database sql Runuo link is broken, even if you found it a lot or core edits.

Someone released a ServUO using database system but I think that is in early stage not only that but not the latest. Publish 53 from what I recall.

As for Mr Fixits serverlist.cs using one IP only use would be production server and test centre as without creating a account on the production server your find the test centre server will freeze on trying to make a account.

The only other way round it for multiple servers is either purchasing another which be costly, or the other option ordering another IP and setting the second server to run on that IP.

Kinda long but it’s late and doing all this via phone.

Hope this gives you some insight.
 

Sharky

Member
Oct 19, 2015
12
0
43
I submitted the cs couple weeks ago but yeah that did not work so i will submit the serverlist.cs that i have a maybe someone can share some light on how to configure it properly.

Assuming you need to copy the serverlist.cs on server 1 and server 2 and configure accordingly.
 

Attachments

Aschnyder26

Well-Known Member
Jul 6, 2016
257
24
Atlanta, GA
www.kalvasflam.org
Shard Name
Kal Vas Flam
I used your Serverlist.cs and was able to get this working. I ran 2 servers at once one on port 2593 and the other on 2594. Both have the modified Serverlist.cs. I was able to log into either server using one client connected to 2593 through the server selection at login. The first server was configured in this way:
Code:
        public static string Address = "127.0.0.1";        // Server Address Goes Here
        public static string AddressA = "127.0.0.1";
        public const int Port = 2593;
        public const int PortA = 2594;    //Only one port listing.....????
Then further down the same port config:
Code:
                if (ipAddr != null)
                {
                    e.AddServer(ServerName, new IPEndPoint(ipAddr, 2593 ));//  Place the port that you are using here.
                    e.AddServer(ServerNameA, new IPEndPoint(ipAddr, 2594));
                }
                else
                {
                    e.Rejected = true;
                }
Now on the second server you use the same settings, you only need to change the lower part of the script and swap the ports to reflect the port server 2 is using:
Code:
                if (ipAddr != null)
                {
                    e.AddServer(ServerName, new IPEndPoint(ipAddr, 2594 ));//  Place the port that you are using here.
                    e.AddServer(ServerNameA, new IPEndPoint(ipAddr, 2593));
                }
                else
                {
                    e.Rejected = true;
                }
Finally change the port on server 2 to reflect the correct port in SocketOptions.cs (2594) in this case:
Code:
        private static IPEndPoint[] m_ListenerEndPoints = new IPEndPoint[]
		{
			new IPEndPoint( IPAddress.Any, 2594 ),
			
		};
I am using RunUO but if you are using ServUO you can probably just change the socket in the config file. I only tested this locally and results may vary if you are using an outside server address.

Edit: I did test this on a remote server and it works just fine. You can check the result @ 131.153.100.69, 2593 for a short time until the IP goes down. lol The server is setup for client 4.0.6 but you should still be able to log in with modern clients it may just look weird.
 
Last edited:
Oct 12, 2016
12
1
30
Hi there,
First of all I am trying to learn c# thats bacause i am trying to make a custom uo shard to do some practice.
I believe i did exactly the same as it is explained here but the second server still says Listener Failed: 0.0.0.0:2593 (In Use)
Is it because of my miscorrection or because of the version?

Any help is appreciated :)
 

Attachments

Vorspire

Vita-Nex: Core
Admin
ServUO Developer
Jul 29, 2013
1,146
251
32
United Kingdom
core.vita-nex.com
Shard Name
Ultima Shards: Multiverse
Donate
Donate money to this user
Just a tip for deciding configurations... If you detect which server you're launching based on the path to the exe, you can determine which settings to use for that server.

Server A in C:/UO/Shard A/
Server B in C:/UO/Shard B/

In code you can do something like (purely example);
Code:
string ip;
int port;

if( Core.BaseDirectory.Contains("Shard A") )
{
    ip = "192.168.0.2";
    port = 2593;
}
else if( Core.BaseDirectory.Contains("Shard B") )
{
    ip = "192.168.0.3";
    port = 2593;
}
else
{
    ip = "127.0.0.1";
    port = 2593;
}
This way, Shard A and B can both use the *same* code-base.

Note that the ip changes in the 3 examples, but the port doesn't. This will work if you have multiple ip's on your server and resolve them properly. Each individual ip has its own set of ports allocated, so they never "cross over" or "conflict". They are seen as being like different computers, but its really just multiple network interfaces on the same computer.

Ideally you'd want a stand-alone shard running that literally only handles login requests and redirects players to either Shard A or B. In this case, the "login" server needs to be able to communicate with A and B in order to push a login request and retrieve the login seed for use with forwarding to the correct shard (once a shard is selected from the list).
 
Oct 12, 2016
12
1
30
I believe i couldnt explain my problem clear enough sorry about that.
I am trying to make 2 servers with 2 different uo directory and 2 different server side files which both can be shown with the same login info.
But thanks either way for your help in advance :)
 

Aschnyder26

Well-Known Member
Jul 6, 2016
257
24
Atlanta, GA
www.kalvasflam.org
Shard Name
Kal Vas Flam
Ideally you'd want a stand-alone shard running that literally only handles login requests and redirects players to either Shard A or B. In this case, the "login" server needs to be able to communicate with A and B in order to push a login request and retrieve the login seed for use with forwarding to the correct shard (once a shard is selected from the list).
That is exactly how OSI had it setup when they separated the servers into shards. They probably still have it setup that way. LOL Watch at 24:50 below.

 
Last edited:

yayafan

Well-Known Member
Oct 25, 2015
80
0
39
Did any one try this multiple server with latest ServUO and client ? I did exactly same modification as above , I can see the second server when I login, but after I choose the second server in server list, then my client stuck before show character list.
 

danielsheep

Member
Mar 19, 2018
15
0
40
it works with old client(6.0), but with latest client, it doesn’t work.
I have been worked to run 2 different version of UO shards on a server. (Newest uo and T2A uo)
Yeh, I have exactly same problem you mentioned.
Can nobody help?