Get the lastest Rust Server dlls

Viproz

Moderator
Moderator
Aug 12, 2014
39
9
8
France
This tutorial will explain how to get the non-experimental dlls easily and not against any rules.

Requirements :
- A linux PC or server or VirtualMachine

I - Installation of SteamCMD (this part will be based on https://developer.valvesoftware.com/wiki/SteamCMD)
I'm skipping the new user step since we won't run the server so very little damage can be done (none in fact)

Open a console (this can be through ssh with PuTTy for example or a simple console if you have a PC running under any version of Linux)
Run the following commands :
Code:
mkdir ~/steamcmd
cd ~/steamcmd
wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz
tar -xvzf steamcmd_linux.tar.gz
./steamcmd.sh
quit
Now you have a working SteamCMD installed.

II - Installation of the Rust Server

Again, open a console or use the previous one.
Now run theses commands :
Code:
cd ~/steamcmd
mkdir rustserver
./steamcmd.sh
login anonymous
force_install_dir rustserver
app_update 258550 validate
quit
You now have downloaded all the dll of Rust Server, they are in ~/steamcmd/rustserver/rust_server_Data/Managed !

You can download them on your computer by using an FTP client using SFTP (port 22) and using your user/password.


I personally have troubles to run the server on Linux, when I look at the logs it says that I'm missing librust and I don't have any librust in the downloaded server version, if anyone know how to run it please let me know :)
 

Viproz

