Console error - WARNING: UDP_OpenSocket: bind: WSAEADDRNOTAVAIL

Qui-gon

Junior Member
Joined
Nov 3, 2009
Likes
0
#1
Hi, I need some help setting up a dedicated server, I'm getting error messages.
I'm attempting to run a server off a home computer using a shortcut on my desktop. For Internet I have a wireless router (or wireless "gateway" as they call it, it receives signals from towers but basically the same thing) so I port forward the ports to a static ip which is 192.168.0.2. I made sure the Static ip is out of DHCP range also. Here is my cmd line and dedicated.cfg -

Code:
"C:\Program Files (x86)\Call of Duty Game of the Year Edition\CoDUOMP.exe" +set dedicated 2 +set sv_punkbuster 1 +set fs_game awe_uo +exec dedicated.cfg +map_rotate
Code:
// Passwords
set rconPassword ""
set g_password ""
set sv_privatePassword ""

// Client Settings
set sv_maxClients "24"
set sv_privateClients "0"

// Public Information
// ^1 = red
// ^2 = green
// ^3 = yellow
// ^4 = dark blue
// ^5 = light blue (cyan)
// ^6 = magenta
// ^7 = white
set sv_hostname "Nazgul Server"
set scr_motd "Hosted by the Nazgul"
sets .Admin "Nazgul"
sets .Email ""
sets .IRC ""
sets .Website ""
sets .Location "WI"

// Punkbuster
// Enabled from the command line.

// General Settings
set sv_maxRate "20000"
set sv_minPing "0"
set sv_maxPing "500"
set sv_pure "1"
set logfile "1"


//console log - 0=no log 1=buffered 2=continuous 3=append
set g_log "games_mp.log"
set g_logsync "2"

//
set sv_cheats "0"
set sv_fps "20"

set sv_master1 "coduomaster.activision.com"
// ** Note that only one master server is needed.  Activition populates
// the server list.  Adding additional servers will actually cause a small
// amout of overhead while your server attempts to connect to servers that are
// not listening.
// See the "master" list here: http://stats.callofduty.com
set sv_master2 ""
set sv_master3 ""
set sv_master4 ""
set sv_master5 ""

// Weapons 0 - disable weapon 1 - enable weapon
set scr_allow_bar "1"
set scr_allow_bren "1"
set scr_allow_enfield "1"
set scr_allow_fg42 "1"
set scr_allow_kar98k "1"
set scr_allow_kar98ksniper "1"
set scr_allow_m1carbine "1"
set scr_allow_m1garand "1"
set scr_allow_mp40 "1"
set scr_allow_mp44 "1"
set scr_allow_nagant "1"
set scr_allow_nagantsniper "1"
set scr_allow_panzerfaust "1"
set scr_allow_ppsh "1"
set scr_allow_springfield "1"
set scr_allow_sten "1"
set scr_allow_thompson "1"
set scr_allow_pistols "1"
set scr_allow_satchel "1"
set scr_allow_smoke "1"
set scr_allow_grenades "1"
set scr_allow_flamethrower "1"
set scr_allow_artillery "1"
set scr_allow_bazooka "1"
set scr_allow_mg34 "1"
set scr_allow_dp28 "1"
set scr_allow_mg30cal "1"
set scr_allow_gewehr43 "1"
set scr_allow_svt40 "1"

// vehicle settings
set scr_allow_flak88 "1"
set scr_allow_su152 "1"
set scr_allow_elefant "1"
set scr_allow_panzeriv "1"
set scr_allow_t34 "1"
set scr_allow_sherman "1"
set scr_allow_horch "1"
set scr_allow_gaz67b "1"
set scr_allow_willyjeep "1"

// advanced settings
set scr_allow_vote "1"
set g_allowvote "1"
set g_allowvotetempbanuser "0"
set g_allowvotetempbanclient "0"
set g_allowvotekick "0"
set g_allowvoteclientkick "0"
set g_allowvotegametype "0"
set g_allowvotetypemap "0"
set g_allowvotemap "1"
set g_allowvotemaprotate "0"
set g_allowvotemaprestart "0"
set scr_shellshock "1"
set scr_drophealth "1"
set scr_battlerank "1"

