Jump to content

Invalid Server token


Recommended Posts

hello everyone, so whenever i want to run my dedicated server i run to a problem...the console says:
[00:00:00]: PersistRootStorage is now APP:Klei//DoNotStarveTogether/MyDediServer/Master/ 
[00:00:00]: Starting Up
[00:00:00]: Version: 173373
[00:00:00]: Current time: Mon Apr 18 14:43:59 2016

[00:00:00]: Don't Starve Together: 173373 WIN32
NNN Build Date: 551
[00:00:00]: Parsing command line
[00:00:00]: Command Line Arguments: -console -cluster MyDediServer -shard Master 
[00:00:00]: [WARNING] -console has been deprecated: Use the [MISC] / console_enabled setting instead.
[00:00:00]: Initializing Minidump handler
[00:00:00]: ....Done
[00:00:00]: Fixing DPI
[00:00:00]: ...Done
[00:00:00]: THREAD - started 'GAClient' (6904)
[00:00:00]: CurlRequestManager::ClientThread::Main()
[00:00:00]: ProfileIndex:4.11
[00:00:00]: [Connect] PendingConnection::Reset(true)
[00:00:00]: Network tick rate: U=15(2), D=0
[00:00:00]: Network tick rate: U=15(2), D=0
[00:00:00]: Authorized application D:\Steam Dedicated\steamapps\common\Don't Starve Together Dedicated Server\bin\dontstarve_dedicated_server_nullrenderer.exe is enabled in the firewall.
[00:00:00]: WindowsFirewall - Application already authorized
[00:00:00]: OnLoadPermissionList: APP:Klei//DoNotStarveTogether/MyDediServer/blocklist.txt (Failure)
[00:00:00]: THREAD - started 'ConsoleInput' (7844)
[00:00:00]: OnLoadPermissionList: APP:Klei//DoNotStarveTogether/MyDediServer/adminlist.txt (Failure)
[00:00:00]: OnLoadUserIdList: APP:Klei//DoNotStarveTogether/MyDediServer/whitelist.txt (Failure)
[00:00:00]: cGame::InitializeOnMainThread
[00:00:00]: Renderer initialize: Okay
[00:00:00]: AnimManager initialize: Okay
[00:00:00]: Buffers initialize: Okay
[00:00:00]: cDontStarveGame::DoGameSpecificInitialize()
[00:00:00]: FMOD Error: An invalid object handle was used. 
[00:00:00]: GameSpecific initialize: Okay
[00:00:00]: cGame::StartPlaying
[00:00:00]: LOADING LUA
[00:00:00]: DoLuaFile scripts/main.lua
[00:00:00]: DoLuaFile loading buffer scripts/main.lua
[00:00:00]: scripts/main.lua(166,1) running main.lua
	
[00:00:00]: loaded modindex	
[00:00:00]: ModIndex: Beginning normal load sequence for dedicated server.
	
[00:00:00]: DownloadMods(0)
[00:00:00]: FMOD Error: An invalid object handle was used. 
[00:00:01]: LOADING LUA SUCCESS
[00:00:01]: PlayerDeaths could not load morgue	
[00:00:01]: PlayerHistory could not load player_history	
[00:00:01]: bloom_enabled	false	
[00:00:01]: Could not load saveindex	
[00:00:01]: OnFilesLoaded()	
[00:00:01]: OnUpdatePurchaseStateComplete	
[00:00:01]: 	Load FE	
[00:00:01]: 	Load FE: done	
[00:00:01]: ModIndex: Load sequence finished successfully.	
[00:00:01]: Reset() returning
[00:00:04]: [200] Account Failed (6): "E_INVALID_TOKEN"
[00:00:04]: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[00:00:04]: !!!! Your Server Will Not Start !!!!
[00:00:04]: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[00:00:04]: No auth token could be found.
[00:00:04]: To generate a cluster_token you must
[00:00:04]: open the console from a logged-in game
[00:00:04]: client with the tilda key (~ / ů) and type:
[00:00:04]: TheNet:GenerateClusterToken()
[00:00:04]: This will create 'cluster_token.txt' in
[00:00:04]: your client settings directory. Copy this
[00:00:04]: into your cluster settings directory.
[00:00:04]: [Connect] PendingConnection::Reset(true)
  • yes the cluster_token.txt is actually as .txt file
  • yes i have it in the correct path location,
  • yes  the documents folder that i'm editing from is the default documents folder of my system(no matter where i put it, it always says YOUR SEVER WILL NOT START)

