How to create a NS2 Dedicated Server

24567

Comments

  • wdfstryfewdfstryfe Join Date: 2009-05-28 Member: 67532Posts: 30Members
    That's true too..
  • w0dk4w0dk4 Join Date: 2008-04-22 Member: 64129Posts: 351Members, Constellation, Reinforced - Shadow
    edited July 2010
    Also note that no other port than 27015 is working. Im pretty sure its a client issue, the clients cannot connect to anything other than 27015.

    Additionally, the dedicated server is pretty unusable right now, because of a bug when players leave, they leave behind some kind of player artifact, effectively locking the server up after some time (it looks like the server is full, but actually its just full of not-disconnected timed-out players)

    It also doesnt seem to be possible to host more than one server on one ip, first due to the port issue and it also seems that only one server is listed per ip.
    Post edited by Unknown User on
    ArmoryChamber.net [ConstellationSlots/AdvancedBalance]
  • maessemaesse Join Date: 2010-04-08 Member: 71213Posts: 80Members
    Having looked a bit at the packets through Wireshark, I can tell you all that 27016 is used for transmitting serverinfo to clients refreshing their serverlist.
    It also seems that clients that hang on "Attempting connection" is sending connect-packets every 100ms, while the server seems to respond every 1000ms (but client keeps going)
  • ZylickZylick Join Date: 2005-08-04 Member: 57517Posts: 1Members
    edited July 2010
    Luitjens wrote on Jul 26 2010, 11:42 PM:
    Hey guys this guide is suppose to help you on setting up a server!
    For quick and ease of this guide, I will be using port 27015 (the standard port)

    1. First make sure your port 27015 is forward http://www.portforward.com can help you with on forwarded ports.

    [\quote]

    I did not need to forward the port in windows vista. I just made sure the application was on my list of allowed applications.
    Post edited by Unknown User on
  • TagertsweTagertswe Join Date: 2010-03-04 Member: 70825Posts: 126Members
    Is there any log stored somewhere regarding the NS2 Server?
    Because after taking my server down I can't bring it up again.
    The command prompt window just flashes and closes on me.
  • LuitjensLuitjens Join Date: 2010-07-26 Member: 73034Posts: 199Members, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, Subnautica Playtester
    You can launch command prompt, type cmd.exe in start > run or start (win 7), and then just drag/drop the shortcut to the server.exe into the cmd prompt, itll output the error and won't go away.
    yt - InternetsLIVE
  • TagertsweTagertswe Join Date: 2010-03-04 Member: 70825Posts: 126Members
    thanks Luitjens !
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Posts: 228Members
    QUOTE (Tagertswe @ Jul 28 2010, 05:35 AM) »
    Is there any log stored somewhere regarding the NS2 Server?
    Because after taking my server down I can't bring it up again.
    The command prompt window just flashes and closes on me.


    I believe there is also a log file generated for each console session in %USERPROFILE%\Application Data\Natural Selection 2
  • CPCheebsCPCheebs Join Date: 2010-07-15 Member: 72416Posts: 19Members
    image

    I keep getting this.

    Ports are forwarded, and it should be working.
    Here is my target code for server.exe:
    CODE
    "C:\Program Files\Steam\steamapps\common\natural selection 2\Server.exe" -ip 74.195.244.xx -port 27015 -lan 0 -limit 6 -name "KeyStroker's Dedicated |6p|"


    I don't see any problems here either, and the funny thing is that it will let me run a LAN game with my internal IP.
    Anyone know what it could be?
  • ShadowFaxShadowFax Join Date: 2003-02-23 Member: 13858Posts: 20Members
    You will get that error if you specify your external ip and you are using a router with a local ip being assigned to you... try not specifying the ip.
  • CPCheebsCPCheebs Join Date: 2010-07-15 Member: 72416Posts: 19Members
    edited July 2010
    QUOTE (ShadowFax @ Jul 27 2010, 08:29 PM) »
    You will get that error if you specify your external ip and you are using a router with a local ip being assigned to you... try not specifying the ip.



    If I do this it creates a game in which no one else can join. (probably a LAN Game).




    EDIT:

    I think it is something bigger because now all it does is open up command, go through a few lines of code and then say, "BUILD 149". After this it errors. :(
    Post edited by Unknown User on
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Posts: 228Members
    QUOTE (CPCheebs @ Jul 28 2010, 09:59 AM) »
    image

    I keep getting this.

    Ports are forwarded, and it should be working.
    Here is my target code for server.exe:
    CODE
    "C:\Program Files\Steam\steamapps\common\natural selection 2\Server.exe" -ip 74.195.244.xx -port 27015 -lan 0 -limit 6 -name "KeyStroker's Dedicated |6p|"


    I don't see any problems here either, and the funny thing is that it will let me run a LAN game with my internal IP.
    Anyone know what it could be?


    Fairly sure you should be using your LAN IP, then giving out your external IP for people to connect.

    The Server will need to bind to an address I assume and you do not have access to bind to the external IP if that is assigned to your router for example.

    If you are "Port forwarding" it sounds like NAT and you should use internal Ip on the commandline.
  • ShadowFaxShadowFax Join Date: 2003-02-23 Member: 13858Posts: 20Members
    I pass my internal IP to the server.exe and have people connecting to my server just fine. If you used the -save option at some point you may need to go edit the server.xml file manually before that error will go away... but passing the internal ip again with the -save switch will probably due the trick.
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Posts: 228Members
    QUOTE (ShadowFax @ Jul 28 2010, 12:04 PM) »
    I pass my internal IP to the server.exe and have people connecting to my server just fine. If you used the -save option at some point you may need to go edit the server.xml file manually before that error will go away... but passing the internal ip again with the -save switch will probably due the trick.


    As opposed to what they say I don't think it actually reads the server.xml

    I started my server with no options and it does not pick up the details from the file I believe.

    So maybe this isn't implemented yet? It definitely seems to be writing the file though.

    So at this point I would rely on the commandline options unless the -file option may work.
  • LuitjensLuitjens Join Date: 2010-07-26 Member: 73034Posts: 199Members, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, Subnautica Playtester
    I've had it read server.xml after I specified the IP address within the file, it does read the file for that atleast..
    yt - InternetsLIVE
  • endarendar Join Date: 2010-07-27 Member: 73256Posts: 620Members, Squad Five Blue
    Had the server executable crash when someone with a funny character joined the game (I am guessing). Last line on the console was Bioman_ - µ
    Should this be posted somewhere else?

    image
  • slayer.faithslayer.faith Join Date: 2007-12-10 Member: 63127Posts: 45Members, Constellation, Reinforced - Shadow
    edited July 2010
    (This is a 'help' not a 'flame'.... I <3 ns2 already! :-)

    Does anyone know *EXACTLY* what is needed to run a dedicated server? Our clan has a win server running dod/cs but the server.exe just quits with no output.

    I tested the setup on my machine before moving it over to the dedicated server. Ive worked out the following for sure:

    * You need steam (but you can just create a new account with no games, it does not need your full account or even have an ns2 key)

    * You need all the ns2 files (from an install you got with the key). This does not need to be in the steam tree.

    * Toss in server.exe

    Works on my game machine, quits with no output on our server (Win2003 server enterprise 64bit).

    What I suspect is wrong is:

    * some library is failing to start/be found (im a linux sysadmin, I miss ldd <filename>)
    * maybe you need some combination of PhysX/directx *on the server*! (just installing physx by itself is not enough).


    The lack of error/logging makes tracking almost impossible. (Yes, I looked for the log output but there is no directory there (there is one from launcher, which starts ok, but not for the game/server).

    MAX: pleeeeease 'printf' after a failed ldd load ;-)

    Im keen to fire up a dedicated ns2 server down in australia! ;-)

    (A dedicated server forum would be nice too! :-)
    Post edited by Unknown User on
  • slayer.faithslayer.faith Join Date: 2007-12-10 Member: 63127Posts: 45Members, Constellation, Reinforced - Shadow
    There has been some discussion about what IP address to pass to the server.exe

    In the standard TCP/IP socket interface you need to pass an 'address' to the creation of a socket to tell it which network to connect to (incase your machine has more than one network interface). Usually you pass '' which means 'all' (you could pass 127.0.0.1 to only bind to your local network interface, or if you have more than 1 ip address you can force the game to just start on a specific ip).

    If that is the use of the ip argument by server.exe, then you'll need to leave it off by preference or pass an ip address that the server actually has. If you are running on an home broadband then you might want to try setting 'ip' to your servers LAN address (you might then need to port-forward on your modem to the lan server, so the lanserver just sees local traffic and the modem works out all the masquerading/nat stuff).

    (Grumpy old unix guy, so might not work the same for windows.)
  • LuitjensLuitjens Join Date: 2010-07-26 Member: 73034Posts: 199Members, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, Subnautica Playtester
    Did you set the IP correct?

    Toss server.exe through cmd and it will output the error to cmd and won't close.
    yt - InternetsLIVE
  • endarendar Join Date: 2010-07-27 Member: 73256Posts: 620Members, Squad Five Blue
    I have it running on server 2003 x64, the only thing I needed to do was start the game once so that direct x would install. Before i did that, i got an error:

    Application popup: Server.exe - Unable To Locate Component : This application has failed to start because d3dx9_42.dll was not found. Re-installing the application may fix this problem.
  • LuitjensLuitjens Join Date: 2010-07-26 Member: 73034Posts: 199Members, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, Subnautica Playtester
    Yea, with DirectX errors you just need to navigate to \Steam\steamapps\common\natural selection 2\redist\DirectX and run DXSETUP.exe
    yt - InternetsLIVE
  • slayer.faithslayer.faith Join Date: 2007-12-10 Member: 63127Posts: 45Members, Constellation, Reinforced - Shadow
    QUOTE (Luitjens @ Jul 28 2010, 02:29 PM) »
    Did you set the IP correct?

    Toss server.exe through cmd and it will output the error to cmd and won't close.


    Are you sure you need to pass the IP? I didnt set it (sockets should bind to all interfaces by default) and it worked on my home/lan system.

    I tried running in a cmd (rather than a cygwin shell) and I get the same result: no output and immediately returns to the cmd prompt.
  • slayer.faithslayer.faith Join Date: 2007-12-10 Member: 63127Posts: 45Members, Constellation, Reinforced - Shadow
    QUOTE (endar @ Jul 28 2010, 02:30 PM) »
    I have it running on server 2003 x64, the only thing I needed to do was start the game once so that direct x would install. Before i did that, i got an error:

    Application popup: Server.exe - Unable To Locate Component : This application has failed to start because d3dx9_42.dll was not found. Re-installing the application may fix this problem.


    Thanks. I'll get someone more windows-ie to install directx and give it another try. (it is also our dod server, so i dont want to bork it)
  • CPCheebsCPCheebs Join Date: 2010-07-15 Member: 72416Posts: 19Members
    People can't connect to my servers, whats the deal?
  • LuitjensLuitjens Join Date: 2010-07-26 Member: 73034Posts: 199Members, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, Subnautica Playtester
    You probably didn't port forward correctly..

    www.portforward.com

    and check http://canyouseeme.org/ while your server is up

    (27015)
    yt - InternetsLIVE
  • saintksaintk Join Date: 2010-07-27 Member: 73196Posts: 8Members
    Just posting this here as well so i'm sure everyone has seen it (only related to server ops)

    http://www.unknownworlds.com/ns/forums/ind...howtopic=110581 - tool for rebooting NS2 servers at pre-set memory useage limit (due to memory leak)
  • MartinMartin Join Date: 2010-07-27 Member: 73229Posts: 132Members
    QUOTE (slayer.faith @ Jul 28 2010, 05:06 AM) »
    Thanks. I'll get someone more windows-ie to install directx and give it another try. (it is also our dod server, so i dont want to bork it)


    I got this working on a server 2003 box by copying d3dx9_42.dll to the NS2 directory where Server.exe is sitting. Also install physx. All should work fine from there.........untested yet of course. I just did this and currently am unable to connect because I don't have NS2 here at this current machine, I have it at home.

    image
  • zimzumzimzum Join Date: 2004-09-02 Member: 31200Posts: 218Members, Reinforced - Shadow
    edited July 2010
    I didn't notice anything about linux dedicated server already posted, so..
    on opensuse v11.3 with the latest build of wine v1.2 I'm able to run a dedicated server and connect to it (make sure you open your pcs firewall for the traffic as well).

    don't forget to have steam running.
    wine Server.exe -ip <whatever> -name <whatever> -map ns2_tram -limit 8 -lan <whatever>

    http://img202.imageshack.us/img202/368/screenshotpls.png
    Post edited by Unknown User on
    The new posts that pop up daily by some guy with 3 hours playtime who knows how to perfectly balance this game already make me want to vomit - PaLaGi
  • slayer.faithslayer.faith Join Date: 2007-12-10 Member: 63127Posts: 45Members, Constellation, Reinforced - Shadow
    QUOTE (Martin @ Jul 29 2010, 08:01 AM) »
    I got this working on a server 2003 box by copying d3dx9_42.dll to the NS2 directory where Server.exe is sitting. Also install physx. All should work fine from there.........untested yet of course. I just did this and currently am unable to connect because I don't have NS2 here at this current machine, I have it at home.

    image


    Confirmed! Installing directX (and previously installed physx) worked like a charm and the server now runs. Neither directx or physx need a reboot (phew).
  • MartinMartin Join Date: 2010-07-27 Member: 73229Posts: 132Members
    edited July 2010
    QUOTE (slayer.faith @ Jul 29 2010, 02:43 AM) »
    Confirmed! Installing directX (and previously installed physx) worked like a charm and the server now runs. Neither directx or physx need a reboot (phew).


    Glad it worked out for you! :)


    Ok this is just a random thought but if anyone is going to post screenshots of people who have connected to your server, please blur out their IPs.

    I've noticed also that the server is running close to a 500MB in memory for 8 players. Just some food for thought.
    Post edited by Unknown User on
Sign In or Register to comment.