// KillCam
set scr_killcam "0"
set scr_freelook "0"
set scr_spectateenemy "0"
seta scr_forcerespawn "1"

// Teambalance
set scr_teambalance "1"

// Friendly Fire
set scr_friendlyfire "2" //0 - off 1 - on 2 - reflect damage 3 - Shared

// Auto-Download settings
seta sv_floodProtect "1"
seta sv_timeout "300"
seta sv_reconnectlimit "3"
seta sv_allowAnonymous "1"
set sv_allowdownloads "0"
seta sv_dl_maxRate "42000" //max download speed 42000 = 12kb

// HTTP Redirect Downloads
set sv_wwwDownload "1"
set sv_wwwBaseURL ""
set sv_wwwDlDisconnected "1"

// DM
set scr_dm_scorelimit "50"
set scr_dm_timelimit "30"
set scr_drawfriend "1"
set scr_forcerespawn "0"

// TDM
set scr_tdm_scorelimit "200"
scr_tdm_timelimit "30"

// SD
set scr_sd_graceperiod "15"
set scr_sd_roundlength "5"
set scr_sd_roundlimit "0"
set scr_sd_scorelimit "7"
set scr_sd_timelimit "0"

// BEL
set scr_bel_alivepointtime "10"
set scr_bel_scorelimit "50"
set scr_bel_timelimit "30"

// RE
set scr_re_graceperiod "15"
set scr_re_roundlength "4"
set scr_re_roundlimit "0"
set scr_re_scorelimit "7"
set scr_re_timelimit "0"
set scr_re_showcarrier "0"

// HQ
set scr_hq_timelimit "30"
set scr_hq_scorelimit "450"

// gametype bas (Base Assault)
set scr_bas_scorelimit "3"
set scr_bas_timelimit "20"
set scr_bas_roundlimit "4"
set scr_bas_roundlength "5"
set scr_bas_respawn_wave_time "10"
set scr_bas_startrounddelay "10"
set scr_bas_endrounddelay "5"
set scr_bas_clearscoreeachround "0"

// gametype ctf (Capture the Flag)
set scr_ctf_scorelimit "3"
set scr_ctf_timelimit "20"
set scr_ctf_roundlimit "4"
set scr_ctf_roundlength "5"
set scr_ctf_startrounddelay "10"
set scr_ctf_endrounddelay "5"
set scr_ctf_clearscoreeachround "1"
set scr_ctf_showoncompass "0"

// gametype dom (Domination)
set scr_dom_scorelimit "3"
set scr_dom_timelimit "20"
set scr_dom_roundlimit "4"
set scr_dom_roundlength "5"
set scr_dom_respawn_wave_time "10"
set scr_dom_startrounddelay "10"
set scr_dom_endrounddelay "5"
set scr_dom_clearscoreeachround "0"

exec awe.cfg

// Set starting game type
// Gametype list:
// bel - Behind Enemy Lines
// dm - Deathmatch
// re - Retrieval
// sd - Search and Destroy
// tdm - Team Death Match
// hq - Headquaters
// dom - Domination
// bas - Base Assault
// ctf - Capture the flag

// UO Map and Supported gametypes:
//mp_arnhem dm,dom,hq,ret,sd,tdm,bel,ctf
//mp_berlin dm,dom,hq,ret,sd,tdm,bel,ctf
//mp_cassino dm,dom,hq,ret,sd,tdm,bel,ctf
//mp_foy dm,dom,hq,ret,sd,tdm,bas,bel,ctf
//mp_italy dm,dom,hq,ret,sd,tdm,bas,bel,ctf
//mp_kharkov dm,dom,hq,tdm,bel,ctf
//mp_kursk dm,dom,hq,tdm,bas,bel,ctf
//mp_ponyri dm,dom,hq,tdm,bas,bel,ctf
//mp_rhinevalley dm,dom,hq,tdm,bas,bel,ctf
//mp_sicily dm,dom,hq,ret,sd,tdm,bel,ctf
//mp_uo_stanjel dm,dom,hq,ret,sd,tdm,bel,ctf


