Jump to content

Dedicated Server not working on Linux


V3cta

Recommended Posts

Hey guys, tried to set up a dedicated Server on my linux server, but can't get it to work. Right now everytime I start the server, this appears:

 

7d2derror.png.efadf2ef7241e0c46908c6b8e65afeaf.png

 

Followed different tutorials and it just shows this. At the end I want to use different scripts to start/stop the server, so I got a launch sh with this in my home folder with this content:

 

1681627767_Annotation2019-10-30190634.jpg.12a995333c425b737589ef8ab71ca9ff.jpg

 

Even when I cd in my 7d2d folder and run the serverstart.sh (like in every tutorial I could find), this comes up. Hope somebody can help, thanks.

Link to comment
Share on other sites

Ignore this CreateDirectory '' failed message ... that's not a big bugger, at least I've got it too and I'm able to run the server anythough.

 

It's more important to show us your output_log which should be created when starting the server. If you don't have a clue what to look for there, simply copy the whole text in the log und post it by using pastebin.com

Link to comment
Share on other sites

If the server is working, you will eventually see this in the server console:

 

 

Using config file: serverconfig.xml

CreateDirectory '' failed: (current dir: )

[s_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.

Setting breakpad minidump AppID = 251570

 

 

It might take a while for the last two lines to appear, especially if it is generating a new map - that can take a LOT of time.

 

The second line means nothing. It always does that no matter what I do.

 

The third line only occurs if steam is not running under the same user account that the server is. This does not stop the server from working.

 

The last line only appears when the server is done initializing, and until that appears your players won't be able to join.

 

The server log does not show these lines, but does give a ton of information about the server startup status. When the server is done initializing, the last few lines in the log file should be:

 

2019-10-31T09:11:37 52.247 INF StartGame done

2019-10-31T09:11:38 52.882 INF [steamworks.NET] GameServer.Init successful

2019-10-31T09:11:38 52.886 INF [steamworks.NET] Making server public

2019-10-31T09:11:39 54.221 INF [steamworks.NET] GameServer.LogOn successful, SteamID=90130151842897926, public IP=24.251.5.195

2019-10-31T09:11:42 57.698 INF Calculating hashes took 5851 ms (world size 1001 MiB)

2019-10-31T09:11:49 64.451 INF [DECO] written 821/1675

 

If you get this in the log, the server us up and running, and you should try to join it to make sure all is well.

 

If you don't get that last bit after a while ( a minute or two for normal server startup, anywhere from ten minutes to hours if generating a new map), then something is wrong and the log file should give you a clue as to what went wrong.

Link to comment
Share on other sites

2019-10-30T19:22:21 1437.864 INF NET: LiteNetLib server could not be started
2019-10-30T19:22:21 1437.865 INF NET: LiteNetLib server stopped
2019-10-30T19:22:21 1437.868 ERR NET: Starting server protocols failed: CreateSocketOrThreadFailure
2019-10-30T19:22:21 1437.868 ERR Error starting dedicated server: CreateSocketOrThreadFailure
2019-10-30T19:22:21 1437.869 INF Make sure all required ports are unused: 26900/TCP, 26900/UDP, 26901/UDP, 26902/UDP

 

... looks like you're already running another 7dtd server using the same ports on the same machine?

 

You can try to change your servers port to 26903 instead of 26900 (in serverconfig.xml)

 

Also you can check if there is already a running 7dtd server using the "top" command in your linux terminal (once you started top, you can leave it by hitting q). If you found a entry for an 7dtd server in top, you could stop it with "kill <process id, shown in top>" command. Unsaved data will be lost then of course.

Link to comment
Share on other sites

Thank you so much! It works now. Think one server instance didn't close properly, now it works with a new port! One more question: Can I show the output in my terminal rather than a file? And thank you for the info with the top command.

Link to comment
Share on other sites

Can I show the output in my terminal rather than a file?

 

You don't mean opening the logfile in an texteditor (nano, vi, vim, ...) in your terminal, but to get it shown as a output in realtime?

 

Don't know, may be possible. But I don't have enough linux knowledge to tell you without looking it up.

 

STDOUT or bash redirection may be hints to look for.

Link to comment
Share on other sites

Thank you so much! It works now. Think one server instance didn't close properly, now it works with a new port! One more question: Can I show the output in my terminal rather than a file? And thank you for the info with the top command.

 

You can show anything written to the logfile in realtime with "tail -f <logfile".

Link to comment
Share on other sites

If something is using the port, the solution is not to change your port, it is to kill whatever is using the port. Reboot the box if necessary if you can't find/kill the rogue process.

 

You can tail the log file like meganoth said, I do that sometimes. Sometimes I telnet into the server so I have an interactive console. Not only will it echo the output, but you can type commands to manage the server as well. Tail only works if you already have a console or have ssh'd into the server, and you need to know the path/name of the current log file. Telnet should work from any box on the network.

Link to comment
Share on other sites

If something is using the port, the solution is not to change your port, it is to kill whatever is using the port. Reboot the box if necessary if you can't find/kill the rogue process.

 

You can tail the log file like meganoth said, I do that sometimes. Sometimes I telnet into the server so I have an interactive console. Not only will it echo the output, but you can type commands to manage the server as well. Tail only works if you already have a console or have ssh'd into the server, and you need to know the path/name of the current log file. Telnet should work from any box on the network.

 

My first solution was to kill the process. But I couldn't find anything related to the server, so I changed the port. And thanks for the infos. I will try that, but I'm not sure why every other server I'm running is able to output it to the console directly, but 7D2D can't, weird stuff. :D

Link to comment
Share on other sites

My first solution was to kill the process. But I couldn't find anything related to the server, so I changed the port. And thanks for the infos. I will try that, but I'm not sure why every other server I'm running is able to output it to the console directly, but 7D2D can't, weird stuff. :D

 

On Linux you could easily find what process is using the port, but tbh I stopped using Windows ten years ago and am not sure how to do that on Windows anymore. If you are feeling ambitious and have the resources, you could always crank up a Linux box/VM and give it a shot. I switched from Windows to Linux for my game servers years ago, and 80 % of the problems and 90% of the frustration went away overnight, simply by getting rid of Windows.

 

Ark is the same way. Nothing gets output to the console that the server is run from, you have to telnet in. It's a design decision that someone somewhere made, but I could not tell you why they did that. And I agree, most game servers will output/input from the same shell/console that the server is started from. I currently run a couple of minecraft servers, four Half-Life/OP4 servers, an Ark server and my 7D servers. Over the course of the past 20 years I've run a variety of other game servers, and ONLY Ark and 7D will have a "dead" console when you start the game server. <shrug>

Link to comment
Share on other sites

OHhh you said you were using LInux, my bad....

 

This shows the two ports the 7D server is using:

 

netstat -tulpn | grep Die

tcp 0 0 0.0.0.0:27666 0.0.0.0:* LISTEN 1411/./7DaysToDieSe

tcp 0 0 0.0.0.0:8083 0.0.0.0:* LISTEN 1411/./7DaysToDieSe

udp 0 0 0.0.0.0:27666 0.0.0.0:* 1411/./7DaysToDieSe

udp 0 0 0.0.0.0:27668 0.0.0.0:* 1411/./7DaysToDieSe

 

You see the port I specified, 27666, and the telnet port 8083. But surprise surprise, it is also using 27668.

 

If you want to see who is using a specific port starting with 2766:

 

netstat -tulpn | grep 2766

tcp 0 0 0.0.0.0:27666 0.0.0.0:* LISTEN 1411/./7DaysToDieSe

udp 0 0 0.0.0.0:27666 0.0.0.0:* 1411/./7DaysToDieSe

udp 0 0 0.0.0.0:27668 0.0.0.0:* 1411/./7DaysToDieSe

Link to comment
Share on other sites

Which distro are you using? Ubuntu is popular, but I switched several servers from Ubuntu to Slackware and several problems went away. Ubuntu is Linux for the unwashed masses, good for the beginner, good for those with little technical know-how, good for those who want an OS to just do it for them, but poorly suited to any professional usage (I apologize for the huge can of worms I just opened). And then there is the systemd debacle....Slackware has not given into the systemd hype, which is one reason I still use Slackware instead of Debian, where I kinda-sorta cut my teeth back when I was dabbling with kernel code but I digress....

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...