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