IN DEVELOPMENT: ns2server management script

dgibbsdgibbs Join Date: 2013-08-31 Member: 187443Members
Hello all,

Its great news to see Natural Selection 2 server is now on Linux.
I have now started writing the ns2server management script.

I have already written around 9 server management scripts already for various games which can be found here and am actively developing and improving all of them as needed.
http://danielgibbs.co.uk/scripts

I will be attempting to get the server working on Ubuntu, Debian and CentOS. However I am having many dependency issues.
Ubuntu seems to be the easiest currently so I will get it working there first.

I cannot get the server to start however. This is what I currently get.
GetInstanceCount currently unimplemented
Press Tab to open the console window
Press Ctrl-C to exit
Build 254
Ubuntu 13.04 x86_64
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Setting breakpad minidump AppID = 4920
Connected to Steam servers
VAC Enabled
Loading config://ServerConfig.json
Loading config://ServerAdmin.json
Loading config://BannedPlayers.json
Loading config://MapCycle.json
Loading config://ConsistencyConfig.json
Loading 'maps/ns2_tram.level'
Cooked mesh with 43763 faces, 32802 vertices
Cooked mesh with 47776 faces, 35558 vertices
Cooked mesh with 14840 faces, 10062 vertices
Cooked mesh with 857 faces, 793 vertices
WARNING: Corrected case of '/home/ns2server/ns2/ns2/models/props/refinery/refinery_pipemods_03_clusterB_04.model'
WARNING: Corrected case of '/home/ns2server/ns2/ns2/models/props/refinery/refinery_pipemods_03_clusterB_03.model'
Cooked mesh with 4 faces, 4 vertices
Error: Couldn't open file 'models/effects/halo_rounded_blue.model'
Building pathing mesh for level maps/ns2_tram.level
Error: Could not open maps/ns2_tram.level-server.tile_cache_grid for write
Finished loading 'maps/ns2_tram.level'
Killed

Any ideas would be very helpful. Once I have completed this it should be easy to install and manage a Natural Selection 2 server.

