Can't connect to my server. (what ports do I need to open)

Started by TraktorLaila, April 01, 2015, 03:42:42 PM

TraktorLaila

I installed the server (latest 1.1.17) on my linux hosting center machine and asked them to open the required port. I've tested that the port works with both tcp and udp connections (setting up a small python script to test the two).

So I'm wondering:

1) Do I need any other ports than the one I define in the SettingServer.xml?
2) Does is mather what version of mono I use, it seems like the server is running fine, I get no errors. (running mono 3.10)

ai_enabled

1. You need to forward only one UDP port set in SettingServer.xml.
2. Mono 3.10 is ok.

If you have any problems please upload the server log file.

TraktorLaila

#2
Here is my server log: http://pastebin.com/t7id9fQU

The client console tells me that it's unable to connect to the game server, system.TimeoutException: No server answer received at (some LindgrenRUDP exception)


Also if I run the following on the linux machine and click the multiplayer tab I see that the client sends some data:

[michaels@web477 sockettest]$ nc -ul 0.0.0.0 25464
��VoidExpanseU�=[�8��A

Then when I run my python test script and press the refresh icon of my server (in the custom server tab) I get this:
[michaels@web477 sockettest]$ python testudp.py
Recived message: ��VoidExpanse��� W�e��D
Recived message: ��cancelled or timeout
Recived message: ��VoidExpanse��L{b�f����D
Recived message: ��cancelled or timeout
Recived message: ��VoidExpanse(�덆:C��D
Recived message: ��cancelled or timeout

ai_enabled

Have you tried adding the server ip:port to the Customs servers list at the client?
Also have you tried to run the server on your local machine and connect to it? If it works, then the issue is not client-related and we need to get know more about the network connection (do you use VPN?) and the server configuration (what version of Linux, installed firewall, etc to help us reproduce the issue).
Regards!

TraktorLaila

#4
I tried it on a local network linux machine with same centos6 64bit setup and it works fine there.

When recording the bytes coming in, it seems to be pretty much the same data coming in on both machines except for some chunks in between (the package size coming from the client is the same on both machine). As you saw in my logs the server doesn't respond at all, the funny thing is that if I send it some bogus data on that port it actually says so in the logs: 2.4.15 15:03:42.9002 [IMP] SocketServer: Socket message: Malformed packet; stated payload length 3566, remaining bytes 8

so I guess it must be something with my hosting, so I will contact them and ask about their firewall.

After looking at it some more it seems it actually needs two ports:
[michaels@web477 Logs]$ netstat -lnptu | grep mono
udp        0      0 0.0.0.0:25464               0.0.0.0:*                               11411/mono
udp        0      0 0.0.0.0:35328               0.0.0.0:*                               11411/mono


I blocked the other one on my local linux machine and then I could no longer get the server to load in the custom server view on the client. Do this port need to be unblocked for clients to connect?

ai_enabled

Right, I forgot to mention that the server requires connection to the Master server.
The game server should use one UDP port for the game connections. The another UDP port is used for the outgoing connection with the Master server and it's selected randomly on the server start.
But in your logs it seems the server successfully connected to the Master server, so it should works.