Multiple shards on one server?

Mr Garrison

Active Member
Jul 24, 2014
43
3
25
Forsyth, Georgia
Shard Name
Resurrection
Is there anyway i can have multiple shards on one server or under same ip so that they show up like on OSI with their full list?
 

RedDragon

Active Member
Dec 19, 2013
34
1
31
Shard Name
RedDragonUO
Donate
Donate money to this user
Code:
scripts
Failed with: 1 errors, 0 warnings                     
Errors:                       
+ Misc/ServerList.cs:
  CS1729: Line 412: The type `Server.Network.CharacterList' does not contain a
constructor that takes `2' arguments                         
Scripts: One or more scripts failed to compile or no script files were found.
...??

Code:
state.Send(new CharacterList(state.Account, state.CityInfo));
 

Nissi

Member
Jan 8, 2015
17
3
Ok, i read the link above:
http://www.runuo.com/community/threads/running-two-runuo-servers-on-one-computer.517745/

From Vorspire:
I'll just throw this in as it doesn't seem to be noted in that linked thread;
It is highly recommended that each instance of RunUO has it's own dedicated set of UO files, or full UO installation.
For example;
Server 1: C:/Program Files (x86)/EA Games/Ultima Online Classic/Server1
Server 2: C:/Program Files (x86)/EA Games/Ultima Online Classic/Server2
This will stop any file access violation issues that may occur now or in the future when you've developed your shard a bit.
You will need to modify DataPath.cs and provide the relevant path for that server instance.
You don't have to do this, but it's better to be safe than sorry.

** I don't find any reference to how this needs modified **

Initially what i tried seemed to work, everything loaded fine, but then switched my local ip address to something else. So the server came up, but would not let me log into either of the shards. When i tried to figure out a way to keep it to the same ip address, i get the error below:
ServerList2.png

Will keep trying to figure it out, but if anyone could make some recommendations, would be great.

** the initial try that seemed to work, but would not let me log onto either shard, ends with saying that i have Listening on both my pc ip and my local network ip, but then lists that
Listener Failed: 0.0.0.0.2593 (In Use)

thanks
 
Last edited:

Nissi

Member
Jan 8, 2015
17
3
Looking at it now, thx - hope it shows me what i missed

**Ok, i read before that you needed to make sure you had two different UO files, not servUO files?**
Ok Now make a Second copy of this to replace the ServerList.cs in your second Servers Scripts/Misc folder
This Time when you change the Server Names it should look like this
RunUO Siege Perilous Build
RunUO ML Build
**So i need two different ServUO servers?**

This also says nothing in regards to the DataPath.cs file?
 
Last edited:
  • Like
Reactions: Milva

Milva

Admin
Moderator
Mar 3, 2013
4,341
513
Donate
Donate money to this user
Since you want one login for 2 servers- yes you need 2 servers - which ever you plan on using or connecting to
be it Runuo or ServUO , etc.
you will need to set the datapath on each server (as usual) Maybe other's who have completed this will help out :)
 

Nissi

Member
Jan 8, 2015
17
3
ok, i have the two servers, and two uo files. i start up both server instances, they both come up no issues. I even have it now where i am able to log in, but only if i use the ip for my pc 127.0.0.1. when i do log in using this ip, no matter which of the two shards i log into, it loads my gm account on the first created server. (so its still pulling info from the initial server, it even has added custom scripts - and it should be blank)

if i try to use my normal ip for network 192.168.1.116, once i enter password and enter for login, it freezes. (image)

(also, the server load has all this jacked up html code, for trying to find my ip address, i just want it on a local network)
Login_Network IP.png
 

Jack

Well-Known Member
Sep 23, 2014
163
33
Auckland, New Zealand
Shard Name
Lost Lands
I've used the above script in the past to run 2 servers on one computer and have them in a common shard list on login. It works. But there is an additional issue with it (which I never even attempted to solve).

Let's say you have shard 1 and 2. Shard 1 is handling the login and forwarding players onto shard 2 if they select it from the shard list. But the account is created on shard 1, now once you pick shard 2, the account information isn't there and the process halts. IIRC this process will only work if the account exists on both shards and has the same password on both shards.

So if someone creates a new account, then selects shard 2, the login info doesn't exist and the process will halt.