can someone help me out? i'm really getting wrecked i've been engaged with this problem for 3 days now...

Link to comment
Share on other sites

14 hours ago, Drvv01f said:

[WARNING] -console has been deprecated: Use the [MISC] / console_enabled setting instead.

 

14 hours ago, Drvv01f said:

[200] Account Failed (6): "E_INVALID_TOKEN"

I guess these are the resons the server failed to start, it has been some months since last time I made a dedicated server, if i have time, I will see if I can create one and then I share how to do it.

Link to comment
Share on other sites

This is actually the part that matters, and it also describes the solution:

Quote
[00:00:04]: No auth token could be found.
[00:00:04]: To generate a cluster_token you must
[00:00:04]: open the console from a logged-in game
[00:00:04]: client with the tilda key (~ / ů) and type:
[00:00:04]: TheNet:GenerateClusterToken()
[00:00:04]: This will create 'cluster_token.txt' in
[00:00:04]: your client settings directory. Copy this
[00:00:04]: into your cluster settings directory.

You need to generate a cluster_token.txt file using your game client and place it in your cluster folder, or using the website as described in the Dedicated server quick setup guide:

Do keep in mind that you have to copy the File itself, not the content, as the file may contain invisible symbols, that may not be copied over, if you just copy the text.

Link to comment
Share on other sites

post in forum so others can have their problems solved too

Quote

Do keep in mind that you have to copy the File itself, not the content, as the file may contain invisible symbols, that may not be copied over, if you just copy the text.

i just copy paste the cluster_token file in myDediserver file and it still says the same thing

i also added few mods to my server isn't that related to this cluster token thing? are my mods corrupted or somthin?

Link to comment
Share on other sites

first, just create a world the way you want, add the server mods (if you use any), moddify the world gen/world settings (if you want).

after creating the world, instead of choosing your character, disconnect and in the game menu click in "data", clicking there will take you to the directory where your wolrd is saved, your worlds are probably inside a folder with random numbers, so you have to move the world you just create outside the folder with numbers to "DoNotStarveTogether", mine is C:\Users\Admin\Documents\Klei\DoNotStarveTogether and change the name of the file to JustAdedicatedServer.

obs: if you dont know what is the cluster (the name of the file of your world) you can click "host game" in the game menu, then click "manage world"

image.png.98e30774170e762acbb0f7b662d61e0b.png

mine is "Cluster_1" per example.

So now your world is in the right place and with a proper name, now you have to go to Steam, right click dont starve together then click properties->local files->explore, this will lead you to where all the files necessary to run dst are, then click bin64, inside this folder, you create a text document and insert the code below

cd /D "%~dp0"
dontstarve_dedicated_server_nullrenderer_x64.exe -only_update_server_mods
start "My DST Server Master" dontstarve_dedicated_server_nullrenderer_x64.exe -cluster JustAdedicatedServer -shard Master
start "My DST Server Caves"  dontstarve_dedicated_server_nullrenderer_x64.exe -cluster JustAdedicatedServer -shard Caves

(If your world dont have caves, erase the entire line that end with -shard caves)

About the name of text document file, it can be anything, mine is servidor_dedicado per example, but the name doenst matter, the only thing that matters is to save the document as .bat or save as .txt and change to .bat after.

Now you need your token, to get the token you need to open dst, and run the command TheNet:GenerateClusterToken() in the console, running this code in the console will create a token for you, the token will be inside the folder where your worlds are saved (the folder with random numbers or the folder where all your worlds are), now you just cut this file and paste it inside JustAdedicatedServer folder (remember that the folder JustAdedicatedServer cant be in the folder with random number, it must be in DoNotStarveTogether folder).

Right, by any chace, if your dedicated server dont have mods, you actually dont need to do anything else, just click in the .bat file that you created and your dedicated server will start running.

