|
||
|
|||||||
| Server Support on Windows Get (and give) support on general questions related to the RunUO server itself. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
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.. ![]() |
|
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Location: In My Cold Cell
Age: 44
Posts: 1,848
|
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. |
|
|
|
|
|
#6 (permalink) |
|
Moderate
Join Date: Nov 2002
Location: USA
Posts: 6,598
|
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 |
|
|
|
|
|
#8 (permalink) |
|
Moderate
Join Date: Nov 2002
Location: USA
Posts: 6,598
|
Absolutely!
![]()
__________________
David Forum Moderator The RunUO.com Forum Moderator Team Forum Rules and Guidelines RunUO Forum Search Engine Download RunUO 2.0 RC2 |
|
|
|
|
|
#10 (permalink) |
|
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! ![]() |
|
|
|
|
|
|
#11 (permalink) |
|
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 ![]() |
|
|
|
|
|
|
#12 (permalink) |
|
Moderate
Join Date: Nov 2002
Location: USA
Posts: 6,598
|
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 |
|
|
|
|
|
#13 (permalink) |
|
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 ![]() |
|
|
|
|
|
|
#20 (permalink) |
|
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. |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|