You would need some process where the login data is checked on shard 2, if the account doesn't exist, it is created, and then the player logs directly into the character screen from there. However it has additional problems: what happens if someone uses the port of shard 2 to log directly into that one? What happens if someone changes their account password on one of the shards? The changes are not shared between the two shards, and can lead to the passwords conflicting between the two, making it impossible to log into one of them through the shard list screen. So unless I'm missing something, there needs to be a rewrite of how accounting is handled for this to work effectively.
 
Last edited:

The_Real_Jeff

Well-Known Member
May 9, 2015
108
30
39
California
I've used the above script in the past to run 2 servers on one computer and have them in a common shard list on login. It works. But there is an additional issue with it (which I never even attempted to solve).

Let's say you have shard 1 and 2. Shard 1 is handling the login and forwarding players onto shard 2 if they select it from the shard list. But the account is created on shard 1, now once you pick shard 2, the account information isn't there and the process halts. IIRC this process will only work if the account exists on both shards and has the same password on both shards.

So if someone creates a new account, then selects shard 2, the login info doesn't exist and the process will halt.

You would need some process where the login data is checked on shard 2, if the account doesn't exist, it is created, and then the player logs directly into the character screen from there. However it has additional problems: what happens if someone uses the port of shard 2 to log directly into that one? What happens if someone changes their account password on one of the shards? The changes are not shared between the two shards, and can lead to the passwords conflicting between the two, making it impossible to log into one of them through the shard list screen. So unless I'm missing something, there needs to be a rewrite of how accounting is handled for this to work effectively.
This is why you need a central account database, that both servers connect to. Zippy released this a really long time ago, not even sure it still works, but essentially this would solve that issue (http://www.runuo.com/community/threads/mysql-php-account-management.487386/). You can see my comment on that page about how it has a SQL Injection vulnerability, so you would have to fix that, but you can just use this as an example of how sql account management would work.
 
  • Like
Reactions: cmileto

Nissi

Member
Jan 8, 2015
17
3
Thanks for the feedback all - I have this shard for my family at home to play, and a couple friends from time to time, that is my only purpose. Its fun, but very new at the modification bit. I think at this point, im better off just having a second server to test stuff in, when needed. I want to experiment with custom maps, and was thinking this would be a method to prevent screwing it all up. Seems i have achieved the opposite.

Thanks again
 

Neshoba

Well-Known Member
Feb 1, 2016
325
18
if your running a live shard and a test shard 1 needs to be on a different port I run 2 a tester and a live and have 6 ports forwarded for everthing to connect in both and be separate 1 is Neshobas World(liveshard) listening on port 2593 UOA is listening on 2394 ,,, other is a tester(testshard) listening on 2595 uao on port 2596 not sure if this will help much as I am running on JustUo
 

Tom Leaf

Member
Apr 25, 2017
12
0
48
if your running a live shard and a test shard 1 needs to be on a different port I run 2 a tester and a live and have 6 ports forwarded for everthing to connect in both and be separate 1 is Neshobas World(liveshard) listening on port 2593 UOA is listening on 2394 ,,, other is a tester(testshard) listening on 2595 uao on port 2596 not sure if this will help much as I am running on JustUo
I just have 2 test shards and so for test1 I have on port 2593 but no matter what I try to do I can't seem to get the test2 to listen to any other port. oh and just to be clear I have each test shard running on their own virtual machine so the UO server files are completely isolated from each other unless they are connected through a script file like the one posted above.
 
Last edited:

Sharky

Member
Oct 19, 2015
12
0
43
Code:
scripts
Failed with: 1 errors, 0 warnings                    
Errors:                      
+ Misc/ServerList.cs:
  CS1729: Line 412: The type `Server.Network.CharacterList' does not contain a
constructor that takes `2' arguments                        
Scripts: One or more scripts failed to compile or no script files were found.
...??

Code:
state.Send(new CharacterList(state.Account, state.CityInfo));
//state.Send(new CharacterList(state.Account, state.CityInfo));
state.Send(new CharacterList(state.Account, state.CityInfo, state.IsEnhancedClient));
 

ETsCat

Well-Known Member
Jun 18, 2013
195
10
69
Shard Name
Dragon's Lair
This is why you need a central account database, that both servers connect to. Zippy released this a really long time ago, not even sure it still works, but essentially this would solve that issue (http://www.runuo.com/community/threads/mysql-php-account-management.487386/). You can see my comment on that page about how it has a SQL Injection vulnerability, so you would have to fix that, but you can just use this as an example of how sql account management would work.
Run UO is not responding. Can you post the file for those of us with that problem?