But, if you put any mods in your world, then you need to go again in Steam->dont starve together->properties->local files->explore, this time, instead of going to bin64, you need to go in the mods folder, inside this folder, there will be an .lua with the name "dedicated_server_mods_setup.lua" (if there inst a file with this name, you can create one by yourself), this is the file where you need to put all the IDs of the mods you are using, to get the ID is pretty simple, just click in "more info"

image.thumb.png.83e3a09ea871db14d97b88bcebd29544.png

this will lead you to the site of the mod with the ID

image.png.b903ab6aae0e06e9179b12306f5a8db6.png

now, inside the file dedicated_server_mods_setup.lua, you need to write  the follow command

ServerModSetup("")

then put the ID inside the "", you need to do this to every mod you added to your world

in this case, to put the [API] gem core as mod of the server, I need to write

ServerModSetup("1378549454") inside dedicated_server_mods_setup.lua

just an example of a dedicated server with 3 mods

image.png.632a032c28bfa312cc030de46f442f17.png

Do it to every mod you added to your world, and just run the .bat file, thats it, now you have a modded dedicated server running in you computer.

I hope you understood everything, I will leave a vid here of me doing it.

 

Link to comment
Share on other sites

17 hours ago, dois raios said:

首先,按照你想要的方式创建一个世界,添加服务器模组(如果你使用任何),修改世界基因/世界设置(如果你想要)。

after creating the world, instead of choosing your character, disconnect and in the game menu click in "data", clicking there will take you to the directory where your wolrd is saved, your worlds are probably inside a folder with random numbers, so you have to move the world you just create outside the folder with numbers to "DoNotStarveTogether", mine is C:\Users\Admin\Documents\Klei\DoNotStarveTogether and change the name of the file to JustAdedicatedServer.

obs: if you dont know what is the cluster (the name of the file of your world) you can click "host game" in the game menu, then click "manage world"

图片.png.98e30774170e762acbb0f7b662d61e0b.png

mine is "Cluster_1" per example.

So now your world is in the right place and with a proper name, now you have to go to Steam, right click dont starve together then click properties->local files->explore, this will lead you to where all the files necessary to run dst are, then click bin64, inside this folder, you create a text document and insert the code below

cd /D "%~dp0"
dontstarve_dedicated_server_nullrenderer_x64.exe -only_update_server_mods
start "My DST Server Master" dontstarve_dedicated_server_nullrenderer_x64.exe -cluster JustAdedicatedServer -shard Master
start "My DST Server Caves"  dontstarve_dedicated_server_nullrenderer_x64.exe -cluster JustAdedicatedServer -shard Caves

(If your world dont have caves, erase the entire line that end with -shard caves)

About the name of text document file, it can be anything, mine is servidor_dedicado per example, but the name doenst matter, the only thing that matters is to save the document as .bat or save as .txt and change to .bat after.

Now you need your token, to get the token you need to open dst, and run the command TheNet:GenerateClusterToken() in the console, running this code in the console will create a token for you, the token will be inside the folder where your worlds are saved (the folder with random numbers or the folder where all your worlds are), now you just cut this file and paste it inside JustAdedicatedServer folder (remember that the folder JustAdedicatedServer cant be in the folder with random number, it must be in DoNotStarveTogether folder).

Right, by any chace, if your dedicated server dont have mods, you actually dont need to do anything else, just click in the .bat file that you created and your dedicated server will start running.

But, if you put any mods in your world, then you need to go again in Steam->dont starve together->properties->local files->explore, this time, instead of going to bin64, you need to go in the mods folder, inside this folder, there will be an .lua with the name "dedicated_server_mods_setup.lua" (if there inst a file with this name, you can create one by yourself), this is the file where you need to put all the IDs of the mods you are using, to get the ID is pretty simple, just click in "more info"

图片.thumb.png.83e3a09ea871db14d97b88bcebd29544.png

this will lead you to the site of the mod with the ID

图片.png.b903ab6aae0e06e9179b12306f5a8db6.png

现在,在文件 dedicated_server_mods_setup.lua 中,您需要编写以下命令

ServerModSetup("")

