Dedicated server for TMF, version 2011-02-21

This is the place where you can find everything related to the dedicated server, control scripts and community tools.

Moderators: Pit Crew, TM-Patrol

xbx
Developer
Developer
Posts: 452
Joined: 12 Aug 2005 14:42
Contact:

Dedicated server for TMF, version 2011-02-21

Post by xbx » 23 Feb 2011 20:52

Hello!

Looooong time no see.. ;)


Here is a small update with a handful of changes I managed to squeeze in:

Dedicated server for TMF, version 2011-02-21 2.11.26
You can download it from
http://files2.trackmaniaforever.com/Tra ... -02-21.zip
or
http://files2.trackmaniaforever.com/Tra ... -21.tar.gz

Main Changes:
  • New callback "VoteUpdated()" to know who is casting what votes, and what is the result.
  • new method GetCurrentRankingForLogin(), which is like GetCurrentRankings(), but for a specific login or list of logins. (useful for teammode as GetCurrentRankings() just returns the score for the 2 teams and not for the individual players)
  • ChatSendToLanguage() & ChatSendServerMessageToLanguage() now also work with a login list.
  • SetConnectionRates() and new fields in GetSystemInfo(), was needed to set up the freezone and hot-tune the performance settings.
It has been tested a few days (on freezone servers), so it should be working!

bye...
xavier. - back to coding maniaplanet!

tcq
speedy pilot
speedy pilot
Posts: 380
Joined: 05 Apr 2007 08:09
Location: Germany
Contact:

Re: Dedicated server for TMF, version 2011-02-21

Post by tcq » 24 Feb 2011 00:50

xbx wrote: xavier. - back to coding maniaplanet!
Sounds nice :thumbsup:

Xymph
Pit Crew
Pit Crew
Posts: 5654
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: Dedicated server for TMF, version 2011-02-21

Post by Xymph » 24 Feb 2011 06:51

xbx wrote:Here is a small update with a handful of changes I managed to squeeze in:
Another dedicated... whowouldathunkit? :thumbsup:

A shame that the version number is the same 2.11.26 as in the 2010-03-15 build though. I mailed xbx to hopefully get that fixed asap.
xbx wrote: [*] New callback "VoteUpdated()" to know who is casting what votes, and what is the result.
Now there's a long overdue callback. :wink:
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

xbx
Developer
Developer
Posts: 452
Joined: 12 Aug 2005 14:42
Contact:

Re: Dedicated server for TMF, version 2011-02-21

Post by xbx » 25 Feb 2011 12:52

Xymph wrote:
xbx wrote:Here is a small update with a handful of changes I managed to squeeze in:
Another dedicated... whowouldathunkit? :thumbsup:

A shame that the version number is the same 2.11.26 as in the 2010-03-15 build though. I mailed xbx to hopefully get that fixed asap.
I'm afraid I did this on purpose, "2.11.26" is more about game client and masterserver features, and as this server is transparently compatible, I preferred to keep the version identical.
The builddate on the other hand still allows the xml-rpc plugins to know when they can use the new features.

(who would think making a version scheme is so hard to choose! I think that's one of those little life secrets we don't tell to children not to scare them. :? )
Xymph wrote:
xbx wrote: [*] New callback "VoteUpdated()" to know who is casting what votes, and what is the result.
Now there's a long overdue callback. :wink:
hehe... :1

jamie_macdonald
TM-Patrol
TM-Patrol
Posts: 1612
Joined: 10 Jul 2008 19:48
Owned TM-games: TMUF, TMNF, TMS
Manialink(s): ET
Location: London, UK
Contact:

Re: Dedicated server for TMF, version 2011-02-21

Post by jamie_macdonald » 25 Feb 2011 14:12

Oooh very nice, good to see the new callbacks and updates :thumbsup:

Xymph
Pit Crew
Pit Crew
Posts: 5654
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: Dedicated server for TMF, version 2011-02-21

Post by Xymph » 25 Feb 2011 19:44

xbx wrote:I'm afraid I did this on purpose, "2.11.26" is more about game client and masterserver features, and as this server is transparently compatible, I preferred to keep the version identical.
The builddate on the other hand still allows the xml-rpc plugins to know when they can use the new features.
The latter is true, but if there's only one uniquely identifying number (build date in this case), then IMHO there's little point to another number (version) that doesn't update even when 11 months have elapsed since the previous release. After all, the internal checks on "version >= some number" could just as well use build date too then.
Oh well, what's done is done.
xbx wrote:(who would think making a version scheme is so hard to choose! I think that's one of those little life secrets we don't tell to children not to scare them.)
Hah, indeed. :D
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

Re: Dedicated server for TMF, version 2011-02-21

Post by nocturne » 26 Feb 2011 19:45

Never thought we'd see a new server update.. :thumbsup:

I don't use internal callvotes or team mode, so is there anything in the updated version I should worry about?
Chief Janitorial Supervisor of the Let'sRock! TM community : www.LetsRock-TM.com

