Persistent PC Dedicated Server link

Terrial

Terrarian
Does a Persistent PC Dedicated Server link exist? I'm trying to write a script which will always pull from the latest stable version of the dedicated server for the purposes of running a headless server on a linux x86_64 box. Some games use a download API with a json file listing versions. If anyone can point me to anything like this, it would be much appreciated.

Another question, not related to this, but maybe someone knows. When running the dedicated server for linux, starting from version 1.4.0.1, the mono DLLs seem to no longer be functioning and I've had to use the work around listed on the wiki - Server page to delete the mono DLLs and run it using a full installed version of mono. While this works, I would prefer to not use this work around as I lose the ability to utilize the TerrariaServer.bin.x86_64 binary.

Any help for either of these issues would be appreciated - thanks.

Edit, I couldn't find a place for linux questions, so hopefully this is an okay place for this question.
 
This isn't really up my alley, and I'm really rusty on all things Linux. But I'll try to answer anyway. It might be the only answer you get as there doesn't seem to be that many Linux people around here.

For your first question, I assume you are talking about pulling the latest dedicated server.zip from terraria.org, then extract the linux version somewhere. No I don't think there is a persistent link. So you will have to parse at least a part of the page to find the link, and then query the modification date to see if it's newer than what you currently have. I don't know how Re-Logic feel about that. They might not like having robots doing that. Maybe @Tunnel King or @Leinfors can anwer that.

For your second question, can't you make symlinks to the mono libraries when you extract the latest TerrariaServer? It seems to me it would be better to have only one version of mono installed. When updating that would make things easier. I assume you are trying to set up a server with multiple instances of TerrariaServer.
 
@r4v1n6 Thanks for your reply.

You are correct regarding how I intend to use the dedicated server link. Parsing the webpage is one thing I was thinking about, it's certainly easy to find the version ID in their current implementation, but my script would quickly break if Re-Logic ever changed their file structure or moved the download button. I can't imagine why anyone would be opposed to the parsing of a webpage, there are crawlers which do so many times per second already. I'm just surprised that I can't find a more defined API for download purposes.
Just for the sake of examples,
Factorio has an API for latest releases: https://factorio.com/api/latest-releases, which allows for the download in the format of: https://www.factorio.com/get-download/{version}/{build}/{distro}
Minecraft has an API for all versions, https://launchermeta.mojang.com/mc/game/version_manifest.json, which drills down to a download package for a stable release.

It would be really nice if such a thing existed for Terraria.

Regarding mono, the DLLs which are provided with the latest linux Terraria server package seem to be incompatible with the executable. Previously the server could be run without installing mono itself because it was running using the provided DLLs, which has the added benefit of not needing to install mono. I am not terribly familiar with mono, but poking around its install directory I'm finding what look like the same DLL files. I'll try playing around with what you've suggested here symlinking the files. Perhaps if this works I will keep a copy of the latest version and just manually copy them into the directory. This is the only service I run which requires mono, and I just didn't want to need to install the full mono package if possible (just my own OCD in keeping my server slim).

Great suggestions, really helped to give me more ideas to work with!
 
Replacing the mono DLLs with symlinks to the latest version's DLLs (Debian 5.18.0.240+dfsg-3, using 4.7.2-api) does appear to allow the TerrariaServer.exe to be run without needing the full mono call of mono --server --gc=sgen -O=all ./TerrariaServer.exe. Which means it could be packaged with these new versions, however TerrariaServer.bin.x86_64 still cannot be run. It appears to be an internal error:

Runtime critical type System.RuntimeType not found

Native stacktrace:

./TerrariaServer.bin.x86_64() [0x45243d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730) [0x7fc5a4dd4730]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b) [0x7fc5a4c1e7bb]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x121) [0x7fc5a4c09535]
./TerrariaServer.bin.x86_64() [0x5afcde]
./TerrariaServer.bin.x86_64() [0x5afacb]
./TerrariaServer.bin.x86_64() [0x5afb81]
./TerrariaServer.bin.x86_64() [0x492793]
./TerrariaServer.bin.x86_64() [0x4a3693]
./TerrariaServer.bin.x86_64() [0x463abe]
./TerrariaServer.bin.x86_64(mono_main+0x3a6) [0x423626]
./TerrariaServer.bin.x86_64(main+0x34d) [0x420b6d]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fc5a4c0b09b]
./TerrariaServer.bin.x86_64() [0x420bd1]

Debug info from gdb:


=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Aborted


Will likely need Re-Logic support to get it working again.

Quick little script for anyone wanting to replicate this, just fill in your paths in the top two variables,

dir="path_to_terraria_Linux_folder"
#Example api path: /usr/lib/mono/4.7.2-api
monolib="path_to_latest_mono_api_folder"
list=`ls $dir | grep dll | grep -v FNA | grep -v WindowsBase | grep -v .config`

for file in $list
do
rm $dir/$file
ln -s $monolib/$file $dir/$file
done
 
Back
Top Bottom