set sv_mapRotation "map mp_railyard map mp_rocket map mp_depot map mp_ship”
Now you would think I'd be able to go. Click the shortcut and join it from the internet list. However that's not the case, the server chooses the ip 192.168.0.2:28960. I'm told that that ip is for internal use only, which explains why it shows up locally but not on the internet list. I tried to force the server to use my external ip by putting this in the command line

"+set net_ip 63.135.129.250 +set net_port 28960"

But I get these errors from the console -

Code:
Winsock Initialized
Opening IP socket: 63.135.129.250:28960
WARNING: UDP_OpenSocket: bind: WSAEADDRNOTAVAIL
Opening IP socket: 63.135.129.250:28961
WARNING: UDP_OpenSocket: bind: WSAEADDRNOTAVAIL
Opening IP socket: 63.135.129.250:28962
WARNING: UDP_OpenSocket: bind: WSAEADDRNOTAVAIL
Opening IP socket: 63.135.129.250:28963
WARNING: UDP_OpenSocket: bind: WSAEADDRNOTAVAIL
Opening IP socket: 63.135.129.250:28964
WARNING: UDP_OpenSocket: bind: WSAEADDRNOTAVAIL
Opening IP socket: 63.135.129.250:28965
WARNING: UDP_OpenSocket: bind: WSAEADDRNOTAVAIL
Opening IP socket: 63.135.129.250:28966
WARNING: UDP_OpenSocket: bind: WSAEADDRNOTAVAIL
Opening IP socket: 63.135.129.250:28967
WARNING: UDP_OpenSocket: bind: WSAEADDRNOTAVAIL
Opening IP socket: 63.135.129.250:28968
WARNING: UDP_OpenSocket: bind: WSAEADDRNOTAVAIL
Opening IP socket: 63.135.129.250:28969
WARNING: UDP_OpenSocket: bind: WSAEADDRNOTAVAIL
WARNING: Couldn't allocate IP port
I don't know what else to do, OldDog and I have tried a few things but haven't been able to get ther server up and running yet. Any help would be great!