User avatar
maniactwister
sunday driver
sunday driver
Posts: 71
Joined: 01 Jun 2010 00:37
Owned TM-games: TMU, TMUF, TM2
Manialink(s): tdracer
Contact:

Re: Dedicated server for TMF, version 2011-02-21

Post by maniactwister » 24 Mar 2011 16:53

Is it possible that since the latest server-version the votings are accepted at once? My Vote Radio is at 0.7 but nevertheless the voting is immediately successful.
Image
"My english is not the yellow from the egg ..." ;)

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Dedicated server for TMF, version 2011-02-21

Post by Ant » 28 Apr 2011 22:16

This is gonna come across as quite a noob thing to have a problem with, but I really am still not too familiar with the linux setup.

I was wondering what is the best way to upgrade the dedicated from the previous version ? It seems i'm not doing something quite right even though all permissions are set the same as the previous version.

Whenever I think "right, this looks ok" I start it up and always get a segmentation fault - the config is fine, matchsettings file is copied over, and all tracks are copied to folders that the matchsettings file points to.

I renamed my TMF directory to TMF (backup) and then made a new directory called TMF which I copied/updated the relevant files to. After checking all permissions (i'm sure they are fine) and starting the server, I just can't stop these segmentation faults from happening !

For now I have reverted to the backup (renamed it back to TMF and named the new folder TMF (new version))

So everything is there for me to swap over again, but can anyone point me in the right direction if i'm doing something fundamentally stupid here please ?? I'm just stuck and I really shouldn't be - and I want to update the dedicated before I upgrade to XAseco v1.13

Any help or pointers at all is greatly appreciated !

User avatar
lille79
Pit Crew
Pit Crew
Posts: 881
Joined: 09 Dec 2007 15:04
Owned TM-games: TMN, TMNF, TMUF
Location: Norway
Contact:

Re: Dedicated server for TMF, version 2011-02-21

Post by lille79 » 28 Apr 2011 23:18

Don't know if my help and linux can ever be a success, but in windows, I just replace the old .exe-file with the new one. But I don't know if permissions and stuff will be an obstacle to that solution in linux.
/lille79
Old man of the Norwegian Trackmania team Super Sheep Racing
To visit my homepage/blog, and download the usbTMFserver, this is the place to go.

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Dedicated server for TMF, version 2011-02-21

Post by Ant » 29 Apr 2011 04:12

Yeah, with permissions set to 754, this is what it gives me if I do that:

Code: Select all

Starting daemon: TMFServer_dediserver: line 44: 30067 Segmentation fault      ./$DEDINAME /dedicated_cfg=$DEDICONF /game_settings=MatchSettings/$MATCHSETTINGS > /dev/null
I can't see whats wrong to be fair.

Xymph
Pit Crew
Pit Crew
Posts: 5654
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: Dedicated server for TMF, version 2011-02-21

Post by Xymph » 29 Apr 2011 05:49

Leave out the redirection to /dev/null to see more output. And what's in the pertaining ConsoleLog?
Also, you need to stop the old server executable before copying the new one in its place, you can't (or shouldn't try to) replace an executable that's still running. Just stating the obvious. :wink:
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Dedicated server for TMF, version 2011-02-21

Post by Ant » 29 Apr 2011 22:01

Xymph wrote:Leave out the redirection to /dev/null to see more output.

All that produces is this:

Code: Select all

[xxx-ant@letsrock-tm ~]$ sh server start
Starting daemon: TMFServer_dediserver: line 44: 11952 Segmentation fault      ./
$DEDINAME /dedicated_cfg=$DEDICONF /game_settings=MatchSettings/$MATCHSETTINGS
Xymph wrote:And what's in the pertaining ConsoleLog?
Nothing gets entered into any log because it doesn't even start, all thats there is the output from before I stopped the server to try to upgrade.
Xymph wrote:Also, you need to stop the old server executable before copying the new one in its place, you can't (or shouldn't try to) replace an executable that's still running. Just stating the obvious. :wink:
Lol, I know but cheers :)

By the way, if it matters, this is the startup script i'm using:

Code: Select all

#!/bin/sh
#
# made by nouseforname/fufi.
#===================================================================
#===================================================================
# Set the following variables to your system needs
#===================================================================

# Process name followed by "dedi"
NAME=TMFServer_dedi

# path to server folder
SERVERPATH=/home/xxx-ant

# dedicated server folder name
DEDI=TMF

# dedicated executable name
DEDINAME=TrackmaniaServer

# name of dedicated_cfg 
DEDICONF=dedicated_cfg.txt

# name of matchsettings
MATCHSETTINGS=tracklist.txt

# path to log file, could be a webserver folder to use it for status page
LOGPATH=/home/xxx-ant/statuslog

# post fix for log file, the date will be in front eg "2009-06-10_status.log
# use same for ALL servers
LOGNAME="_status.log"

#======================================================================
#============== don't change anything below here ======================
#======================================================================

