StunlockStudios / vrising-dedicated-server-instructions

V Rising Dedicated Server Instructions
474 stars 45 forks source link

Unity error when running dedicated server in VMs - unable to connect #143

Open cmalo11 opened 6 months ago

cmalo11 commented 6 months ago

When running the v1.0 dedicated server in a VM (tried a clean install of W10 and W11), the log file is spammed constantly with this Unity error which prevents connecting to the server:

PlatformSystemBase - SetServerData - Init! NullReferenceException: Object reference not set to an instance of an object. at
ProjectM.ServerBootstrapSystem.UpdatePlatformData () [0x00000] in <00000000000000000000000000000000>:0 at
ProjectM.ServerBootstrapSystem.OnUpdate () [0x00000] in <00000000000000000000000000000000>:0 at
Unity.Entities.SystemBase.Update () [0x00000] in <00000000000000000000000000000000>:0 at
Unity.Entities.ComponentSystemGroup.UpdateAllSystems () [0x00000] in <00000000000000000000000000000000>:0 at
Unity.Entities.SystemBase.Update () [0x00000] in <00000000000000000000000000000000>:0 at
Unity.Entities.ComponentSystemGroup.UpdateAllSystems () [0x00000] in <00000000000000000000000000000000>:0 at
Unity.Entities.SystemBase.Update () [0x00000] in <00000000000000000000000000000000>:0 at
Unity.Entities.ComponentSystemGroup.UpdateAllSystems () [0x00000] in <00000000000000000000000000000000>:0 at
Unity.Entities.TimeableComponentSystemGroup.OnUpdate () [0x00000] in <00000000000000000000000000000000>:0 at
Unity.Entities.SystemBase.Update () [0x00000] in <00000000000000000000000000000000>:0
UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems() Unity.Entities.SystemBase:Update()
Unity.Entities.ComponentSystemGroup:UpdateAllSystems() Unity.Entities.SystemBase:Update()
Unity.Entities.ComponentSystemGroup:UpdateAllSystems() Unity.Entities.TimeableComponentSystemGroup:OnUpdate()
Unity.Entities.SystemBase:Update()

This issue does not appear when following the same setup instructions on a baremetal PC. When this error is happening, clients cannot connect, the server is not listed on Steam's server listings, but RCON does work and Steam API does find the server on 27016.

I have successfully run pre v1.0 dedicated servers on my VM infrastructure without any issues.

Info about the VM configs tried: Hypervisor: Proxmox OS: W10 and W11 CPU: 4 cores RAM: 16GB (ballooning off and on) Storage: 128GB

I tried the VirtIO drivers on W10, as well as the defaults, no changes.

LanDaze commented 6 months ago

I meet same issue. I also running my server on proxmox VMs. When I set "ListOnEOS" to "true", server crashes with the same logs.

There are some more information, says EOS dll not found:

EOSPlatformSystem - Entering OnCreate!
Using EOS Release Deployment ID on LIVE.
Initialised EosPlatformanager
Create EOSPlatformManager
DllNotFoundException: Unable to load DLL 'EOSSDK-Win64-Shipping'. Tried the load the following dynamic libraries: Unable to load dynamic library 'EOSSDK-Win64-Shipping' because of 'Failed to open the requested dynamic library (0x06000000) - The specified module could not be found.  (WinError:0000007e)
at Epic.OnlineServices.Bindings.EOS_Initialize (Epic.OnlineServices.Platform.InitializeOptionsInternal& options) [0x00000] in <00000000000000000000000000000000>:0
at Epic.OnlineServices.Platform.PlatformInterface.Initialize (Epic.OnlineServices.Platform.InitializeOptions& options) [0x00000] in <00000000000000000000000000000000>:0
at ProjectM.EOS.EosPlatformManager..ctor (ProjectM.EOS.EOSSDK.EosClientData settings) [0x00000] in <00000000000000000000000000000000>:0
at ProjectM.EOS.EosPlatformManager.Initialise (ProjectM.EOS.EOSSDK.EosClientData settings) [0x00000] in <00000000000000000000000000000000>:0
at ProjectM.Auth.EOSPlatformSystem.OnCreate () [0x00000] in <00000000000000000000000000000000>:0
at Unity.Entities.ComponentSystemBase.CreateInstance ([Unity.Entities.World](http://unity.entities.world/) world) [0x00000] in <00000000000000000000000000000000>:0
at [Unity.Entities.World](http://unity.entities.world/).AddSystem_OnCreate_Internal (Unity.Entities.ComponentSystemBase system) [0x00000] in <00000000000000000000000000000000>:0
at [Unity.Entities.World](http://unity.entities.world/).GetOrCreateSystemsAndLogException (Unity.Collections.NativeList1[T] types, System.Int32 typesCount, Unity.Collections.AllocatorManager+AllocatorHandle allocator) [0x00000] in <00000000000000000000000000000000>:0    at Unity.Entities.World.GetOrCreateSystemsAndLogException (Unity.Collections.NativeList1[T] types, Unity.Collections.AllocatorManager+AllocatorHandle allocator) [0x00000] in <00000000000000000000000000000000>:0
at Stunlock.Core.WorldBootstrapUtilities.AddSystemsToWorld ([Unity.Entities.World](http://unity.entities.world/) world, Stunlock.Core.WorldBootstrap worldConfig, Stunlock.Core.WorldSystemConfig worldSystemConfig) [0x00000] in <00000000000000000000000000000000>:0
at ProjectM.Bootstrap.Unity.Entities.ICustomBootstrap.Initialize (System.String defaultWorldName) [0x00000] in <00000000000000000000000000000000>:0
at Stunlock.Core.WorldBootstrapUtilities.InitializeDefaultWorldWithBootstrap (System.String defaultWorldName) [0x00000] in <00000000000000000000000000000000>:0
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
LanDaze commented 6 months ago

Finally found the resolution.

V Rising dedicated server EOS needs DirectX runtimes and Visual C++ Redistributable runtimes installed. (from reddit: https://www.reddit.com/r/vrising/comments/1cn8lmt/comment/l35righ/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button) DirectX: https://www.microsoft.com/en-us/download/details.aspx?id=8109 Visual C++: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

Otherwise we must disable "ListOnEOS".

TechToasterTwo commented 3 days ago

So I've updated both DirectX and Visual C++ but I am still getting this same error. Is there anything else that could be causing this aside from DirectX and Visual C++ needing to be installed since they are, 150%, beyond a shadow of any reasonable doubt, installed.

I am getting the same exact error message as posted above.