Setting up the Server on Linux

  • Installing mono

    Debian, Ubuntu, and derivatives

    Latest Debian/Ubuntu releases

    Code
    1. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
    2. echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
    3. sudo apt-get update && sudo apt-get install mono-complete

    Outdated Ubuntu releases (Ubuntu 12.04/12.10)

    Code
    1. echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list

    CentOS 7, Fedora 19 (and later), and derivatives

    Code
    1. # Run all these commands in a root shell, or as an alternative, you can use sudo
    2. yum install yum-utils
    3. rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
    4. yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
    5. yum update && yum install mono-complete

    Other distributions

    Please refer to the official mono documentation

    Setting up the server

    Debian, Ubuntu, and derivatives

    CentOS 7, Fedora 19 (and later), and derivatives

    Using screen for running server in background

    Setting up

    Debian, Ubuntu and derivatives

    Code
    1. sudo apt-get install screen

    CentOS 6.x/7.x

    Code
    1. yum install screen

    Starting the server

    Code
    1. screen -dmS GTAMULTIPLAYERSERVER -L bash -c 'cd ~/server && mono GrandTheftMultiplayer.Server.exe' &
    2. # Parameter explanation
    3. # screen -dmS = starts a separate shell without directly opening an interface towards it (detached mode). The S param defines a session name for the newly created session, so that it is easier to manage in the future.
    4. # screen -L = basically logs whatever error that is shown by the server through the separate shell into a file for easier reference in the future.
    5. # !IMPORTANT!
    6. # Log output will be saved as screenlog._number_ in the server directory.
    7. # &: IS IMPORTANT IF YOU WANT TO TERMINATE THE PROCESS GRACEFULLY

    Stopping the server

    RECOMMENDED:

    Code
    1. kill $(ps h --ppid $(screen -ls | grep GTAMULTIPLAYERSERVER | cut -d. -f1) -o pid)

    NOT RECOMMENDED: It does not shut down the server gracefully

    Code
    1. screen -S GTAMULTIPLAYERSERVER -X quit

    Troubleshooting

    • System.Net.WebException: Error: SecureChannelFailure (The authentication or decryption has failed.)

    First, Make sure that the masterserver line looks exactly like this: <masterserver>http://master.mta-v.net/api/</masterserver>

    If that does not solve it, make sure ca-certificates-mono is installed.

    Other possible fixes: mozroots --import --ask-remove

    • System.NotImplementedException: The request feature is not implemented (LinuxUnicastIPAddress error)

    Make sure you are not running a old mono version mono -V, anything above 4.5.2 should work fine.

    • Missing method .ctor in assembly or any kind of unimplemented feature error

    Make sure you are not running an outdated mono version.

    At the time of this writing, the current stable mono version available is 4.6.1 and is confirmed to be working perfectly fine.

    To check the currently installed mono version: mono -V

    The post was edited 1 time, last by julice ().