PIDFILE=$SERVERPATH/$NAME.pid
DATE=` date +"%H:%M:%S"`
LOGDATE=` date +"%Y-%m-%d"`
OLDDATE=` date -d "7 days ago" +"%Y-%m-%d"`
LOG="$LOGPATH/$LOGDATE$LOGNAME"

case "$1" in
  start)
        echo -n "Starting daemon: "$NAME
        cd /
        cd $SERVERPATH/$DEDI
        ./$DEDINAME /dedicated_cfg=$DEDICONF /game_settings=MatchSettings/$MATCHSETTINGS > /dev/null
		PID=`ps -ef | grep $DEDINAME | awk '{print $2;}'`
		set -- $PID
		PID2=$1	
		echo $PID > $PIDFILE
        sleep 1
        echo ""
        echo -n "Waiting."
        sleep 1
        echo -n "."
        sleep 1
        echo -n "."
        sleep 1
        echo -n "."
        sleep 1
        echo "."
	;;
  stop)
        echo -n "Stopping daemon: "$NAME
	 kill `cat $PIDFILE`
	 rm $PIDFILE
        echo "."
	;;
  restart)
        echo -n "Restarting daemon: "$NAME
        echo ""
        $0 stop
        sleep 1
        echo -n "Waiting."
        sleep 1
        echo -n "."
        sleep 1
        echo -n "."
        sleep 1
        echo -n "."
        sleep 1
        echo "."
        $0 start
	;;
    status)
        if [ -f $PIDFILE ] ; then
		if kill -0 `cat $PIDFILE` 2>/dev/null ; then
                echo "$DATE $NAME is running with pid `cat $PIDFILE`." >> $LOG
				cd /
				if [ -f $LOGPATH/$OLDDATE$LOGNAME ] ; then
				rm $LOGPATH/$OLDDATE$LOGNAME
				fi 
		else
		  $0 restart 2>/dev/null
		  echo "$DATE $NAME automatically restarted." >> $LOG
             fi
	  else
		echo "$DATE $NAME was stopped by operator, no action." >> $LOG
        fi
        ;;
  *)
	echo "Usage: "$1" {start|stop|restart|status}"
	exit 1
esac
exit 0
Simply replacing the old exe with the new (and using same permissions) doesn't work by the way - which is starting to frustrate me now !

User avatar
svens
speedy pilot
speedy pilot
Posts: 304
Joined: 05 Dec 2009 23:30
Owned TM-games: TMUF, TMS, TMO
Location: Bern, CH
Contact:

Re: Dedicated server for TMF, version 2011-02-21

Post by svens » 29 Apr 2011 23:33

It's always a good idea to minimize problem sources, so I'd first try to start the server manually.

Would you mind posting the output of the 'id' and 'ls -al' command (executed as the user who will run the server, after cding to the server directory)? Whenever my servers SEGFAULTed it was due to a permission problem, it won't hurt to triple-check them.

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Dedicated server for TMF, version 2011-02-21

Post by Ant » 29 Apr 2011 23:50

Ok, while the server is running with the old exe - this is the output of those commands:

Code: Select all

[xxx-ant@letsrock-tm ~]$ cd TMF
[xxx-ant@letsrock-tm TMF]$ ls -al
total 25820
drwxr-xr-x  5 xxx-ant users     4096 Apr 30 01:54 .
drwxr-xr-x 13 xxx-ant users     4096 Apr 30 01:55 ..
-rw-r--r--  1 xxx-ant users    10932 Mar 19  2010 CommandLine.html
drwxr-xr-x 15 xxx-ant users     4096 Apr 30 01:55 GameData
-rw-r--r--  1 xxx-ant users     2912 Mar 19  2010 ListCallbacks.html
-rw-r--r--  1 xxx-ant users    64459 Mar 19  2010 ListMethods.html
drwxr-xr-x  2 xxx-ant users     4096 Apr 30 01:55 Logs
-rw-r--r--  1 xxx-ant users      890 Feb 18  2010 manialink_dedicatedserver.txt
-rw-r--r--  1 xxx-ant users    33976 Feb 18  2010 Readme_Dedicated.html
drwxr-xr-x  3 xxx-ant users     4096 Apr 30 01:54 RemoteControlExamples
-rwxr-xr--  1 xxx-ant users 13119228 Mar 16  2010 TrackmaniaServer
-rwxr-xr--  1 xxx-ant users 13131181 Apr 29 08:03 TrackmaniaServer (new)
[xxx-ant@letsrock-tm TMF]$ id
uid=503(xxx-ant) gid=100(users) groups=100(users)
[xxx-ant@letsrock-tm TMF]$
By the way, trying to start the server manually (after renaming it to TrackmaniaServer and the other to TrackmaniaServer (old)) this is what I get:

Code: Select all

[xxx-ant@letsrock-tm ~]$ cd TMF
[xxx-ant@letsrock-tm TMF]$ sh TrackmaniaServer
TrackmaniaServer: TrackmaniaServer: cannot execute binary file

Post Reply