11831 Posts in 1017 Topics - by 528 Members - Latest Member: Blade

Author Topic: trouble with low-numbered port number and tracker  (Read 222 times)

0 Members and 1 Guest are viewing this topic.

Offline lloyd

  • Jr. Member
  • **
  • Posts: 57
trouble with low-numbered port number and tracker
« on: February 13, 2012, 08:14:55 PM »
Hi, I don't know whether or not this should be a bug report.  I thought I'd post it here as a question first, and it can be moved to bugs if it is a bug.

I can't use port for hosting games 42424 because my ISP will not open that port for incoming connections, so I want to host games on a low number port, say 81.  My idea is that the tracker (which I understand runs on port 42420) will provide my IP and the non-standard port number to players who want to join.  At least, I think it SHOULD work that way.

When I set port 81 by starting with "d2x-rebirth -udp_myport 81", when I go to multiplayer to host a game, when I get to "Start game" I immediately get the error message "Can't bind name to socket."

I am doing something wrong or is this a bug?

Online zico

  • Administrator
  • Hero Member
  • *****
  • Posts: 3140
    • DXX-Rebirth
Re: trouble with low-numbered port number and tracker
« Reply #1 on: February 14, 2012, 01:22:40 AM »
Usually lower numbered ports serve a problem as they tend to be used or reserverd for other services. I am not sure if there is a permission or restriction on the OS level but mostly the usable port numbers start at a 4 digit number. I am not aware that this is a probelm in DXX but I might be wrong actually - I never got lower ones to work. DXX is also set so it does not "reuse" ports - it will demand one which is not used and not reserved.

Tracker will have no problem with that. Tracke ronly uses 42420 outgoing on your end - so your ISP cannot screw this up.

I'd say check around for more common applications that use some higher port numbers and try one of those.
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!

Offline Trent Hawkins

  • Terraformation Pilot
  • Sr. Member
  • ****
  • Posts: 473
  • ▬•• • ••• ▬•▬• • ▬• ▬      ••▬ ▬• •▬• • •▬ •▬••
Re: trouble with low-numbered port number and tracker
« Reply #2 on: February 14, 2012, 02:32:36 AM »
So wait. Tracked games can now be hosted on IP other than 42424?
Live and explore the myriad vacua of space(time)...
Bonds are as bonded as the bonded...


Descent Rangers
Captain of Black Lions squadron

The Stalker 21.126
Zica Laser
Guided Micro Bombs
Microcorp HXS Class C
Gravitron PulseWave
Zica SuperCharger

Online zico

  • Administrator
  • Hero Member
  • *****
  • Posts: 3140
    • DXX-Rebirth
Re: trouble with low-numbered port number and tracker
« Reply #3 on: February 14, 2012, 10:04:42 AM »
Sure. You can run your games on ANY FREE PORT and it'll work on the tracker. Always have been like this. Your game will report itself VIA the tracker port (which is always 42420) and the tracker will list it with the port you selected (if that port is open that is).
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!

Offline Trent Hawkins

  • Terraformation Pilot
  • Sr. Member
  • ****
  • Posts: 473
  • ▬•• • ••• ▬•▬• • ▬• ▬      ••▬ ▬• •▬• • •▬ •▬••
Re: trouble with low-numbered port number and tracker
« Reply #4 on: February 14, 2012, 11:05:49 AM »
Interesting. I was left with the impression that 42424 was only working for tracker. My bad on miss-informing people. Thanks.
Live and explore the myriad vacua of space(time)...
Bonds are as bonded as the bonded...


Descent Rangers
Captain of Black Lions squadron

The Stalker 21.126
Zica Laser
Guided Micro Bombs
Microcorp HXS Class C
Gravitron PulseWave
Zica SuperCharger

Offline aqqman

  • The worst-case scenario
  • Full Member
  • ***
  • Posts: 168
  • This one's headed for Uranus
    • IceWolf of Descent Rangers
Re: trouble with low-numbered port number and tracker
« Reply #5 on: February 15, 2012, 08:49:44 PM »
The game has no problems working on port 81 - tested - both 57.1 and 57.2 (not on my connection :P)
The "Can't bind name to socket." error happens usually when your OS is using it and doesn't allow any other applications to use it. Try any other ports lower than 1024 (which could require some tricks under linux - irony: and some say that windows is trying to be smarter than the user)
« Last Edit: February 15, 2012, 08:51:38 PM by aqqman »
Descent Rangers
Name: IceWolf
Assignment: Black Squad
Rank: Lt.Commander

Current season stats

Online v66r

  • Sr. Member
  • ****
  • Posts: 274
Re: trouble with low-numbered port number and tracker
« Reply #6 on: February 22, 2012, 08:27:42 PM »
to bind to ports below 1024 you have to be root.

Online zico

  • Administrator
  • Hero Member
  • *****
  • Posts: 3140
    • DXX-Rebirth
Re: trouble with low-numbered port number and tracker
« Reply #7 on: February 22, 2012, 09:04:20 PM »
Hah - I knew it was somethign like that.
Do you have any source on that, v66r?
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!

Online v66r

  • Sr. Member
  • ****
  • Posts: 274
Re: trouble with low-numbered port number and tracker
« Reply #8 on: February 22, 2012, 09:12:53 PM »
It's some historical unix background, maybe quite obsolete but still common according to this article:

http://www.staldal.nu/tech/2007/10/31/why-can-only-root-listen-to-ports-below-1024/

Don't know how windows handles this - if you have to be SYSTEM or in the Administrators group...

Offline Trent Hawkins

  • Terraformation Pilot
  • Sr. Member
  • ****
  • Posts: 473
  • ▬•• • ••• ▬•▬• • ▬• ▬      ••▬ ▬• •▬• • •▬ •▬••
Re: trouble with low-numbered port number and tracker
« Reply #9 on: February 22, 2012, 10:52:31 PM »
I just did a quick test hosting a game on port 1 (without opening it) on windows 7. Aside from tracker not responding the game ran fine; no fail to bind name to socket or anything... Just a quick reply... Don't know what really happens in the background, it would require some search.
Live and explore the myriad vacua of space(time)...
Bonds are as bonded as the bonded...


Descent Rangers
Captain of Black Lions squadron

The Stalker 21.126
Zica Laser
Guided Micro Bombs
Microcorp HXS Class C
Gravitron PulseWave
Zica SuperCharger

Online zico

  • Administrator
  • Hero Member
  • *****
  • Posts: 3140
    • DXX-Rebirth
Re: trouble with low-numbered port number and tracker
« Reply #10 on: February 23, 2012, 02:28:54 AM »
Yeah I guess the permissions thing only affects UNIX-based systems.
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!