然后将 ID 放在 "" 中,你需要对添加到你的世界中的每个 mod 执行此操作

在这种情况下,要将 [API] gem 核心作为服务器的 mod,我需要编写

ServerModSetup("1378549454") inside dedicated_server_mods_setup.lua

只是一个带有 3 个模组的专用服务器的例子

图片.png.632a032c28bfa312cc030de46f442f17.png

对您添加到您的世界的每个模组执行此操作,然后只需运行 .bat 文件,就是这样,现在您的计算机上运行了一个模组化的专用服务器。

我希望你明白一切,我会在这里留下我这样做的视频。

 

Hi, I followed your steps successfully on windows, but when I put the JustAdedicatedServer folder on my cloud server and started the server, I got this error again. Below is the log:

log.txt

this is my start.sh

start.txt

By the way, when I use the script from the dedicated server quick setup guide, the program gets stuck.

I would appreciate any help you can provide :)

 

Link to comment
Share on other sites

6 hours ago, feng123 said:

Hi, I followed your steps successfully on windows, but when I put the JustAdedicatedServer folder on my cloud server and started the server, I got this error again. Below is the log:

log.txt 5.2 kB · 1 download

this is my start.sh

start.txt 157 B · 2 downloads

By the way, when I use the script from the dedicated server quick setup guide, the program gets stuck.

I would appreciate any help you can provide :)

 

[00:00:01]: Token file not found: /root/.klei//DoNotStarveTogether/JustAdedicatedServer/cluster_token.txt, success: F, len: 0

[00:00:05]: [200] Account Failed (6): "E_INVALID_TOKEN"

Hi, the log says that the token where not found in JustAdedicatedServer Folder, if you have the token in another folder, put the token inside the JustAdedicatedServer folder, if you dont have the token, then create a token via console or https://accounts.klei.com/account/game/servers?game=DontStarveTogether then you cut the cluster_token.txt and paste it inside JustAdedicatedServer.

Maybe doing this it will work, but I am not sure, since I dont use linux ;-;

Link to comment
Share on other sites

23 hours ago, dois raios said:

[00:00:01]: Token file not found: /root/.klei//DoNotStarveTogether/JustAdedicatedServer/cluster_token.txt, success: F, len: 0

[00:00:05]: [200] Account Failed (6): "E_INVALID_TOKEN"

Hi, the log says that the token where not found in JustAdedicatedServer Folder, if you have the token in another folder, put the token inside the JustAdedicatedServer folder, if you dont have the token, then create a token via console or https://accounts.klei.com/account/game/servers?game=DontStarveTogether then you cut the cluster_token.txt and paste it inside JustAdedicatedServer.

Maybe doing this it will work, but I am not sure, since I dont use linux ;-;

After your reminder, I realized that I forgot to switch users, so I re-used the root user to follow the steps in the quick guide, and then I got this:
server_log.txt

image.thumb.png.6d91f9bae24ec9e4b7b67440a3517d7e.png

Here is my start.sh:

(The first line is to enter the "/root/dontstarvetogether_dedicated_server/bin64" folder, and the second line calls "dontstarve_dedicated_server_nullrenderer_x64")

image.thumb.png.a0da836d1bbdc8d9b1aa0942d50d73d3.png

Can you see what I'm doing wrong?
Thanks again for taking the time to help me!

Link to comment
Share on other sites

20 hours ago, feng123 said:

经过你的提醒,我才意识到我忘记切换用户了,所以我重新使用root用户按照快速指南中的步骤操作,然后我得到了这个:
服务器日志.txt

图片.thumb.png.6d91f9bae24ec9e4b7b67440a3517d7e.png

这是我的 start.sh:

(第一行是进入“/root/dontstarvetogether_dedicated_server/bin64”文件夹,第二行调用“dontstarve_dedicated_server_nullrenderer_x64”)

图片.thumb.png.a0da836d1bbdc8d9b1aa0942d50d73d3.png

你能看出我做错了什么吗?
再次感谢您抽出时间帮助我!

I couldn't get it to work in docker, then I re-followed the steps on my own server and everything worked. I don't know why, but all in all, the problem is solved, thanks for the help, lol

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...