# Linux Dedicated Server Issue v4.19

**URL:** <https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842>\
**Category:** Platform & Builds\
**Tags:** dedicated-server, Linux, unreal-engine, question\
**Created:** [April 17, 2018, 1:39am UTC](https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842 "2018-04-17T01:39:15Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_adb01925](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_adb01925](https://forums.unrealengine.com/u/anonymous_user_adb01925)\
**Post date:** [April 17, 2018, 1:39am UTC](https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842/1 "2018-04-17T01:39:15Z")

</div>

Hi there

I’m having difficulty running a Linux Dedicated Server build with v4.19.0.

I have cross-compiled my project for LinuxServer using the latest version of the toolchain (v 11).

It compiles fine. However, when I attempt to run it on my server, nothing happens. No log, no process, no nothing. Just a blinking cursor in my terminal.

I get the same result with a blank project.

My UE4 is built from source. My server is running Ubuntu 16.04. I am not doing anything fancy in the build settings.

The same setup worked fine using v4.18 and toolchain v10. Also, the same project built for WindowsNoEditor runs fine.

Is there something I might be missing?

---

<div class="post-metadata">

**Author:** ![Flash7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Flash7](https://forums.unrealengine.com/u/Flash7)\
**Post date:** [April 17, 2018, 1:58am UTC](https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842/2 "2018-04-17T01:58:08Z")

</div>

Hm… My project with similar setup, but with CentOS works fine. Also, you can place your own write to log functionality, to test if your code is being executed.  
But how did you compile with v11? For me, I had to disable warnings as errors to compile. the engine compiles fine, but the project itself fails. Here is a thread about it: [Non-portable path to file:when building project for linux - Platform & Builds - Unreal Engine Forums](https://answers.unrealengine.com/questions/770085/non-portable-path-to-filewhen-building-project-for.html)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_adb01925](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_adb01925](https://forums.unrealengine.com/u/anonymous_user_adb01925)\
**Post date:** [April 17, 2018, 9:00am UTC](https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842/3 "2018-04-17T09:00:59Z")

</div>

Not sure what to tell you, it just worked! I didn’t do anything special, just set my environment variable to point to the new toolchain.

How do you setup custom log writes?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_adb01925](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_adb01925](https://forums.unrealengine.com/u/anonymous_user_adb01925)\
**Post date:** [April 19, 2018, 7:38am UTC](https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842/4 "2018-04-19T07:38:49Z")

</div>

Bumping this, as I still haven’t managed to find a solution.

Has anyone managed to run a dedicated server built with v4.19 on Ubuntu?

---

<div class="post-metadata">

**Author:** ![Flash7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Flash7](https://forums.unrealengine.com/u/Flash7)\
**Post date:** [April 19, 2018, 11:58am UTC](https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842/5 "2018-04-19T11:58:19Z")

</div>

Just for curiosity, can you try to run it on CentOS as it is officially supported platform?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_adb01925](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_adb01925](https://forums.unrealengine.com/u/anonymous_user_adb01925)\
**Post date:** [April 20, 2018, 12:13am UTC](https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842/6 "2018-04-20T00:13:21Z")

</div>

I just tried running it on CentOS 7 with the exact same result. No log output etc

This is literally a blank 4.19 project packaged using the latest toolchain and which received no errors during packaging.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_adb01925](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_adb01925](https://forums.unrealengine.com/u/anonymous_user_adb01925)\
**Post date:** [April 23, 2018, 4:00am UTC](https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842/7 "2018-04-23T04:00:04Z")

</div>

Bumping this again.

This is starting to seem like it may be some kind of issue with v 4.19. (If so, a fairly major one)

I suspect it may in fact be the same issue being described in this post: [Linux dedicated server doesn't show log information - Platform & Builds - Epic Developer Community Forums](https://answers.unrealengine.com/questions/773515/linux-dedicated-server-no-show-log-information.html)

So far I have established that:

- There are no errors or warnings in the build log.

- WindowsServer builds run fine on a Windows machine with no errors or warnings in the log.

- LinuxNoEditor builds will run on a Linux server. Obviously the client build does not run properly on the server, but all the errors are correctly printed to stdout.

- LinuxServer builds DO NOT run properly. Nothing is printed to stdout. No error message, no log. Server does not start up.

- The problem is the same on Ubuntu 16.04 and CentOS 7.

- The problem can be replicated using a blank project.

It would be great to know from Epic (or anyone) whether this problem can be replicated and is related to v4.19. That way at least I can stop spending time on it.

Otherwise any suggestions as to how to go about trying to debug this would be much appreciated.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8a143666](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8a143666](https://forums.unrealengine.com/u/anonymous_user_8a143666)\
**Post date:** [April 23, 2018, 1:14pm UTC](https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842/8 "2018-04-23T13:14:19Z")

</div>

I ran into a similar looking problem as well. I was trying to build the ShooterGame demo for a dedicated linux server. To make sure that the packing is done correctly try this

```
<PATH TO UE4>\Engine\Build\BatchFiles\RunUAT -ScriptsForProject=<PATH TO PROJECT>\<ProjectName>.uproject BuildCookRun -project=<PATH TO PROJECT>\<ProjectName>.uproject -noP4 -serverconfig=Development -utf8output -platform=Linux -server -serverplatform=Linux -targetplatform=Linux -build -cook -allmaps -compressed -stage -pak -archive -unversionedcookedcontent -archivedirectory="<WHERE TO PUT THE PACKAGED THING>"

```

The next thing to try is to run **strace** on the server executable you are running. Somewhere near the button of my strace I had a “(Cannot allocate memory)”.

If this is the case try using a swapfile, this got the server to print stuff correctly to the screen for me. Even though it worked without a swap on Digital Ocean severs. I’m was running on Linode server and had todo this to get it working. First run the commands below to make the swapfile and then try running the server again.

```
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

```

This creates a swapfile in / of the size of 2GB, changes permissions, makes it swap and turns the swap on. You can roll this back by running the following commands:

```
sudo swapoff /swapfile
sudo rm /swapfile

```

Let me know where you get with this and I will try and help you further.

---

<div class="post-metadata">

**Author:** ![RCL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RCL](https://forums.unrealengine.com/u/RCL)\
**Post date:** [April 23, 2018, 3:06pm UTC](https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842/9 "2018-04-23T15:06:03Z")

</div>

Thanks for bringing this to our attention. We’ll adjust the pool set up (you can use UE-58073 for tracking).

---

<div class="post-metadata">

**Author:** ![Flash7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Flash7](https://forums.unrealengine.com/u/Flash7)\
**Post date:** [April 23, 2018, 3:22pm UTC](https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842/10 "2018-04-23T15:22:05Z")

</div>

void UGameFunctionLibrary::LogToFile(const FString &String, const FString &StringSeparator, const FString &String2, EGameDirPath DirectoryPath, const FString &LogFileName)  
{  
FString strOut = String;  
if(String2.Len() \> 0)  
{  
strOut += StringSeparator + String2;  
}

```
	FString FileName = GetDirPath(DirectoryPath);

	FileName += LogFileName;

	auto ansi_fileName = StringCast<ANSICHAR>(*FileName);
	auto ansi_TextOut = StringCast<ANSICHAR>(*strOut);

	FILE *f = NULL;
	
#if defined(_MSC_VER)
	fopen_s(&f, ansi_fileName.Get(), "ab");
#else
	f = fopen(ansi_fileName.Get(), "ab");
#endif
	
	if(f != 0)
	{
		fwrite(ansi_TextOut.Get(), ansi_TextOut.Length(), 1, f);
		fwrite("\n", 1, 1, f);
		fflush(f);
		fclose(f);
	}
}
```

---

<div class="post-metadata">

**Author:** ![Flash7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Flash7](https://forums.unrealengine.com/u/Flash7)\
**Post date:** [April 23, 2018, 3:23pm UTC](https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842/11 "2018-04-23T15:23:41Z")

</div>

This is how I write my log into file. Works of cause in shipping builds as well.

---

<div class="post-metadata">

**Author:** ![Flash7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Flash7](https://forums.unrealengine.com/u/Flash7)\
**Post date:** [April 23, 2018, 3:29pm UTC](https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842/12 "2018-04-23T15:29:38Z")

</div>

RCL, it is not directly related to this problem, but can you take a look at [Error: non-portable path to file when building Unreal Editor for Linux on Windows - Platform & Builds - Unreal Engine Forums](https://answers.unrealengine.com/questions/733486/error-non-portable-path-to-file-when-building-unre.html)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_adb01925](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_adb01925](https://forums.unrealengine.com/u/anonymous_user_adb01925)\
**Post date:** [April 24, 2018, 10:46am UTC](https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842/13 "2018-04-24T10:46:48Z")

</div>

Thanks a lot. The swapfile worked for me

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8a143666](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8a143666](https://forums.unrealengine.com/u/anonymous_user_8a143666)\
**Post date:** [April 24, 2018, 11:16am UTC](https://forums.unrealengine.com/t/linux-dedicated-server-issue-v4-19/422842/14 "2018-04-24T11:16:16Z")

</div>

Great! I’m glad that this got things working for you. I’m also glad you made this thread as well because it seems like it caught the attention of the unreal devs and now has been fixed. Looks like the fix will be released with 4.19.2 [Unreal Engine Issues and Bug Tracker (UE-58073)](https://issues.unrealengine.com/issue/UE-58073)
