Jump to content

schmatzler

UnityHQ Member
  • Posts

    52
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by schmatzler

  1. I am forced to take the server down indefinitely.

     

    I really tried to get it going It even runs straight for weeks now.

     

    BUT: This thing is so poorly written, it seems to trigger a lot of memory leaks. I've let it run for the last few weeks and I always end up with my 16GB of RAM getting filled and the machine becoming really sluggish because of that.

     

    It's really not an option for me to reboot the whole server every few weeks just because of NOLF2. Sorry guys, the server application is sh*t.

  2. I've updated my script today. I noticed that my server was offline and nothing was kicking in. What happened?

     

    Well, Nolf2Srv.exe lost the connection - so far, so good. It also got killed because the damn sucker didn't behave. But: Somehow it broke so badly, that the virtual display (running via Xvfb) did not close. Since Xvfb was already running, it couldn't be spawned again and the .exe couldn't start.

     

    I've added another check that terminates the virtual display, too. My complete script is now this:

    #!/bin/bash
    # if online is NULL, it's down. May change maps, so wait and check again:
    if [ -z "$(curl -sSf http://hirnschwund.net/?s=4 | grep "ONLINE")"]; then
    echo "'frack' is offline"
    sleep 90
    fi
    if [ -z "$(curl -sSf http://hirnschwund.net/?s=4 | grep "ONLINE")"]; then
    echo "'frack' is still offline"
    echo "Killing process"
    pkill NOLF2Srv.exe
    echo "Making sure the X window is usable"
    pkill -f "Xvfb :110"
    sleep 2
    echo "Starting server"
    env WINEPREFIX="/home/gameserver/.wine-nolf2" && cd nolf2 && nohup xvfb-run -n 110 wine NOLF2Srv.exe -mod LivesForever > /dev/null 2>&1 &
    else
    echo "NOLF2 is running, leave."
    fi
  3. No, I don't store any server logs. I believe the NOLF servers create their own log files and I discovered one day that they had grown to several gigabytes. I symlinked them to /dev/null. I don't really need them - who would need thousands of lines of kill and join messages?

     

    The lockfile is a bad idea. Since the server sometimes loses the connection but the interface is still accessible, the lockfile would never get deleted. I prefer to use it as it is now, because it just works. And that is all I wanted. :)

  4. I have a bunch of remarks when I read your scripts. (don't be mad that I try to polish it a bit)

     

    Thanks! :-) I'm not mad, I'm always willing to improve my setup.

     

     

    Why /bin/bash ? I'm pretty sure you could run this via /bin/sh.

     

    Mmmh no particular reason. I like bash, it's the default shell in my home system and it's highly customizable via .bashrc so I just put it at the top, because I like it. If the script works with sh, others can feel free to use that. ;)

     

     

    You can simply redirect the output by using "command > /dev/null 2>&1" and avoid to write twice /dev/null.

     

    Cool. I did not know that! :) Wrote that stuff a while back and it worked, so I didn't put any more thought into it.

     

     

    One last question: Is there a specific reason not to use the classic init/systemd daemon manager to do the job but - instead - fallback on crontab?

     

    I don't want to write init scripts for my host system. When I decide to switch from Debian to another distribution, I would have to change the init scripts. Also, systemd is total junk - software from Lennart Poettering tends to break everything, so I will stay away from it whenever I can.

     

    cron is simple enough to do the job and I use it for various other tasks, so it suits my setup.

     

    Thanks for your input :)

  5. Just a quick addition: I refined the script that checks if the server is running.
    It also runs a second check on my web frontend here to see if the server is really online.

    Doing the sidecheck will restart the server if the .exe is still running, but it has lost access to the internet, because it somehow broke. This will also cover things like "Damn, it runs but takes up my CPU". :)

    #!/bin/bash
    # if online is NULL, it's down. May change maps, so wait and check again:
    if [ -z "$(curl -sSf http://hirnschwund.net/?s=4 | grep "ONLINE")" ]
    then
    sleep 60
    elif [ -z "$(curl -sSf http://hirnschwund.net/?s=4 | grep "ONLINE")" ]
    then
    pkill NOLF2Srv.exe
    fi
    
    # check daemon
    ps -ef | grep -v grep | grep NolfServ.exe
    # if not found - equals to 1, start it
    if [ $? -eq 1 ]
    then
    cd nolf && nohup xvfb-run -a wine NolfServ.exe -nowiz -NetUsePassword "false" >/dev/null 2>/dev/null &
    else
    echo "found, leave."
    fi.
    • Like 1
  6. Yes, you are right. The QTracker tutorial was missing two lines.

     

    I added this to my hosts file and the server shows up now:

    65.112.87.186 master.gamespy.com
    65.112.87.186 master0.gamespy.com
    65.112.87.186 nolf2.master.gamespy.com
    65.112.87.186 nolf2.ms9.gamespy.com

    However, the server still frequently loses the connection, without throwing out any error messages.

    I don't know how to solve this, but maybe I can set up a solution to reboot it automatically.

  7. I had to take down the server for now.

     

    It works for some hours without any problems. After that, it simply loses the online connection. I can still access it and change maps, but it stays offline to the outside world.

     

    I will try to backtrace this problem and if I come up with anything useful, solve it or file a bug with the wine project.

     

    Strange - I host so many Lithtech games on Linux and they all work flawless for over a 100 days straight. NOLF2? No deal.

  8. Hello guys,

     

    I'm running a NOLF1 server since at least 3 years and I still see people playing sometimes.

    I've never set up one for NOLF2, because I never really played it and I thought, there would be dozens, too.

     

    Wrong thought! Nobody seems to run any, apart from you guys. And somebody told me that you are struggling with funding every now and then, so I set up a new one. You can see the status here:

     

    http://hirnschwund.net/?s=4

     

    I still have a little problem. I was able to get the server to be listed on http://sficlan.net/nolf2servers/servers.php - but it's not listed on the QTracker master server.

     

    I can see that the unityhq servers show up on QTracker and in the game launcher. If anyone knows how to do it, I would be glad if you give me a hint.

     

    Like all my other game servers, this one runs on a dedicated Linux machine, too. 4x3Ghz, 16GB RAM and a gigabit connection should be suitable for good online play! :)

     

    There is still room to run some more servers, maybe with custom maps or mods. I never really played the game, though. So I don't know which maps or mods I should add to a second server. Give me a hint if you want one. :)

  9. Some of the launchers don't have a Custom-Button.

     

    For example, I have the German GOTY version on 2 CD's. That launcher has no Custom button, no matter what I do - I can create the folder and I can add .rez files in the registry (the launcher command gets saved there), but no button.

     

    I ended up getting a cracked executable from somewhere on the internet. The game still works, with the button. I don't know why they decided to remove that feature for certain languages.

  10. Maybe I have some good news: Some people have created OpenSpy - an alternative for GameSpy that works with a handful of old existing games. OpenSpy enables me to start up my own GameSpy master server IF I can get the source code to work and if that also works with NOLF1.

     

    I will fiddle with it in the next few days. Wish me luck! :)

     

    https://github.com/sfcspanky/Openspy-Core

  11. Another Lithtech game, TRON 2.0 has been shut down a while earlier and what I did there together with the LDSO community was opening up a website where users could add their own servers:

     

    http://tron-servers.net

     

    Afterwards, a Multiplayer Fix had been created that basically consists of an installation of Qtracker which is listing all currently running servers. It is even possible to start up Qtracker by clicking on the server names on my website.

     

    I would open up a similar website for NOLF1 too, but if someone decides to create a multiplayer application like in NOLF2, there is no need for that.

  12. Hi guys,

     

    I was finally able to get NOLF running on the latest Wine version - it works without any problems so far, only the music does not play.

     

    You only need the application wine for this to work. On Debian based distributions you can install that with:

    sudo apt-get install wine

    First, I downloaded the two NOLF CD images from the download section here. After that, I opened up a terminal and entered some commands to get it right. Nothing fancy, it's pretty straightforward.

     

    First, we need to mount the cd images (I put them on my Desktop) as real CD's, so I entered this:

    cd $HOME/Desktop/
    su -c mount NGotydisc1.iso /mnt -o loop && mount NGotydisc2.iso /media -o loop

    The first CD is on /mnt, the second one is on /media now.

     

    We can install NOLF with the following command after that:

    env WINEPREFIX=$HOME/.wine-nolf wine /mnt/setup.exe

    That makes sure, that all your NOLF files are in a special directory in your home folder that is called .wine-nolf instead of the default one.

     

    Why not the default? Because we have to replace some sound related files now and we don't want that enabled by default:

     

    (This step is not needed if your wine version is older than 1.5.1)

    wget http://winetricks.org/winetricks && chmod +x winetricks
    env WINEPREFIX=$HOME/.wine-nolf ./winetricks dsound directmusic

    You are done. Nolf should show up in your application menu now. Disable the music and intro videos in the launcher, otherwise it won't run. Keep playing! :)

  13. hirnschwund.net... I never see that one. Whenever I refresh the servers I only see the 6 Unity HQ ones and 2 Co-Op servers by OwN-3m-All, usually all at 0/4, 0/8/ or 0/16 players.

     

    Yeah, that is because you are talking about NOLF2 and I am talking about NOLF1, which is a HUGE difference.

     

    NOLF1 still has official Gamespy support - you put in the CD and you start playing. NOLF2 wasn't so lucky.

×
×
  • Create New...

Important Information

By using this site, you agree to our Guidelines Privacy Policy.