Go Back   RunUO - Ultima Online Emulation > RunUO > Server Support on Windows

Server Support on Windows Get (and give) support on general questions related to the RunUO server itself.

Reply
 
Thread Tools Display Modes
Old 12-22-2003, 05:33 PM   #1 (permalink)
 
Join Date: Oct 2002
Posts: 34
Send a message via ICQ to ZpiFF
Default Hanging at Connecting to Shard

I know there has been many questions about this before, I just couldn't find an answer for this.. I have a very simple setup that just dosen't work:

I have a LAN in my house with 2 computers. The computers are connected with a router with an implemented switch, so I don't think that my two computers are running THROUGH the router, just the switch. Just in case, I have disabled the firewall.

It works perfectly to log in on my runuo server from the machine im running the server on, but when I try to connect with the other computer, it hangs at Connecting to shard.

I use only local adresses (192.168.1.70 (the server) and 192.168.1.10 (the other computer) and all network settings work fine.

I tried replacing null; in ServerList.cs with 192.168.1.70 (the server) but that didn't work..

Please help me!

Is this fixed in beta 36? I use beta 35, but im afraid of updating since i have been modifying a lot of scripts..

ZpiFF is offline   Reply With Quote
Old 12-22-2003, 06:06 PM   #2 (permalink)
Forum Expert
 
Mortis's Avatar
 
Join Date: Oct 2002
Location: In My Cold Cell
Age: 44
Posts: 1,848
Default

Try this one it will put another listing on your connection called Local Server you can connect to VIA Lan.

[code:1]using System;
using System.Net;
using Server;
using Server.Network;

namespace Server.Misc
{
public class ServerList
{
/* Address:
*
* The default setting, a value of 'null', will attempt to detect your IP address automatically:
* private const string Address = null;
*
* This detection, however, does not work for servers behind routers. If you're running behind a router, put in your IP:
* private const string Address = "12.34.56.78";
*
* If you need to resolve a DNS host name, you can do that too:
* private const string Address = "shard.host.com";
*/

public const string Address = null;

public const string ServerName = "RunUO Test Center";

public static void Initialize()
{
Listener.Port = 2593;

EventSink.ServerList += new ServerListEventHandler( EventSink_ServerList );
}

public static void EventSink_ServerList( ServerListEventArgs e )
{
try
{
IPAddress ipAddr;

if ( Resolve( Address != null ? Address : Dns.GetHostName(), out ipAddr ) )
{
e.AddServer( ServerName, new IPEndPoint( ipAddr, Listener.Port ) );
bool resolved = Resolve("192.168.1.70", out ipAddr );
e.AddServer( "Local Server", new IPEndPoint( ipAddr, Listener.Port ) );
}
else
e.Rejected = true;
}
catch
{
e.Rejected = true;
}
}

public static bool Resolve( string addr, out IPAddress outValue )
{
try
{
outValue = IPAddress.Parse( addr );
return true;
}
catch
{
try
{
IPHostEntry iphe = Dns.Resolve( addr );

if ( iphe.AddressList.Length > 0 )
{
outValue = iphe.AddressList[iphe.AddressList.Length - 1];
return true;
}
}
catch
{
}
}

outValue = IPAddress.None;
return false;
}
}
} [/code:1]
__________________
I'm waiting in my cold cell when the bell begins to chime
Reflecting on my past life and it doesn't have much time.
Mortis is offline   Reply With Quote
Old 12-24-2003, 10:55 AM   #3 (permalink)
 
Join Date: Oct 2002
Posts: 34
Send a message via ICQ to ZpiFF
Default

Where shall I put this? (What file).
Do I have to modify anything for my server in this code?

Thanks, I will try this
ZpiFF is offline   Reply With Quote
Old 12-25-2003, 11:01 AM   #4 (permalink)
 
Join Date: Oct 2002
Posts: 34
Send a message via ICQ to ZpiFF
Default

Tried it but it didn't work as expected. Thanks for helping anyways
ZpiFF is offline   Reply With Quote
Old 12-25-2003, 01:29 PM   #5 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by ZpiFF
Tried it but it didn't work as expected. Thanks for helping anyways
Try again, thats what you need to do if you want to be able to login intro your lan shard.
Phantom is offline   Reply With Quote
Old 12-25-2003, 01:59 PM   #6 (permalink)
Moderate
 
David's Avatar
 
Join Date: Nov 2002
Location: USA
Posts: 6,598
Default

It may simply be the Beta 35 login bug. Try attempting to connect, close the client when it fails and then connect again.
__________________
David Forum Moderator
The RunUO.com Forum Moderator Team

Forum Rules and Guidelines
RunUO Forum Search Engine
Download RunUO 2.0 RC2
David is offline   Reply With Quote
Old 12-25-2003, 02:40 PM   #7 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Upgrade To Beta 36 if your using Beta 35
Phantom is offline   Reply With Quote
Old 12-25-2003, 04:02 PM   #8 (permalink)
Moderate
 
David's Avatar
 
Join Date: Nov 2002
Location: USA
Posts: 6,598
Default

Absolutely!
__________________
David Forum Moderator
The RunUO.com Forum Moderator Team

Forum Rules and Guidelines
RunUO Forum Search Engine
Download RunUO 2.0 RC2
David is offline   Reply With Quote
Old 12-25-2003, 06:32 PM   #9 (permalink)
shadeuo
Guest
 
Posts: n/a
Default

i had a problem close to this. what version client are you using? i updated my client and i connect fine.
  Reply With Quote
Old 12-29-2003, 12:00 PM   #10 (permalink)
 
Join Date: Oct 2002
Posts: 34
Send a message via ICQ to ZpiFF
Default

Upgraded to Beta36 now to test but this didn't solve the problem

I just don't get it! Theres no magic about my LAN! Damn it..

Its just a switch with a couple of computers conencted to it, where one of the computers are running the server..

PC-----SWITCH-----PC(Running RunUO)

HELP!
ZpiFF is offline   Reply With Quote
Old 12-29-2003, 09:47 PM   #11 (permalink)
 
Join Date: Oct 2002
Posts: 34
Send a message via ICQ to ZpiFF
Default

Tried changing null; to the IP of my router and enabled the port forwarding in my router. Instead of just hanging at connecting to shard, it now gives me the error message about "Couldnt attach to server, taken down bla bla bla"

I added the LocalServerAddress to my serverlist.cs also and everything all tutorials say but it still dosen't work.

Im almost going bananas Im having a LAN and we planned playing on my custom shard but this just don't work.

All other posts about this in the forums also ends up with no solution, so im just hoping this one will end up with one

Thanks for all help anyways guys
ZpiFF is offline   Reply With Quote
Old 12-29-2003, 11:35 PM   #12 (permalink)
Moderate
 
David's Avatar
 
Join Date: Nov 2002
Location: USA
Posts: 6,598
Default

Well I think that threads end up with no solution because when people figure out the solution they stop posting to the thread.

You have actually given a few hints but few details. What type of router do you have for example?
__________________
David Forum Moderator
The RunUO.com Forum Moderator Team

Forum Rules and Guidelines
RunUO Forum Search Engine
Download RunUO 2.0 RC2
David is offline   Reply With Quote
Old 12-30-2003, 04:05 PM   #13 (permalink)
 
Join Date: Oct 2002
Posts: 34
Send a message via ICQ to ZpiFF
Default

I have a Netopia router wich I got from my ISP. I forwarded port 2593 to my server (10.0.0.7 is the IP given to me by DHCP), and my routers IP is 10.0.0.1.

I read in one of the tutorials that my Serverlist.cs should point to my router and my router should forward the port to my server, and this is how I got the "couldnt attach to bla bla". Before that i had the ip to the server in the serverlist.cs file, but then it just hanged at connecting to shard..

Now I use both public IP and router IP in my serverlist.cs. this is my serverlist.cs after upgrading to beta 36:

[code:1]
using System;
using System.Net;
using System.Net.Sockets;
using Server;
using Server.Network;

namespace Server.Misc
{
public class ServerList
{
/* Address:
*
* The default setting, a value of 'null', will attempt to detect your IP address automatically:
* private const string Address = null;
*
* This detection, however, does not work for servers behind routers. If you're running behind a router, put in your IP:
* private const string Address = "12.34.56.78";
*
* If you need to resolve a DNS host name, you can do that too:
* private const string Address = "shard.host.com";
*/

public const string Address = "80.202.66.245";

public const string LocalServerAddress = "10.0.0.1";

public const string ServerName = "Ugleland";

public static void Initialize()
{
Listener.Port = 2593;

EventSink.ServerList += new ServerListEventHandler( EventSink_ServerList );
}

public static void EventSink_ServerList( ServerListEventArgs e )
{
try
{
IPAddress ipAddr;

if ( Resolve( Address != null && !IsLocalMachine( e.State ) ? Address : Dns.GetHostName(), out ipAddr ) )
e.AddServer( ServerName, new IPEndPoint( ipAddr, Listener.Port ) );
else
e.Rejected = true;
}
catch
{
e.Rejected = true;
}
}

public static bool Resolve( string addr, out IPAddress outValue )
{
try
{
outValue = IPAddress.Parse( addr );
return true;
}
catch
{
try
{
IPHostEntry iphe = Dns.Resolve( addr );

if ( iphe.AddressList.Length > 0 )
{
outValue = iphe.AddressList[iphe.AddressList.Length - 1];
return true;
}
}
catch
{
}
}

outValue = IPAddress.None;
return false;
}

private static bool IsLocalMachine( NetState state )
{
Socket sock = state.Socket;

IPAddress theirAddress = ((IPEndPoint)sock.RemoteEndPoint).Address;

if ( IPAddress.IsLoopback( theirAddress ) )
return true;

bool contains = false;
IPHostEntry iphe = Dns.Resolve( Dns.GetHostName() );

for ( int i = 0; !contains && i < iphe.AddressList.Length; ++i )
contains = theirAddress.Equals( iphe.AddressList[i] );

return contains;
}
}
}
[/code:1]

Thanks for all help
ZpiFF is offline   Reply With Quote
Old 12-30-2003, 04:30 PM   #14 (permalink)
Forum Expert
 
Join Date: Jun 2003
Location: around
Posts: 1,376
Send a message via ICQ to bean56 Send a message via AIM to bean56
Default

Did you check to see what it says on server when you try to connect from other computer? Did you remember to change account.cs so one ip can have more than one account, if you didn't that could be your problem.
bean56 is offline   Reply With Quote
Old 12-30-2003, 05:29 PM   #15 (permalink)
 
Join Date: Oct 2002
Posts: 34
Send a message via ICQ to ZpiFF
Default

The different computers on my LAN have different IPs but on the public IP this may be a problem. How do I fix this problem?

Thanks for the new idea
ZpiFF is offline   Reply With Quote
Old 12-30-2003, 06:19 PM   #16 (permalink)
Forum Expert
 
Join Date: Jun 2003
Location: around
Posts: 1,376
Send a message via ICQ to bean56 Send a message via AIM to bean56
Default

well even on my lan it still uses my actual ip when i connect no matter if i use lan ip to connect or not, so you go into account.cs and change like 4th line to 3 or wutever many accounts per ip you want.
bean56 is offline   Reply With Quote
Old 12-30-2003, 07:31 PM   #17 (permalink)
 
Join Date: Oct 2002
Posts: 34
Send a message via ICQ to ZpiFF
Default

But where in account.cs? Don't know where to edit.. Hope it works
ZpiFF is offline   Reply With Quote
Old 12-30-2003, 07:35 PM   #18 (permalink)
Forum Expert
 
Join Date: Jun 2003
Location: around
Posts: 1,376
Send a message via ICQ to bean56 Send a message via AIM to bean56
Default

my bad it's accounthandler.cs, just change line
[code:1]private static int MaxAccountsPerIP = 1;[/code:1]
to however many accounts you want each ip to be able to have.
bean56 is offline   Reply With Quote
Old 12-30-2003, 08:55 PM   #19 (permalink)
 
Join Date: Oct 2002
Posts: 34
Send a message via ICQ to ZpiFF
Default

Tried it but it didn't work Kinda ironic though. This server is created for multiplay but multiplaying dosen't work I hope it will work for me later.. Maybe in another version

Thanks guys! Feel free to try more solutions
ZpiFF is offline   Reply With Quote
Old 01-01-2004, 03:25 PM   #20 (permalink)
 
Join Date: Oct 2002
Posts: 34
Send a message via ICQ to ZpiFF
Default

Do you think the problem is the server, the client (program), the scripts or the router?

It's kinda annoying that a network-only game dosen't work on a network

Heard that it could be a problem with the client version and the beta 35 version of runuo and it should be fixed in 36, but it dosen't seem like it.

I don't wanna give this up.. Just switched from UOX and thought runuo was so incredible, so I don't wanna give up the best server ever



Edit: Is it because i run a custom map? I just can't figure it out.
ZpiFF is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5