255

Dedicated Server Quick Setup Guide - Linux

Recommended Posts

myxal    314

Oh, hi... is this still a problem? I checked some of my logs, and I wouldn't pass this repetitive registration as a problem - while I don't see chains of registration 5 minutes apart like you do, there are many chains with even more frequent registrations.

Some ideas/things to check:

  • did you reset filters in the server browser?
  • use some unique name for the server, if you haven't already
  • if the server is running on your local network, can you see it in the LAN browser/connect to it?
  • when you shut the server down, does it log "Removing server from ?? lobby"?

Share this post


Link to post
Share on other sites

I managed to find it and get into the server, some of the ports were not set in the router and the name was messed up in the ini file so i was searching for the wrong server lol. thank you for your help c:

Share this post


Link to post
Share on other sites
sibnew    0

Hello to all! I can not understand why he writes [200] Account Failed (6): "E_INVALID_TOKEN"
generated the key, created cluster_token.txt, since they write this nonsense that there is no key, then this cluster_token.txt was scattered in all server folders))) But when you start the server, it says that [200] Account Failed (6): "E_INVALID_TOKEN"
What am I doing wrong?
Log:

[00:00:00]: PersistRootStorage is now /home/cq/.klei//DoNotStarveTogether/Cluster_1/Master/
[00:00:00]: Starting Up
[00:00:00]: Version: 305472
[00:00:00]: Current time: Thu Feb 14 18:00:56 2019

[00:00:00]: System Name: Linux
[00:00:00]: Host Name: LCQ
[00:00:00]: Release(Kernel) Version: 4.15.0-45-generic
[00:00:00]: Kernel Build Timestamp: #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019
[00:00:00]: Machine Arch: x86_64
[00:00:00]: Don't Starve Together: 305472 LINUX
[00:00:00]: Build Date: 4609
[00:00:00]: Parsing command line
[00:00:00]: Command Line Arguments:
[00:00:00]: Initializing distribution platform
[00:00:00]: ....Done
[00:00:00]: THREAD - started 'GAClient' (4137593664)
[00:00:00]: Mounting file system databundles/klump.zip successful.
[00:00:00]: CurlRequestManager::ClientThread::Main()
[00:00:00]: Mounting file system databundles/shaders.zip successful.
[00:00:00]: Mounting file system databundles/fonts.zip successful.
[00:00:00]: Mounting file system databundles/anim_dynamic.zip successful.
[00:00:00]: Mounting file system databundles/bigportraits.zip successful.
[00:00:00]: Mounting file system databundles/images.zip successful.
[00:00:00]: Mounting file system databundles/scripts.zip successful.
[00:00:00]: ProfileIndex:6.25
[00:00:00]: [Connect] PendingConnection::Reset(true)
[00:00:00]: THREAD - started 'Ping Job Thread' (4130339648)
[00:00:00]: Platform: 1
[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]: Error trying to change cluster setting (NETWORK->cluster_intention) from '' to 'cooperative'
[00:00:00]: THREAD - started 'StreamInput' (4126145344)
[00:00:00]: OnLoadPermissionList: /home/cq/.klei//DoNotStarveTogether/Cluster_1/blocklist.txt (Failure)
[00:00:00]: OnLoadPermissionList: /home/cq/.klei//DoNotStarveTogether/Cluster_1/adminlist.txt (Failure)
[00:00:00]: OnLoadUserIdList: /home/cq/.klei//DoNotStarveTogether/Cluster_1/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]: 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]:   taskgrouplist:    default    Together    
[00:00:00]:   taskgrouplist:    classic    Classic    
[00:00:00]:   taskgrouplist:    cave_default    Underground    
[00:00:00]:   taskgrouplist:    lavaarena_taskset    The Forge    
[00:00:00]:   taskgrouplist:    quagmire_taskset    The Gorge    
[00:00:00]: 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]: Event data unavailable: lavaarena_event_server/lavaarena_achievement_quest_defs
[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]: ServerPreferences could not load server_preferences    
[00:00:01]: bloom_enabled    false    
[00:00:01]: Could not load saveindex    
[00:00:01]: OnFilesLoaded()    
[00:00:01]: OnUpdatePurchaseStateComplete    
[00:00:01]: Klump load on boot started.    
[00:00:01]: Klump files loaded:     0    
[00:00:02]:     Load FE    
[00:00:02]: THREAD - started 'FilesExistAsyncThread' (4087495488)
[00:00:02]: FilesExistAsyncThread started (20202 files)...
[00:00:02]:     Load FE: done    
[00:00:02]: ModIndex: Load sequence finished successfully.    
[00:00:02]: Reset() returning
[00:00:03]: ... FilesExistAsyncThread complete
[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)

