Mr Garrison
Member
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?
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.
state.Send(new CharacterList(state.Account, state.CityInfo));
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.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.
Try this one RedDragon,
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.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
...??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));
Run UO is not responding. Can you post the file for those of us with that problem?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.
And this will show all shards?You can use a single IP with multiple listening ports; 2593, 2594, etc.
As requested enjoy
Basically set up for home use but you can change the 2 IP address for your servers.
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.....????
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;
}
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;
}
private static IPEndPoint[] m_ListenerEndPoints = new IPEndPoint[]
{
new IPEndPoint( IPAddress.Any, 2594 ),
};
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;
}
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).
it works with old client(6.0), but with latest client, it doesn’t work.
I would definitely still be interested in seeing this work fully.So funny story.... My friend was logged into his account on my computer when I posted the above message. So that message from Squ1sh is actually from me. Sorry for the confusion.
I created a pull request on my friend's fork for this functionality. It works locally for me for both issues but would not mind some more eyes on it before I make a pull request to the main github.I would definitely still be interested in seeing this work fully.
I appreciate it! However, I can't approve a PR for this feature as it adds a lot more complexity that the average user won't need.I created a pull request on my friend's fork for this functionality. It works locally for me for both issues but would not mind some more eyes on it before I make a pull request to the main github.
Here is a link to the PR: Multi shard changes by noodleses · Pull Request #9 · squ1sh/ServUO
We use essential cookies to make this site work, and optional cookies to enhance your experience.