Comments

  • funkoolowfunkoolow Join Date: 2003-04-28 Member: 15917Members, WC 2013 - Supporter
    that's so great, thanks in advance :)
  • radionautradionaut california Join Date: 2013-01-22 Member: 181192Members, Reinforced - Supporter, WC 2013 - Gold
    dgibbs, i realize it's been a month since you posted this, but have you made any progress?
  • dgibbsdgibbs Join Date: 2013-08-31 Member: 187443Members
    @radionaut I do have a version of the script however I was unable to get the NS2 server running to test it (kept crashing). I am currently doing a major update to all the scripts however when I have completed this I will go back and try again. Maybe there has been a server update that will allow it to work for me. However even if I cannot test I will realease it after the major update :)
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    Since your first post, there have been three released patches.

    If you are still having trouble getting the dedicated server running there is a guide up here
  • dgibbsdgibbs Join Date: 2013-08-31 Member: 187443Members
    edited September 2013
    @Confused. I think I have looked at that and still couldn't get it working the server would just fall over and not give and error as seen in my first post.

    I will create a fresh Ubuntu VM and test again and hopefully this time I can get it working. I estimate the major updates to the scripts will be done by the end of the week then NS2 script will be my next priority as I wouldn't mind having my own NS2 server. Can anyone confirm if they have got the server working on CentOS?
  • ZaggyZaggy NullPointerException The Netherlands Join Date: 2003-12-10 Member: 24214Forum Moderators, NS2 Playtester, Reinforced - Onos, Subnautica Playtester
    dgibbs wrote: »
    @Confused. I think I have looked at that and still couldn't get it working the server would just fall over and not give and error as seen in my first post.

    I will create a fresh Ubuntu VM and test again and hopefully this time I can get it working. I estimate the major updates to the scripts will be done by the end of the week then NS2 script will be my next priority as I wouldn't mind having my own NS2 server. Can anyone confirm if they have got the server working on CentOS?

    I created the guide, what error did you get?

  • ionfluxionflux Join Date: 2012-11-24 Member: 173039Members, Reinforced - Diamond, Reinforced - Shadow
    Zaggy wrote: »
    dgibbs wrote: »
    @Confused. I think I have looked at that and still couldn't get it working the server would just fall over and not give and error as seen in my first post.

    I will create a fresh Ubuntu VM and test again and hopefully this time I can get it working. I estimate the major updates to the scripts will be done by the end of the week then NS2 script will be my next priority as I wouldn't mind having my own NS2 server. Can anyone confirm if they have got the server working on CentOS?

    I created the guide, what error did you get?

    your guide shows how to set up on ubuntu. does it also work on centos?
    Zaggy wrote: »
    Initial installation of Ubuntu and Steam
    Create a fresh Steam account for this server and note the login credentials.
    Download Ubuntu Server x64 12.04.3: from http://www.ubuntu.com/download/server
    Install Ubuntu Server x64, select appropriate options, select OpenSSH server if you want to remotely manage it.
  • Omega_K2Omega_K2 Join Date: 2011-12-25 Member: 139013Members, Reinforced - Shadow
    ionflux wrote: »
    your guide shows how to set up on ubuntu. does it also work on centos?

    NS2 server should work any linux distribution, as long you have the appropinate libraries. That means, if you run a distribution that uses ancient libraries, you probably end up compiling them yourself or getting them from another distro and setting them up to run for the server specifically.

    Unless you are on a system that is 64 bit and doesn't support multiarch, then nope.
  • dgibbsdgibbs Join Date: 2013-08-31 Member: 187443Members
    I think what @Omega_K2 is saying is that it does not work on CentOS 6. CentOS has an older version of glibc (2.12). NS2 Server uses 2.15. So unless you can compile glibc 2.15 yourself (which might break the server) you will not be able to get it working.

    The more important question is does NS2 server really need any of the features glibc 2.15 to run? if not having the server recompiled to use 2.12 would allow CentOS users to install the server.

    Many server providers user CentOS because of its stability and long support cycle matching that of RHEL which is extremely important to dedicated servers. Ubuntu is updated frequently which sometimes is not a good thing for servers.
  • Omega_K2Omega_K2 Join Date: 2011-12-25 Member: 139013Members, Reinforced - Shadow
    dgibbs wrote: »
    I think what @Omega_K2 is saying is that it does not work on CentOS 6. CentOS has an older version of glibc (2.12). NS2 Server uses 2.15. So unless you can compile glibc 2.15 yourself (which might break the server) you will not be able to get it working.

    The more important question is does NS2 server really need any of the features glibc 2.15 to run? if not having the server recompiled to use 2.12 would allow CentOS users to install the server.

    Many server providers user CentOS because of its stability and long support cycle matching that of RHEL which is extremely important to dedicated servers. Ubuntu is updated frequently which sometimes is not a good thing for servers.

    I actually mean, that you should be able to get it work; just don't install the libs system wide and use LD_LIBRARY_PATH when starting the server.
  • dgibbsdgibbs Join Date: 2013-08-31 Member: 187443Members
    OK so I have setup a new Ubuntu server in an attempt to get a Linux server up and running but still get the vague error and then crashes I am unable to find any log file that gives me a reason for it crashing. So currently I have no idea what the problem is.

    WARNING: Corrected case of '/home/ns2server/serverfiles/ns2/models/marine/Dropship/dropShip.model'
    WARNING: Corrected case of '/home/ns2server/serverfiles/ns2/models/marine/Dropship/dropShip.model'
    Building pathing mesh for level maps/ns2_summit.level
    Finished loading 'maps/ns2_summit.level'
    Killed

    Anyone got any ideas on this? I cannot release any script without testing this first myself.

    Thanks
  • radionautradionaut california Join Date: 2013-01-22 Member: 181192Members, Reinforced - Supporter, WC 2013 - Gold
    let's have a look at your start.sh
  • dgibbsdgibbs Join Date: 2013-08-31 Member: 187443Members
    @radionaut I am simply running ./server_linux. I have also tried with parameters as well with no luck. start.sh is not required to run a server it is simply a bash script.

    I have also tried
    ./server_linux32 -name "Test" -webadmin -webdomain 127.0.0.1 -webuser admin -webpassword test123 -webport 8080 -map ns2_biodome -ip 127.0.0.1 -port 27015 -limit 16

    however if there is an issue with the parms the server complains about them.
  • dgibbsdgibbs Join Date: 2013-08-31 Member: 187443Members
    I have figured out the reason why the server keeps being killed. The virtual machines I was using didn't have enough RAM. The server kept killing server_linux32 because it filled up all available RAM and SWAP. I am currently using 1GB of RAM and this works (though if users on this I think it would crash). Now I can continue development and hopefully release the scrip soon. YAY!!
  • dgibbsdgibbs Join Date: 2013-08-31 Member: 187443Members
    I have now realased the first version of ns2server

    http://danielgibbs.co.uk/scripts/ns2server/

    Enjoy! :-)
Sign In or Register to comment.