Share this post


Link to post
Share on other sites
myxal    314

@sibnew, where did you put cluster_token.txt? It's supposed to be in the cluster directory, not server (shard) directory.

Post the output of ls -l /home/cq/.klei//DoNotStarveTogether/Cluster_1

EDIT:

Quote

[00:00:00]: Command Line Arguments:

Wait, are you actually following any guide? Arguments can't be empty.

Edited by myxal
  • Thanks 1

Share this post


Link to post
Share on other sites
sibnew    0

Many thanks for the advice! but I still have a couple of questions ;-), in which file should I change "tick_rate =" and "-tick"?
cluster.ini?
and if so how should it look? eg:

___________________________________________

[GAMEPLAY]
game_mode = survival
max_players = 6
pvp = false
pause_when_empty = true
-tick [ 60 ]    -----------------  ???

[NETWORK]
cluster_description = Bot
cluster_name = Bot
cluster_intention = cooperative
cluster_password =
tick_rate = [ 60 ]  --------------------  ???

[MISC]
console_enabled = true


[SHARD]
shard_enabled = true
bind_ip = 127.0.0.1
master_ip = 127.0.0.1
master_port = 10889
cluster_key = supersecretkey

___________________________________________

Are brackets correct?

tick_rate = [ 60 ]  or  [60]

-tick [ 60 ]  or -tick = [ 60 ]

Please tell me! I'm a noob )

 

Edited by sibnew

Share this post


Link to post
Share on other sites
myxal    314

@sibnew

According to Residays' guide, tick rate goes into cluster.ini:

[NETWORK]
...
tick_rate = 60

no brackets or anything.

The -tick_rate 60 form is a command-line argument, that would be added to the script launching your servers.

  • Thanks 1

Share this post


Link to post
Share on other sites
Terule    2

Is it possible to run de dedicated server on the Linux subsystem for Windows store version?

Share this post


Link to post
Share on other sites
Jess425    0

I created a dedicated server and it appears to be working. This the last few lines:

Caves:  [00:00:12]: [Shard] Slave LUA is now ready!
Caves:  [00:00:12]: Sim paused
Master: [00:00:20]: Registering master server in US lobby
Caves:  [00:05:11]: Registering slave in US lobby

However, I can't find my server in the list. At first I thought I did something wrong so I deleted my server and started over, paying extra careful attention and it looks like everything is okay but I still can't find the server. 

Any help would be much appreciated.

Share this post


Link to post
Share on other sites
mrozo94    0

Hello,
I am trying to set server on Ubuntu, for now I just copy-pasted all commands from first post (to make sure everything will work fine). I recreated whole process two times, so I guess problem is somewhere else. Server starts on newest version - 360489.

Can you help me?

Server seems to start just fine and then suddenly stops (instantly).

FULL LOGS HERE