Moderator
Moderator
Aug 12, 2014
39
9
8
France
./rust_server.x86_64 -batchmode -logFile test
But I just tested on my dedicated server (running debian jessie) and even with the -batchmode arg (btw it's weird to write batch instead on bash) it want's a valid X server so you have to use a remote desktop on windows or run ssh with -X arg on linux and install a desktop env in the dedicated server (that's a really weird thing to do too)

Without a X server I'm getting this log :
Code:
Mono path[0] = '/root/steamcmd/rustserver/rust_server_Data/Managed'
Mono path[1] = '/root/steamcmd/rustserver/rust_server_Data/Mono'
Mono config path = '/root/steamcmd/rustserver/rust_server_Data/Mono/etc'
Display is invalid
Failed to initialize ScreenManager
I'll reboot on debian and post the complete log that I'm getting when there is a valid X server
 

balu92

Moderator
Moderator
Jul 11, 2014
338
75
28
33
./rust_server.x86_64 -batchmode -logFile test
But I just tested on my dedicated server (running debian jessie) and even with the -batchmode arg (btw it's weird to write batch instead on bash) it want's a valid X server so you have to use a remote desktop on windows or run ssh with -X arg on linux and install a desktop env in the dedicated server (that's a really weird thing to do too)

Without a X server I'm getting this log :
Code:
Mono path[0] = '/root/steamcmd/rustserver/rust_server_Data/Managed'
Mono path[1] = '/root/steamcmd/rustserver/rust_server_Data/Mono'
Mono config path = '/root/steamcmd/rustserver/rust_server_Data/Mono/etc'
Display is invalid
Failed to initialize ScreenManager
I'll reboot on debian and post the complete log that I'm getting when there is a valid X server
thanks, I was trying with -log and -output and some others, maybe I should have just search for available server arguments :D
 

balu92

Moderator
Moderator
Jul 11, 2014
338
75
28
33
something is not quiet right here:
Code:
Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/.//home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so

Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/lib/home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so
Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/./lib/home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so
Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/lib/home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so
Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/.//home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so
Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/lib/home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so
Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/./lib/home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so
Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/lib/home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so
Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/.//home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so
Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/lib/home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so
Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/./lib/home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so
Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/lib/home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so
Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/.//home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so
Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/lib/home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so
Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/./lib/home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so
Fallback handler could not load library /home/balu/Downloads/rust_leg_server/rust_server_Data/Mono/x86_64/lib/home/balu/Downloads/rust_leg_server/rust_server_Data/Plugins/x86/liblibrust.so
 

Viproz

Moderator
Moderator
Aug 12, 2014
39
9
8
France
I can confirm that launching the server works when you connect to your server with "ssh -X ip" but does not when you don't use the arg, that's a really annoying bug since it shouldn't look for a Display when we use -batchmode

Here is the logs I'm getting when there is a correct Display :
Code:
ibGL error: failed to load driver: swrast
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default
gram GL_ARB_fragment_program_shadow GL_ARB_framebuffer_object GL_ARB_imaging GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow GL_ARB_te$
GLX Extensions: GLX_ARB_create_context GLX_ARB_create_context_profile GLX_ARB_create_context_robustness GLX_ARB_fbconfig_float GLX_ARB_framebuffer_sRGB GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_i$
Setting maxVSyncInterval to 4
Total system RAM: 1980 MiB
Initialize engine version: 4.2.0f4 (38efbd14869d)
FMOD failed to initialize ... Error initializing output device.

(Filename:  Line: 177)

Begin MonoManager ReloadAssembly
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/UnityEngine.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/UnityEngine.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/Assembly-CSharp-firstpass.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/Assembly-CSharp-firstpass.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/Assembly-CSharp.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/Assembly-CSharp.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/Assembly-UnityScript-firstpass.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/Assembly-UnityScript-firstpass.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/Assembly-UnityScript.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/Assembly-UnityScript.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/Facepunch.Actor.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/Facepunch.Actor.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/Facepunch.HitBox.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/Facepunch.HitBox.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/Facepunch.ID.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/Facepunch.ID.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/Facepunch.Movement.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/Facepunch.Movement.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/Facepunch.Prefetch.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/Facepunch.Prefetch.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/Facepunch.Utility.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/Facepunch.Utility.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/LitJSON.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/LitJSON.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/Google.ProtocolBuffers.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/Google.ProtocolBuffers.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/Google.ProtocolBuffers.Serialization.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/Google.ProtocolBuffers.Serialization.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/uLink.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/uLink.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/dfScriptLite.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/dfScriptLite.dll into Unity Child Domain
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/EasyRoads3D.dll (this message is harmless)
Loading /root/steamcmd/rustserver/rust_server_Data/Managed/EasyRoads3D.dll into Unity Child Domain
- Completed reload, in  0.599 seconds
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/System.dll (this message is harmless)
Platform assembly: /root/steamcmd/rustserver/rust_server_Data/Managed/System.Core.dll (this message is harmless)
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/librust
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/librust.so
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/./librust
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/./librust.so
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/librust
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/librust
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/librust.so
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/./librust
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/./librust.so
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/librust
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/librust
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/librust.so
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/./librust
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/./librust.so
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/librust
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/librust
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/librust.so
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/./librust
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/./librust.so
Fallback handler could not load library /root/steamcmd/rustserver/rust_server_Data/Mono/x86_64/librust
DllNotFoundException: librust
  at (wrapper managed-to-native) LibRust:Initialize (string[],int)
  at LibRust.Awake () [0x00000] in <filename unknown>:0

(Filename:  Line: 4294967295)
My logs seems to be more logical than yours, before I had some errors like yours when I tried to launch the game on debian, I think it got fixed with an update, and don't quite remember
 

balu92

Moderator
Moderator
Jul 11, 2014
338
75
28
33
you are running the .x86_64, right? the above one, I posted is the Fallback handler part when I run the *.x86 version
 

Viproz

Moderator
Moderator
Aug 12, 2014
39
9
8
France
I'm getting the exact same log if I launch the x86 or the x86_64, I'm on amd64, I'll try on my i386 ubuntu
 

balu92

Moderator
Moderator
Jul 11, 2014
338
75
28
33
maybe it's cuz I copied the Plugins folder from the linux client
 

Viproz

Moderator
Moderator
Aug 12, 2014
39
9
8
France
So they made available the legacy files orrr?
To be honest I think they forgot to remove them cause you can't get them on windows (there is just a txt file saying it's the wrong branch) :D

For the server, the log file contains lies, it's not at all what's happening, you can see what's happening by running this :
Code:
strac-o readlog -Ff -tt ./rust_server.x86_64 -batchmode -hostname "My Server" -port 28015 -datadir "serverdata/" logFile "log.txt"
I tested to make a symlink with the rust version of libsteam_api.so to /usr/lib/libsteam_api.so and now it's not complaining anymore but on my debian amd64 it seems like the librust.so of the game itself does not work, I'll test more on i386
 

Viproz

Moderator
Moderator
Aug 12, 2014
39
9
8
France
I'm running in a wall here as you can see in the log, if you have an idea let me know ;)

My search just finished, there is the text Cluster_Cycle in Assembly-CSharp-firstpass.dll (don't know if it's useful to know that) :
Code:
viproz@Viproz-System:~/rust_dedicated$ grep -i Cluster_Cycle * -r
Fichier binaire rust_server_Data/Managed/Assembly-CSharp-firstpass.dll concordant
concordant = matching in french.

Edit : After some search, I'm not sure that we download the lastest version of the server, need to be confirmed
 

Attachments

Last edited:

balu92

Moderator
Moderator
Jul 11, 2014
338
75
28
33
ClusterServer contains Cluster_Cycle in that dll, maybe [DllImport("dll")] fails?

C#:
using RustProto;
using System;
using System.Collections;
using System.Diagnostics;
using System.Runtime.InteropServices;
using UnityEngine;

public class ClusterServer : MonoBehaviour
{
    public static ClusterServer Instance;
    public static bool isConnected;

    [DllImport ("librust")]
    public static extern void Avatar_Load (ulong userID);

    [DllImport ("librust")]
    public unsafe static extern void Avatar_Save (byte* data, int size);

    [DllImport ("librust")]
    public static extern int Cluster_Connect ();

    [DllImport ("librust")]
    public static extern void Cluster_Cycle ();

    [DllImport ("librust")]
    public static extern void Cluster_Destroy ();

    public static bool Initialize ()
    {
        GameObject gameObject = new GameObject ("_ClusterServer");
        ClusterServer.Instance = (ClusterServer)gameObject.AddComponent ("ClusterServer");
        return ClusterServer.Instance.Connect ();
    }

    public void Awake ()
    {
    }

    public bool Connect ()
    {
        Object.DontDestroyOnLoad (this);
        if (ClusterServer.Cluster_Connect () == 1) {
            base.StartCoroutine ("MaintainConnection");
            ClusterServer.isConnected = true;
            return ClusterServer.isConnected;
        }
        ClusterServer.isConnected = false;
        return ClusterServer.isConnected;
    }

    [DebuggerHidden]
    private IEnumerator MaintainConnection ()
    {
        ClusterServer.<MaintainConnection>c__Iterator16 <MaintainConnection>c__Iterator = new ClusterServer.<MaintainConnection>c__Iterator16 ();
        <MaintainConnection>c__Iterator.<>f__this = this;
        return <MaintainConnection>c__Iterator;
    }

    public void OnDestroy ()
    {
        if (ClusterServer.isConnected) {
            ClusterServer.Cluster_Destroy ();
        }
    }

    public unsafe void SaveAvatar (ref AvatarUpdate msg)
    {
        byte[] array = msg.ToByteArray ();
        fixed (byte* data = (array != null && array.Length != 0) ? ref array [0] : ref *null) {
            ClusterServer.Avatar_Save (data, array.Length);
        }
    }

    public void Update ()
    {
        if (!Application.isPlaying) {
            return;
        }
        ClusterServer.Cluster_Cycle ();
    }
}