Some other info that might help is a firewall. The only firewall I have is the one that comes with Windows and CODUPMP.exe is allowed through on all ports. My router doesn't provide any sort of firewall. It can block IPs, Ports, and MACs but those are disabled. It's an Axesstel MV440 (isn't listed on portforward.com)

For people to join, the server needs to use the external ip, right? So the errors above need to be fixed.
 

HIS-MOTHER

Senior Member
Joined
Oct 11, 2007
Likes
1
Location
Chicago
#2
use

+set net_ip 192.168.0.2 +set net_port 28960

DMZ that box and make sure NAT is enabled on the router/gateway

You can't set it to bind to a global IP as your network does not see it so the game wont. Thats a WAN IP not LAN.


NAT= Network Address Translation It translates 192.168.0.2(LAN) to 63.135.129.250(WAN) or whatever your global WAN IP is..

Edit.. You also stated you assigned a LAN IP outside the DCHP range. Are you sure the LAN IP you are assigning is part of the address pool? Usually if you set a range it wont allow more than that . I have 5 IP's in my pool .1.- .5 if I assigned .6 it wouldnt take as its not in the pool.

Also is that the LAN IP assinged to the machine you are hosting on or did you just try to bind the game to a LAN IP thats not bound to your NIC?

I wrote a few tutorials over here

http://www.gamerslifeline.com/dedicated-servers/451-how-assign-static-ip-your-pc.html

http://www.gamerslifeline.com/dedicated-servers/449-how-dmz-your-pc-host-game.html#post1818
 
Last edited:

OldDog

Administrator Emeritus
Joined
Oct 31, 2003
Likes
0
Location
Essex Junction, Vermont
#3
Your config looks fine, except, possibly, for the player slots.

You do not need to put +map_rotate at the end of the config ... command-line is fine.

You do not need all that master server stuff ... codoumaster is fine.

A DMZ is totally not necessary ... you have one external IP address and your router/firewall is pretty rudimentary. You cannot use NAT with it ... you must use PAT (port-address-translation, also called port-forwarding), which is what you're doing now. I think that's where the problem lies. A big clue is the line "WARNING: Couldn't allocate IP port" For some reason there's a conflict with 28960-28969 (Call of Duty will hunt down that list looking for a port it can use).

Also, you're not hosting your machine somewhere ... it's in your house, so you don't have to worry about DHCP pools. If you're certain that your server is statically assigned, with the proper subnet mask (should be 255.255.255.0) and the proper gateway (probably 192.168.0.1, which would be the INSIDE address of your router/firewall, then you're fine.

I've been running a CoD server for a number of years; currently run a CoDUO server, as you know. The config and command-line I sent you works, and has worked, for several years. Here is my command-line, again, just so you have it for reference:
Code:
.\coduo\CoDUOMP.exe +set net_ip 208.43.19.221 +set dedicated 2 +set fs_homepath e:\games\olddog\coduo +set fs_basepath e:\games\olddog\coduo +set sv_punkbuster 1 +set fs_game awe_uo +exec custom.cfg +exec awe.cfg +map_rotate
The path, above, should be changed to yours. Perhaps Mechanic is correct in that the install directory is problematic ... I've never actually used the install directory for any of my servers, so I can't say. As you can see, I have "+map_rotate" in my command-line.

Since this is a Windows server (not sure what O/S, but I remember you telling me it was Windows), check to see that the Windows firewall, and any other "security" software, like McAfee, Norton, whatever, is turned off and diabled ... at least for the time being. You can work allowing only 28960 in later. I don't see anything in particular that is wrong with the router screen snaps you sent me ... but I'd be less than honest if I didn't say that I haven't had a lot of time, either.

I just checked your screen shots. You need to port forward 28960 on UDP and TCP ... you only have UDP enabled. Another thing is that I see a different WAN IP address than the one you've been telling us about: 63.135.147.152. It looks as though your ISP is changing IPs on you with some frequency. If this holds true, then you will never have a consistent method of having people connect as your port forwarding will be a moving target. That's probably (along with the TCP/UDP issue) what's been happening all along. This is the problem with consumer-level broadband connections, and, frankly, is why I now have a hosted server. Trying to maintain this moving target got to be almost a full time job. Interestingly, though, when my ISP was Adelphia this was a problem ... since they were bought by Comcast I haven't had an IP change in several years. Just a hair ironic.

What I was doing before (to advertise the changing IP address) is to use a service like DynDNS, get a freebee DNS name for the server, maintain it with DirectUpdate (it checks your DNS name in DynDNS, then updates it with the current IP address), and publish the DNS name on a web site for people who were looking for my server ... otherwise, I'd have to rely on the in-game browser. As you can imagine its was: 1) a pain in the ass, and 2) a pain in the ass. Lasted about 6 months ... people who played on my server frequently got bored having FIND it each time.

Change the port forwarding to both UDP and TCP for 28960, and either post here, or PM me with the current IP address, and I'll try to connect this weekend.

Ha! Scrolled down even farther on your screen shots. As I said, above, turn off your host-based firewall altogether until you've gotten a good connection. In any event, when you turn it back on, you will need a rule for TCP inbound on 28960. Get rid of the rules for CODMP and CODUOMP ... they're redundant and can open you up to a different kind of attack ... if those exe's were taken over by something, you've just given them carte blanche to do anything they wish. Dealing with the port only is the accepted practice.

Sorry for taking so long in getting some answers to you, but my day job has been very demanding recently.
 

Qui-gon

Junior Member
Joined
Nov 3, 2009
Likes
0
#4
use

+set net_ip 192.168.0.2 +set net_port 28960

DMZ that box and make sure NAT is enabled on the router/gateway
I have tried to DMZ before with no results. If I set the net ip to my static while DMZ'd then I don't get a response from the Master Server, if I set the net ip to the (current) external ip then I get the errors above and if I don't have a +set net_ip in the command line then it's on locally under my static 192.168.0.2:28960. Basically, with DMZ I get the same results.

Also is that the LAN IP assinged to the machine you are hosting on or did you just try to bind the game to a LAN IP thats not bound to your NIC?
That LAN ip is a static, 192.168.0.1 is the ip use to login to the router. I'm hosting off a computer then joining that game from the same computer.

Yes, the router almost always hands me a new external ip everytime I restart the router, I have to restart it everytime I make changes. I have known it and updated it in the command line whenever I need to. But I don't think that will be much of a problem, this server isn't meant to be on all the time, just whenever I want to play, and my friend can search the server name from the in-game browser.

As for firewalls, those inbound rules that I made were only there for a short time and have been taken off for a while now. The only ones I have are two CODMP and two CODUOMP, which are two UDP and two TCP. They allow COD.exe to use all UDP and TCP ports on all profiles (Private, Public and Domain). Should I enable something called Edge traversal for the rules? It allows traffic to bypass NAT routers.

OldDog, I see your command line but I don't understand the two commands "+set fs_homepath" and "+set fs_gamepath"
Could you explain that? Also ports 28960 on both TCP and UDP have been forwarded to the static, it's been like that for a while without change.

I have Windows Vista 64-bit by the way, I turned off the Windows firewall but no change. I will leave the server up as much as possible this weekend with the commands +set net_ip 63.135.137.24 and +set net_port 28960. Even though I get the console errors, I'll leave it up because I know you can't connect to 192.168.0.2. That 63 ip is the current ip.

I have my firewall on but I have the rules for CODUO that Windows automatically unblocks (the ones I mentioned above)

My other router, all I had to do was create a static ip, go into the router, uncheck a box that said "Block Anonymous Internet Requests", forward the ports and then I was done. It automatically set the server ip to my external one, I don't know why it's not doing that here.

The other security I have is AVG Free, Ad-Aware and Spybot, those don't have firewalls, my only firewall is Windows, I don't even think my router has one.

Have you looked at the screenshot of the page called Static Routes? Should I be putting anything down in there?
 
Last edited:

OldDog

Administrator Emeritus
Joined
Oct 31, 2003
Likes
0
Location
Essex Junction, Vermont
#5
The "+set fs_homepath" and "+set fs_gamepath" are not necessary for what you're doing now ... they're there because the server I'm on runs multiple instances. Eliminate them from your command line.

Ok, since we started all this Q&A, that's the 3rd external IP address I've seen from you. If your ISP is changing that frequently on you, then the in-game browser is going to have a hell of a time keeping track of your server.

Was unable to connect to your server at 8:50AM EST, 11/29.

Did you add TCP to your port forwarding? This will NOT work without TCP and UDP on 28960. Your screen shots did not show that ... only UDP.

Stop the firewall SERVICE altogether on the server.

My other router, all I had to do was create a static ip, go into the router, uncheck a box that said "Block Anonymous Internet Requests", forward the ports and then I was done. It automatically set the server ip to my external one, I don't know why it's not doing that here.
This is my whole point ... there is something going on at the router/firewall. I think once this is cleaned up, everything will run smoothly (albeit a difficulty getting to your server due to external IP changes).

This should be a no-brainer. You shouldn't need "+set net_ip 63.xx.xx.xx" in your command line, or anywhere else, nor the port setting. If your port forwarding is working properly on the correct port and protocol, you should be able to pop right in. You only use those settings when there are multiple IPs on the same server, or, when you change the default port. I ran a home server for 4 years with none of that crap, and it worked every time.

Any way you can go back to your original router, or buy a LinkSys or Netgear (stay away from D-Link if you can)? They are much simpler to deal with and have tons of documentation. The Axesstel seems to be a wi-fi gateway that has rudimentary capability, from what I could glean looking t up. Are you running this server using wi-fi, or hard cabled?
 

Qui-gon

Junior Member
Joined
Nov 3, 2009
Likes
0
#6
Was unable to connect to your server at 8:50AM EST, 11/29.
It was up all weekend. The router gives me a new external ip everytime I make changes and restart, which has been quite often recently.

The ports are good and have been, 28960 is forwarded to the static on TCP/UDP.

Are you running this server using wi-fi, or hard cabled?
Yeah, that's the thing - it's wi-fi from towers outside. So if I went back to my Linksys, I'd have to go through two routers, I've tried it before and can get internet but no luck on the server.

Stop the firewall SERVICE altogether on the server.
How would I do that? Do you mean the COD server? And for the router, I don't think there is a firewall that I can stop, you have the screenshots too, I don't see any firewall settings.
 

theMechanic

Senior Member
Joined
Nov 2, 2003
Likes
0
#7
found this, kinda old tho

- You will need to allow the following ports:
UDP/TCP 20500
UDP/TCP 20510
UDP/TCP 20600
UDP/TCP 20610
UDP/TCP 28960
 

OldDog

Administrator Emeritus
Joined
Oct 31, 2003
Likes
0
Location
Essex Junction, Vermont
#8
How are you fining out what IP address you currently have, so you can test properly? Frankly, I think this is untenable with wi-fi ... too flaky. It may have been up all weekend, but I was using the last known IP address you sent. If you made any changes and restarted, that would have been lost. Again, too flaky.

You only need 28960 open.

Stop the firewall service in Vista. Open Windows Firewall and Advanced..., then turn off Domain, Public, and Private.
 

Qui-gon

Junior Member
Joined
Nov 3, 2009
Likes
0
#9
Sorry, I have been busy and not had much time to mess with the server. To find out my external ip, I look in my router, a page lists all ips. I made sure that I didn't make any changes that weekend and checked my external ip now and then, it was the same for that weekend.

I will turn the firewall off, I've tried it before but I'll try it again without anything special in the cmd line.

Any other ideas would be great, if you have any. Do you know what could be blocking it so that it doesn't set the server to use the external ip? There is a box that says "Disable NAT" however that is (and always has been) unchecked.
 

Qui-gon

Junior Member
Joined
Nov 3, 2009
Likes
0
#10
It's been awhile but I turned the Vista firewall off and started up the server without anything special in the cmd line, the server used this ip - 192.168.0.10:28961

My static but I don't know why it used "28961". Something is preventing it from automatically changing it to my external ip. Let me know what you think but I think it's time to call my ISP, who knows, maybe they can help, it's their router.
 
Joined
Jul 25, 2011
Likes
0
Location
Virginia USA
#11
only 28960-28969 and 20500-20519 are used by the game...I believe 20600-20619 is CoD2 and later.


turning off the firewall or the related service in Vista SP1, Server 2008 or higher has NO affect on what firewall rules get enforced ...you must actually change the rules as they're applied directly to the network stack itself though you can restore out-of-box defaults using the following in powershell or cmd

netsh advfirewall reset
netsh winsock reset

the last command isn't required but is helpful

turning off the firewall service only prevents applications from querying firewall status or requesting exceptions as well as disabling outbound and loopback monitoring
turning off the firewall itself does the contrapositive by diabling inbound monitoring as well as preventing certain types of tunneled traffic from functioning properly amongst other things


also because he's using his local client game install to host the server 28960 is registered by the game client upon installation in the registry/firewall etc. and thus the server is invoking a secondary instance of the game's executable image which then by design defaults to 28961, unless you specify the cvar net_port which must be inside the range 28960-28969 if cvar dedicated has non-zero value when using your local installation to host



AVG is notorious for causing networking issues with vista or higher and all 'routers' have firewalls, as that's how NAT and NPT are implemented on the backend by firmware though neither NAT nor NPT are firewalls and routers are actually gateways but yeah definitely disable all of your security stuff when testing, also ensure that windows defender is completely disabled
 
Top Bottom