Jump to content

Unable To Find Server Logs


derklempner

Recommended Posts

I have installed the 7DTD dedicated server using steamcmd on my Ubuntu 22.04 server. I've tried both the current stabl;e release (A20.7) and experimental (A21). Regardless of the game version, whenever I launch it by calling the executable manually, there are no logs being generated. I've looked in both the following places:

 

<homefolder>/.config/unity3d/The Fun Pimps/7 Days To Die - Dedicated/
<homefolder>/<gamefolder>/7DaysToDieServer_Data/

 

I've been having a terrible time getting the server to run any RWG maps, as it crashes just seconds after launch (again , both A20.7 and A21). It runs fine if I select the Navezgane map, so since I can't find the log files, I can't find out why it keeps crashing.

 

Any suggestions?

Link to comment
Share on other sites

On 6/29/2023 at 7:48 PM, meganoth said:

Start the game through startserver.sh.

 

If you read that script (especially the last line) you will see it calls the executable with a parameter "-logfile". I would assume without that parameter no logfile.

 

Okay, looking at the startserver.sh file, I did find the last line contains:

 

./7DaysToDieServer.x86_64 -logfile $SERVERDIR/7DaysToDieServer_Data/output_log__`date +%Y-%m-%d__%H-%M-%S`.txt -quit -batchmode -nographics -dedicated $PARAMS

 

So the -logfile flag is present, but the file still isn't being created when I run the server. I've already reinstalled the server twice, once with A20.7 and now with A21. I'll try reinstalling A20.7 and see what happens.

Edited by derklempner (see edit history)
Link to comment
Share on other sites

1 hour ago, derklempner said:

 

Okay, looking at the startserver.sh file, I did find the last line contains:

 

./7DaysToDieServer.x86_64 -logfile $SERVERDIR/7DaysToDieServer_Data/output_log__`date +%Y-%m-%d__%H-%M-%S`.txt -quit -batchmode -nographics -dedicated $PARAMS

 

So the -logfile flag is present, but the file still isn't being created when I run the server. I've already reinstalled the server twice, once with A20.7 and now with A21. I'll try reinstalling A20.7 and see what happens.

 

Did you use the script? Last time you said you launched the executable directly, not the script

 

This is not a problem of A21, installing A20.7 will not help you.

I have a linux server and it has been generating logfiles for ages and A21 is no exception. You are doing something different than I do and it is causing the problem.

 

 You could try out the script i am using on my server in ${HOME}/bin that simply starts the server and it is as follows:

#!/bin/sh

cd ${HOME}/CURRENT/
nohup ./startserver.sh -configfile=serverconfig.xml &>/dev/null &

 

Replace CURRENT with your servers directory name and you also need to "chmod a+x <script>" so you can execute it. It will start the server in the background by the way, so having the command line be back is no error.

 

Also you could test this: Change into the 7DaysTodDieServer_Data directory and execute "touch xzybla". If you get an error message it means you don't have writing privileges in that dir for some strange reason.

 

 

 

Edited by meganoth (see edit history)
Link to comment
Share on other sites

Okay, installed A20.7, set a RWG world at a size of 10240, and tried starting it. Immediately got a segmentation fault error:

http://derklempner.org/pics/A20_7-segmentation-fault.png ("Insert image from URL" wouldn't accept my URL.)

 

I checked the 7DaysToDieServer_Data folder, and, again, there are no log files at all. So I decided to change the startserver.sh script to link directly to that folder (instead of using a variable) and started the server again. The exact same segfault error occurred, but this time there was an output log! Yay! Here's the link:

https://pastebin.com/HsQDxvak

 

I see at the end of the log it says the GameName variable had some invalid characters, so I went back and changed it. I restarted the server, and it seems to be running away, creating my new world. I don't know how long my world generation will take, but I'll follow up if there's any more issues.

 

meganoth, I know I didn't give you much to work with, but thanks for, at the very least, pointing me at the shell script. It was there that gave me the idea to change the line that finally created a log file, which is where I found what I thought might be the possible issue, and now it seems to be building the world.

 

EDIT: And I see you were replying while I was doing all the above and replying myself!

 

25 minutes ago, meganoth said:

Did you use the script? Last time you said you launched the executable directly, not the script

 

Yeah, by saying I was executing it manually, I meant the script. I was using the startserver.sh script this whole time, honest. It's just that the last line where it tells where to create the log file wasn't actually creating it because the $SERVERDIR variable just wasn't telling it to put it where it should. I replaced that variable with a direct path to the same folder, and the logs were created normally.

Edited by derklempner (see edit history)
Link to comment
Share on other sites

Is it possible you copied the startserver.sh script to somewhere else?

 

The first line of the script sets $SERVERDIR to the directory where the script itself is located. If you moved the script somewhere else and execute it, it would not even find the executable, i.e. 7DaysToDieServer.x86_64 and stop immediately.

 

Link to comment
Share on other sites

On 7/1/2023 at 6:53 PM, meganoth said:

Is it possible you copied the startserver.sh script to somewhere else?

 

The first line of the script sets $SERVERDIR to the directory where the script itself is located. If you moved the script somewhere else and execute it, it would not even find the executable, i.e. 7DaysToDieServer.x86_64 and stop immediately.

 

I didn't move anything. Just a standard install, no changes. Maybe because I'm not IN the game directory when I start it? I start it from my user's home directory, so the command I use is:

 

./7dtdserver/startserver.sh -configfile=serverconfig.xml

 

Maybe I need to be in the ./7dtdserver directory when I launch it.

Link to comment
Share on other sites

2 hours ago, derklempner said:

 

I didn't move anything. Just a standard install, no changes. Maybe because I'm not IN the game directory when I start it? I start it from my user's home directory, so the command I use is:

 

./7dtdserver/startserver.sh -configfile=serverconfig.xml

 

Maybe I need to be in the ./7dtdserver directory when I launch it.

 

Ok. I tried your way of calling it with my server, which is located in /home/days/server.a21.0/. And it created new directories inside so that the logfile was

 

/home/days/server.a21.0/server.a21.0/7DaysToDieServer_Data/output_log__2023-07-04__20-19-42.txt

 

Note the two "server.a21.0".

 

This is because the script first creates the variable SERVERDIR as relative path "./server.a21.0/", and then changes into server.a21.0/ with "cd".

And then the server is started and it creates "./server.a21.0/7DaysToDieServer_Data/output..." in the server directory with all intermediate directories.

 

A correct script would use "realpath" for example to convert the path to an absolute path before using dirname.

 

Edited by meganoth (see edit history)
Link to comment
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
×
×
  • Create New...