Author Topic: server up and reachable, but cant connect  (Read 2367 times)

rogerdv

  • Traveller
  • *
  • Posts: 42
    • View Profile
server up and reachable, but cant connect
« on: August 13, 2007, 09:45:27 pm »
I found this problem a long time ago (about 2 years), I can ping the server, the status page report server up, but my client always report failed. I blamed Centos, but 2 days ago I migrated my gateway to Gentoo 2007.0 and the problem persists. My firewall has open outgoing connections and as I said, I can perfectly ping laanx.fragnetics.com from the PC with the game. Any solution or do i have to forget Planeshift?

eldoth_terevan

  • Hydlaa Notable
  • *
  • Posts: 512
    • View Profile
Re: server up and reachable, but cant connect
« Reply #1 on: August 13, 2007, 09:52:11 pm »
Sounds like the condition I get often when I try to login. The server says unreachable even though it is obviously there, and responding to ping. And I end up clicking the login button 20 or 50 times until it connects, during which it may give me a couple or few unreachable errors. May be something with the client itself...

rogerdv

  • Traveller
  • *
  • Posts: 42
    • View Profile
Re: server up and reachable, but cant connect
« Reply #2 on: August 14, 2007, 07:31:28 pm »
I click a lot but I got Server isnt available. Is there any way to test if server port is reachable via UDP? By using netcat or something?


Seytra

  • Forum Addict
  • *
  • Posts: 2052
  • No system can compensate lack of common sense.
    • View Profile
Re: server up and reachable, but cant connect
« Reply #3 on: August 15, 2007, 07:42:42 pm »
I click a lot but I got Server isnt available. Is there any way to test if server port is reachable via UDP? By using netcat or something?
I haven't actually checked the networking code, but to me it seems that the "ping" the client uses actually goes through the server on UDP 7777. IOW, it is not the ICMP "ping" everyone uses. It can't be, because even if the server is "failed", the machine itself stays up, so an ICMP ping goes through regardless (as do http requests, since laanx hosts the status page and the updater system (and BT tracker?), none of which go down when the game server crashes). Also, the "ping" response time reported by the client is always slightly higher than that of an ICMP ping, implying extra delay in the server. You could use a sniffer like tcpdump to see if the client pings as ICMP or UDP (contrary to what the name implies, tcpdump can dump all sorts of traffic).

Therefore, I think that when the client's ping comes back, the UDP part essentially is set up OK. If it doesn't, then the UDP connection does not work properly.

The issue about the server responding to pings but upon login reporting "not reachable" I also get occasionally. I believe, however, that this is an entirely different issue, and in fact in conjunction with lag (the server drops requests for logins if it's lagging already, which makes perfect sense, so the client doesn't receive it's reply and therefore times out (notice the delay) and then pops up that message).

What might be the problem is that the router must also allow incoming UDP packets. Specifically forwarding UDP 7777 to the client PC may be necessary as well.

You can also try the IPCop dedicated firewall, at least for testing, because that works fine with PS without any modification. If you use IPCop and PS still doesn't work, then the problem either is with your client PC (it may be blocking UDP traffic) or your ISP.

Edit:
I just did a tcpdump and indeed the client uses UDP for it's "ping". The dump of a working connection looks like this:
Code: [Select]
# tcpdump udp -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
19:51:04.129296 IP 10.0.126.17.32842 > 210.193.49.103.7777: UDP, length 23 (client to laanx "ping")
19:51:04.473411 IP 210.193.49.103.7777 > 10.0.126.17.32842: UDP, length 23 (laanx to client "pong")
19:51:05.523297 IP 10.0.126.17.32842 > 210.193.49.103.7777: UDP, length 23
19:51:05.866223 IP 210.193.49.103.7777 > 10.0.126.17.32842: UDP, length 23
19:51:06.916298 IP 10.0.126.17.32842 > 210.193.49.103.7777: UDP, length 23
19:51:07.250911 IP 210.193.49.103.7777 > 10.0.126.17.32842: UDP, length 23
19:51:08.300298 IP 10.0.126.17.32842 > 210.193.49.103.7777: UDP, length 23
19:51:08.635830 IP 210.193.49.103.7777 > 10.0.126.17.32842: UDP, length 23
19:51:09.735296 IP 10.0.126.17.32842 > 210.193.49.103.7777: UDP, length 23
19:51:10.076448 IP 210.193.49.103.7777 > 10.0.126.17.32842: UDP, length 23
...
« Last Edit: August 15, 2007, 07:58:14 pm by Seytra »