Port problems tips

Moderator: NADEO

Post Reply
MuNgLo
Posts: 314
Joined: 12 Jul 2012, 03:37

Port problems tips

Post by MuNgLo »

Today I managed to find what's been stopping my servers ports. It was due to skipping over the p2p ports of the other servers. Bet it has something to do with the "automatic port +1 if used" code in the server.

Basically I could run 6 servers using...
XML/ServerPort/ServerP2PPort/Title
5000 3570 3576 SMStormElite@nadeolabs
5001 3571 3576 SMStormElite@nadeolabs
5002 3572 3577 SMStormElite@nadeolabs
5003 3573 3578 SMStormElite@nadeolabs
5004 3574 3579 SMStormElite@nadeolabs
5005 3575 3580 SMStormJoust@nadeolabs

But to start another one skipping over the p2p ports and use..
5006 3581 3586 AnyTitle
^ Failed

So after a hard think on it I moved all psp ports so I now have a spread of 10 ports between server port and p2p port.
Instant succes followed.

So try having all serverports under all server-p2p-ports.
TheBigG.
Posts: 401
Joined: 11 Jun 2011, 16:11

Re: Port problems tips

Post by TheBigG. »

can't reproduce that, i run 70 gameservers on the same ports in config without any problems.
Client:
OS: Win10/Debian CPU: Intel 9900k GPU: NVIDIA 1080TI Display: 3x Acer Predator XB271HUbmiprz 1440p@165 Hz

Server:
OS: Debian Stable @ Backports Kernel CPU: Intel 6700k RAM: 32 GB Storage: 2x 256 GB NVMe SSD@Raid 1
MuNgLo
Posts: 314
Joined: 12 Jul 2012, 03:37

Re: Port problems tips

Post by MuNgLo »

well if u use same cfg it will use ports in the cfg or next one up thats available. And that's the functionallity I suspect is messing with me since I want to have strictly set ports and then when I want to skip over some I end up with servers you cant connect to.

depending what ports you start with you might not have any problems with overlapping serverports/p2pports
oliverde8
Posts: 1286
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: Port problems tips

Post by oliverde8 »

MuNgLo wrote:well if u use same cfg it will use ports in the cfg or next one up thats available. And that's the functionallity I suspect is messing with me since I want to have strictly set ports and then when I want to skip over some I end up with servers you cant connect to.
I don't have as much as 70 servers but have 8 servers runing with manually configured ports
5000 2351 3451
5001 2352 3452
5002 2353 3453
5004 2354 3454
5005 2355 3455
5006 2356 3456
5011 2361 3461

The last one jumps cause it is a server for some one else and I prefer to keep it a bit separated, it is easier to se in 1 look. no one meses with no one and they work all fine.
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...
MuNgLo
Posts: 314
Joined: 12 Jul 2012, 03:37

Re: Port problems tips

Post by MuNgLo »

oliverde8 wrote:
MuNgLo wrote:well if u use same cfg it will use ports in the cfg or next one up thats available. And that's the functionallity I suspect is messing with me since I want to have strictly set ports and then when I want to skip over some I end up with servers you cant connect to.
I don't have as much as 70 servers but have 8 servers runing with manually configured ports
5000 2351 3451
5001 2352 3452
5002 2353 3453
5004 2354 3454
5005 2355 3455
5006 2356 3456
5011 2361 3461

The last one jumps cause it is a server for some one else and I prefer to keep it a bit separated, it is easier to se in 1 look. no one messes with no one and they work all fine.
yes but you are still not setting higher serverport then the p2pports on the other server like I tried.
2361 is still lower then 3451
Its when I jumped serverport over p2pport of the other servers I ended up having problems

And I'm still not really sure it was what caused my problems but hey now it works so.... :D
It kinda strange though.
Masher
Posts: 6
Joined: 12 Mar 2013, 04:02

Re: Port problems tips

Post by Masher »

Your problem is your first two servers have a port setting of 3576 for the p2p port. When the second starts up, it'll bind to 3577 since 3576 is in use. Infact the rest of them will bind to +1 of your listed value. When your last server starts it'll try to bind to 3581, but it's already in use by your second to last server's p2p port. Seperating them by 10 is a good idea ;), but the ports don't have to be below the p2p port. I have one server that is using default+1000 and running fine.
MuNgLo
Posts: 314
Joined: 12 Jul 2012, 03:37

Re: Port problems tips

Post by MuNgLo »

Masher wrote:Your problem is your first two servers have a port setting of 3576 for the p2p port. When the second starts up, it'll bind to 3577 since 3576 is in use. Infact the rest of them will bind to +1 of your listed value. When your last server starts it'll try to bind to 3581, but it's already in use by your second to last server's p2p port. Seperating them by 10 is a good idea ;), but the ports don't have to be below the p2p port. I have one server that is using default+1000 and running fine.

Hmm I think that's a typo. Almost 100% I didn't make it that way. Regardless of if its a typo or not I'm posivtive I did try to launch servers with ports on 3400to3450 and above 3585. Dont have the old versions of the cfg to check to be sure but hey, either way, it's still working for me now so I all good. :D
nocturne
Posts: 208
Joined: 23 Jun 2010, 21:31

Re: Port problems tips

Post by nocturne »

Only one server can listen on a port at any given time -- they can't use the same ports, obviously. :roflol:

Ports can be set to whatever number you like, 0-65536.. as long as they aren't in use (and your network has them open to the outside in the case of the server and p2p ports). Better to figure out what port ranges you want all your servers on from the start, rather than run into configuration errors later on.
User avatar
TMarc
Posts: 15255
Joined: 05 Apr 2011, 19:10
Location: Europe
Contact:

Re: Port problems tips

Post by TMarc »

If you're telling this in general, you're wrong.
Many servers can listen to the same ports indeed, because you allways connect using both port and address.
Behind a router with NAT, it is different, then you're right: different servers need different ports.

And the connection port, e.g. 2350, is only busy for the time of the connection setup, as the server hands over the connection to another port in order to free the original port.
This is also why you need to open more than just 2350 in your firewall ;)

But using a server behind a router is not very handy, unless you have a very fast internet connection with nice upload. :thumbsup:
Post Reply

Return to “Dedicated Server”

Who is online

Users browsing this forum: No registered users and 1 guest