WAN connections - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: WAN connections (/Thread-WAN-connections) |
WAN connections - richm - 03-27-2017 09:53 AM Hi Guys I am having issues with external connections to the server. LAN connections connect fine, but WAN connections get the following error after the server selection screen: "The client could not attach to the game server. It must have been taken down, please wait a few minutes and try again.". On the console, this is what I see: 00:43:5:Client connected [Total:1] ('<my external IP>' 1/1) 00:43:5:Login 'richm' 00:43:5:Client disconnected [Total:0] ('<my external IP>', acct='richm') my sphere.ini [SERVER] settings are commented out, and in the triggers script I have the following under the server_start trigger: SERV.SERVIP=myhost.no-ip.org I've also tried: SERV.SERVIP=<my external IP> but it makes no difference. I am using the standard 2593 port, which has been forwarded to my server on the router. Canyouseeme.org reports success when checked. Windows Firewall is disabled. I tried to enable it and then allow sphereserver as an exception but it made no difference. When the server starts, it reports this: Monitoring IP 192.168.1.81:2593 (TCP) - Main server This is obviously an internal LAN address. I added a log command into the triggers file for when a client tries to connect, and this is the result: 00:39:(sphere_serv_triggers.scp,55)serv ip is <my external IP> I'm out of ideas.... google and forum searches and thrown up nothing... This is the same setup I used about 2/3 years ago and it worked fine back then. If I put in http://myhost.no-ip.org it redirects to my webserver, so I know the port forwarding is working. If I put in http://myhost.no-ip.org:2593 it errors, with an "empty response". Any help is appreciated. edit: not sure it is relevant but I am using client 7.0.20.0 RE: WAN connections - Coruja - 03-27-2017 11:15 AM I can't see nothing wrong on your setup, because port forwarding is working fine, firewall is disabled, external IP is already set on sphere, and client is able to connect on sphere. But strangely the client is getting disconnected with no reason try enable DebugFlags DEBUGF_NETWORK on sphere.ini to get more detailed console msgs about network, maybe this will point the reason why the client is getting disconnected RE: WAN connections - richm - 03-28-2017 04:47 AM Thanks Coruja for getting back to me... I hope this makes more sense to you than it does for me...! The IP seems to have changed??? 19:41:0:Client connected [Total:1] ('<my external ip>' 1/1) 19:41:(sphere_serv_triggers.scp,55)serv ip is <my external ip> 19:41:0:Login 'richm' 19:41:0:Client disconnected [Total:0] ('<my external ip>', acct='richm') Server is being PAUSED for Resync Resync Restart WARNING:Resource 'sphere.ini' changed, resync. Indexing 559 scripts... Done loading scripts (91 of 199 triggers used) Resync complete! 19:42:DEBUG:Receiving new connection. 19:42:DEBUG:Retrieving IP history for '<my external ip>'. 19:42:DEBUG:Incoming connection from '<my external ip>' [blocked=0, ttl=226, pings=0, connecting=0, connected=0] 19:42:DEBUG:1:Allocated slot for client (928). 19:42:DEBUG:1:Clearing client state. 19:42:DEBUG:1:Initialising client 19:42:1:Client connected [Total:1] ('<my external ip>' 1/1) 19:42:DEBUG:1:Opening network state 19:42:DEBUG:1:Determining async mode 19:42:DEBUG:1:State initialised, registering client instance. 19:42:DEBUG:1:Selecting a thread to assign to. 19:42:DEBUG:Searching for a suitable thread to handle a new client.. 19:42:DEBUG:Selected thread #0. 19:42:DEBUG:1:Client successfully initialised. 19:42:DEBUG:1:Client connected with a seed length of 83 ([0]=0xef) 19:42:DEBUG:1:Receiving new client login handshake. 19:42:DEBUG:1:Client connected with a seed of 0xc0a80146 (new handshake=1, version=7002000). 19:42:(sphere_serv_triggers.scp,55)serv ip is 127.0.0.1 19:42:1:Login 'richm' 19:42:DEBUG:1:Client being closed by read-thread 19:42:DEBUG:1:Client being closed by write-thread 19:42:DEBUG:1:Client is being cleared since marked to close. 19:42:DEBUG:1:Clearing client state. 19:42:1:Client disconnected [Total:0] ('<my external ip>', acct='richm') Did another login attempt, this time the IP stayed as my external IP, so not sure why it changed above? 19:47:DEBUG:Receiving new connection. 19:47:DEBUG:Retrieving IP history for '<my external ip>'. 19:47:DEBUG:Incoming connection from '<my external ip>' [blocked=0, ttl=300, pings=0, connecting=0, connected=0] 19:47:DEBUG:2:Allocated slot for client (676). 19:47:DEBUG:2:Clearing client state. 19:47:DEBUG:2:Initialising client 19:47:2:Client connected [Total:1] ('<my external ip>' 1/1) 19:47:DEBUG:2:Opening network state 19:47:DEBUG:2:Determining async mode 19:47:DEBUG:2:State initialised, registering client instance. 19:47:DEBUG:2:Selecting a thread to assign to. 19:47:DEBUG:Searching for a suitable thread to handle a new client.. 19:47:DEBUG:Selected thread #0. 19:47:DEBUG:2:Client successfully initialised. 19:47:DEBUG:2:Client connected with a seed length of 83 ([0]=0xef) 19:47:DEBUG:2:Receiving new client login handshake. 19:47:DEBUG:2:Client connected with a seed of 0x7f000001 (new handshake=1, version=7002000). 19:47:(sphere_serv_triggers.scp,55)serv ip is <my external ip> 19:47:2:Login 'richm' 19:48:DEBUG:2:Client being closed by read-thread 19:48:DEBUG:2:Client being closed by read-thread 19:48:DEBUG:2:Client being closed by write-thread 19:48:DEBUG:2:Client is being cleared since marked to close. 19:48:DEBUG:2:Clearing client state. 19:48:2:Client disconnected [Total:0] ('<my external ip>', acct='richm') RE: WAN connections - Coruja - 03-28-2017 04:56 AM nah even these logs are not showing any useful info try set the server IP/port on [SERVERS] section of sphere.ini instead use SERV.SERVIP RE: WAN connections - richm - 03-28-2017 05:27 AM I am confused. I have removed the SERV.SERVIP lines from sphere_triggers.scp and my Sphere.ini section now looks like this... [SERVERS] MyShard 127.0.0.1 2593 It seems to work like this now? I am pretty certain back in the day I started using the SERV.SERVIP method because I couldn't get the .ini settings working without having 2 servers listed on the connect screen. Very strange. A bit of an update for anyone else having this issue. The above settings let ME log in using myhost.no-ip.org,2593 but DID NOT let anybody outside of my personal network connect (same issues as original post). typing SERV.IP=myhost.no-ip.org in the console allowed other people using myhost.no-ip.org to connect flawlessly, however when I logged out I COULD NOT log back in, but external users could. Solution: SERV.SERVIP=XXXXXXXXXX in server_start trigger, and sphere.ini setup as per above post. I log in using network IP instead of myhost.no-ip.org. This seems to be working. |