Jump to content

[DST] Linux Dedicated Server issue - Authentication error


Recommended Posts

Hello all,

I just finished creating a new DST Linux dedicated server (my 2nd) running on an Ubuntu server, but I'm getting an error whenever I try to start up the server - Account Failed (6): "E_INVALID_TOKEN".

I followed these instructions to create the server and they worked perfectly for my first server. The only change I made this time around was the install and dst directories, which I accounted for in the script.

Troubleshooting steps I've taken-

  • I've checked my cluster_token.txt file for unwanted characters and there aren't any.
  • I've also created a new token in case it wouldn't accept my previous token again-still no go.
  • As far as I can tell, the path I'm using is the correct path.
  • I've tried changing the name of the "cluster_token.txt" file to "server_token.txt" based on a post on the klei forums with no luck. (https://forums.kleientertainment.com/topic/64319-200-account-failed-6-e_invalid_token/)

I'm not sure what else to do at this point. Can anyone help? Here's a screenshot of the error (error.png), the entire startup text (error.txt), and my startup script (script.sh). Also, just in case it's relevant, I have the server running in a VM environment using VMware Workstation. I have the network settings set to bridged so that the server has a unique IP address, which it does.

Thanks in advance. Also, I'm new to the forums, so apologies if this post belongs somewhere else.

Link to comment
Share on other sites

Hi and welcome to the forums :D

Sometimes you can't check if the key inside the file is correct, because there can be invisible symbols at the end of the lines for example. Your safest bet is to just copy over the entire file, instead of pasting the token in. Fyi cluster_token.txt is the correct name.

(Also make sure your cluster_token.txt is inside your cluster folder, next to your master and cave folder. Aka it's location has to be: "$HOME/.klei/dst/MyServer/cluster_token.txt")

As far as I've seen everything else is in their respective correct locations. (Not entirely sure why the tutorial uses such a complicated script, since I'm launching both my Shards with 2 lines each, together with the autoupdate would be 3 lines..., but whatever, it should work obviously. xD)

Link to comment
Share on other sites

Thanks for the response.

1 hour ago, Daniel86268 said:

Hi and welcome to the forums :D

Sometimes you can't check if the key inside the file is correct, because there can be invisible symbols at the end of the lines for example. Your safest bet is to just copy over the entire file, instead of pasting the token in. Fyi cluster_token.txt is the correct name.

(Also make sure your cluster_token.txt is inside your cluster folder, next to your master and cave folder. Aka it's location has to be: "$HOME/.klei/dst/MyServer/cluster_token.txt")

I recreated the cluster_token.txt in game, then transferred the file to my Linux VM-I didn't even open the file first. I tried to run the server and got the same results. :(

1 hour ago, Daniel86268 said:

(Not entirely sure why the tutorial uses such a complicated script, since I'm launching both my Shards with 2 lines each, together with the autoupdate would be 3 lines..., but whatever, it should work obviously. xD)

If you have a more efficient way of doing any of this and don't mind sharing, I'd be grateful. Specifically, I'm looking for a way to update the server mods I'm using more quickly-right now I'm doing it manually whenever there's an update (on my test server).

Thanks again for the help.

Link to comment
Share on other sites

I just looked back at the server log, and I saw that it tries to find the items in the parth: "/home/dst/.klei//DoNotStarveTogether/MyServer/". You notice the double slash between .klei and DoNotStarveTogether, which doesn't quite work afaik. I think that's the issue there, but I don't know where it comes from. (Sorry for not noticing it earlier.)

I'm launching my server(s) over screen, which enables me to close the shell and the server continues to run. I launch the following script using "screen -s ./DSTserver.sh" in the linux shell.

#!/bin/bash
cd DSTServer/bin
./dontstarve_dedicated_server_nullrenderer -console -conf_dir PrivateServer -cluster PrivateCluster -shard Master

(Which launches the server in the master shard on the path save directory in "/home/<user name>/.klei/PrivateServer/PrivateCluster". For the Caves I launch the same code inside a second shell window with "-shard Caves". This has the advantage

For all these examples I'm just using some generic paths, edit the directory names as you see fit. :D

If you want to launch both servers (or more) in one shell just either run them in two individual screen instances (you might have to install screen first):

#!/bin/bash
cd DSTServer/bin
screen -S DSTMaster -d -m ./dontstarve_dedicated_server_nullrenderer -console -conf_dir PrivateServer -cluster PrivateCluster -shard Master
sleep 30
screen -S DSTCave -d -m ./dontstarve_dedicated_server_nullrenderer -console -conf_dir PrivateServer -cluster PrivateCluster -shard Caves

And either a small stop script to stop both servers or shut them down manually using "screen -rx" to get the server back tot he shell followed by a "c_shutdown()" to shut it down for both servers.

Otherwise you can launch it the same way as in the tutorial, but shorter (Not sure if this one misses anything, and/or if you need the parent process watcher, haven't looked through the example too much. You might have to edit it a bit. ) :

#!/bin/bash
cd DSTServer/bin
./dontstarve_dedicated_server_nullrenderer -console -monitor_parent_process $$ -cluster PrivateCluster -shard Master &
./dontstarve_dedicated_server_nullrenderer -console -monitor_parent_process $$ -cluster PrivateCluster -shard Caves

 

All mods get updated automaticially on the server launch if you add them into your "<dst server directory>/mods/dedicated_server_mods_setup.lua" file like this:

ServerModSetup("466732225")

Where the number represents the number at the end of the adress you see on the steam workshop page. ("steamcommunity.com/sharedfiles/filedetails/?id=466732225") (I'm just using the no thermal stone durability mod as an example for this case. Replace it with the mod(s) you are using.)

 

Also if you want to autoupdate your DST server on every launch if there's a newer version out there just add the line

./steamcmd.sh +force_install_dir "$install_dir" +login anonymous +app_update 343050 validate +quit

ad somewhere before launching the server itself in the startup script.

 

Link to comment
Share on other sites

On 8/18/2017 at 10:05 AM, Daniel86268 said:

I just looked back at the server log, and I saw that it tries to find the items in the parth: "/home/dst/.klei//DoNotStarveTogether/MyServer/". You notice the double slash between .klei and DoNotStarveTogether, which doesn't quite work afaik. I think that's the issue there, but I don't know where it comes from. (Sorry for not noticing it earlier.)

No worries-I didn't notice it either. You're right though, that did indicate the problem. After doing some investigating, I realized that server was trying to run from an empty path the script had created instead of the path I had intended. After some research, I was able to correct the issue. I changed....

./dontstarve_dedicated_server_nullrenderer -console -cluster "$cluster_name" -shard [Master/Caves]

to...

./dontstarve_dedicated_server_nullrenderer -console -persistent_storage_root "$dontstarve_dir" -conf_dir "$cluster_name" -cluster clusterFiles -shard [Master/Caves]

Thank you for all your help, especially for sharing your code with me. It helped a ton! :D

In case you or anyone else is interested in learning more, this Klei forums post helped me resolve the issue. 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...