Master: [00:01:03]: Sim paused
Master: [00:01:03]: Gameserver logged on to Steam, assigned identity steamid:XXXXXXXXXXXXXXXXXX
Master: [00:01:03]: Best lobby region is aws/EU (ping 26)
Master: [00:01:03]: Registering master server in EU lobby
mrozo@DST-server:~$ Caves:  [00:01:13]: Reconstructing topology
Caves:  [00:01:13]:     ...Sorting points
Caves:  [00:01:13]:     ...Sorting edges
Caves:  [00:01:13]:     ...Connecting nodes
Caves:  [00:01:13]:     ...Validating connections
Caves:  [00:01:14]:     ...Housekeeping
Caves:  [00:01:14]:     ...Done!
Caves:  [00:01:14]: 1 uploads added to server. From server_temp
Caves:  [00:01:14]: About to start a shard with these settings:
Caves:  [00:01:14]:   ShardName: Caves
Caves:  [00:01:14]:   ShardID: 3812037384
Caves:  [00:01:14]:   ShardRole: SLAVE
Caves:  [00:01:14]:   MasterHost: 127.0.0.1
Caves:  [00:01:14]:   MasterBind: (null)
Caves:  [00:01:14]:   MasterPort: 10889
Caves:  [00:01:14]: [Shard] Connecting to master...
Caves:  [00:01:14]: Telling Client our new session identifier: 3CA30A7E7E85F34A
Caves:  [00:01:14]: Parent process is dead, exiting...
Caves:  Updates 0Seconds elapsed: 73.4336 fps:0
Caves:  Saving Dedicated server data...
Caves:  [00:01:14]: Serializing world: session/3CA30A7E7E85F34A/0000000003
Caves:  [00:01:14]: [Shard] Stopping shard mode
Caves:  [00:01:15]: Collecting garbage...
Caves:  [00:01:15]: lua_gc took 0.20 seconds
Caves:  [00:01:15]: ~ShardLuaProxy()
Caves:  [00:01:15]: ~cEventLeaderboardProxy()
Caves:  [00:01:15]: ~ItemServerLuaProxy()
Caves:  [00:01:15]: ~InventoryLuaProxy()
Caves:  [00:01:15]: ~NetworkLuaProxy()
Caves:  [00:01:15]: ~SimLuaProxy()
Caves:  [00:01:15]: Cancelling LuaQueryCallback handle [3]
Caves:  [00:01:15]: lua_close took 0.22 seconds
Caves:  [00:01:15]: CurlRequestManager::ClientThread::Main() complete
Caves:  [00:01:15]: HttpClient2 discarded 0 callbacks.
Caves:  [00:01:15]: Shutting down

Share this post


Link to post
Share on other sites
myxal    314

@mrozo94 - it seems your server is running for 1 minute, then exits because the parent process (the script you executed to start it) has shut down. How are you executing the script? If you're accessing the Linux machine via SSH, then disconnection will quit the parent bash session, causing your server to quit as well.

Also, is this a new server? I'm thinking a similar symptoms may occur when retrofitting takes place, but if you're setting up a new server then this is not the case here.

 

Share this post


Link to post
Share on other sites
mrozo94    0

@myxal Server definitely is not running for 1 minute :p It instantly shut down. I am executing server simply by

./run_dedicated_servers.sh

and my pwd is home location.

I am not closing SSH connection as well.

Share this post


Link to post
Share on other sites
mrozo94    0

I've been trying to hard restart whole server (meaning removing all downloadable files, including generated world and whole Steam and DST).

And It seems like I can create working server, but after closing and restarting (but closing by CTRL+C, not some command) it does not work (logs posted previously). Maybe that is the problem.

How can I restart server properly? Is there any command to do so? Or at least to close server, while it is opened? I could not find any server commands list.

Share this post


Link to post
Share on other sites
myxal    314

@mrozo94, I'm a bit confused by what you expect to do with "restarting".

If you mean to drop all steam/DST-related data so you can start from scratch, deleting steam, DST, created scripts etc should work, but I would not recommend it, and instead simply check for integrity of DST with Steam - have a look here, see the validate command.

Re: issue after closing server - if you get a state when the server is working, verify that both shards work - either visit the caves in-game, or do

pgrep -l dontstarve

which should list 2 processes (You can issue the command via another SSH, or on another virtual terminal, to avoid messing with the running cluster). When you stop the server, both of these processes should be gone.

Re: stopping properly - I don't use Klei's scripts from the first post here, but from what I see in them, starting the server leaves your terminal in the console of the Master shard. Hitting Ctrl+C causes Master to save state and exit, which completes the script, and that causes the Caves shard to save and exit. This should be OK, so simply hitting Ctrl+C once in the master's console should work.

I'm not particularly familiar with Bash's array expansion, so can't say if the script handles this, but - you're not using a directory for the cluster or DST which has a space in the name?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now