sh1ny / WindowsGSM.ArkSurvivalAscended

🧩WindowsGSM plugin that provides Ark Survival Ascended Dedicated server support!
MIT License
29 stars 5 forks source link

Trouble with any Map in ArkSurvivalAscended Plugin on WindowsGSM - Memory Fail #15

Open albatross1 opened 5 months ago

albatross1 commented 5 months ago

Hello,

I am facing an issue with the ArkSurvivalAscended plugin for WindowsGSM where specific map names lead to server crashes upon startup. Below are the details of my configuration and the issues I am encountering:

Environment:

Plugin Version: WindowsGSM.ArkSurvivalAscended 1.21 WindowsGSM Version: 1.23.1 Operating System: Windows 10

Issue Description: When I configure my Ark servers with the map names "TheIsland_WP" and "ScorchedEarth_WP" as recommended, the server crashes immediately upon launch. However, altering the map names to "The Island" and "ScorchedEarth_P" allows the server to start, but the servers then do not appear in the game's server list. This suggests a potential issue with how map names are processed by the plugin.

Configurations:

The Island Config:

ShooterGameServer.exe TheIsland_WP?SessionName=DPs Dedicated Ark Server 24/7?MaxPlayers=69?ServerCrosshair=True?AllowThirdPersonPlayer=True?Port=7777?QueryPort=27015 -server -log -RCONEnabled=True -ForceRespawnDinos -MaxNumOfSaveBackups=5 -UseDynamicConfig -clusterid=DPCluster1 -ServerPlatform=All -UseServerNetSpeedCheck

Scorched Earth Config:

ShooterGameServer.exe ScorchedEarth_WP?SessionName=DPs Dedicated Ark Server 24/7?MaxPlayers=69?ServerCrosshair=True?AllowThirdPersonPlayer=True?Port=7779?QueryPort=27017 -server -log -RCONEnabled=True -ForceRespawnDinos -MaxNumOfSaveBackups=5 -UseDynamicConfig -clusterid=DPCluster1 -ServerPlatform=All -UseServerNetSpeedCheck

Steps to Reproduce:

  1. Configure the Ark server using either "TheIsland_WP" or "ScorchedEarth_WP".
  2. Attempt to launch the server.
  3. Observe that the server application crashes immediately.

Expected Behavior: The server should start successfully without crashing, and the specified maps "TheIsland_WP" and "ScorchedEarth_WP" should load correctly, allowing players to connect.

Actual Behavior: Server crashes when attempting to use "TheIsland_WP" and "ScorchedEarth_WP". Modifying these names to "The Island" and "ScorchedEarth_P" prevents the crashes, but the servers are then invisible to players.

Additional Information: All file paths and permissions have been double-checked. The issue appears to be specifically related to how the map names are set in the configurations.

I would greatly appreciate any assistance or guidance on how to resolve these issues so that I can use the intended map names without causing server instability.

Thank you!

sh1ny commented 5 months ago

That seems weird, TheIsland_WP works perfectly fine here:

image

albatross1 commented 5 months ago

https://github.com/sh1ny/WindowsGSM.ArkSurvivalAscended/assets/1198510/001b2bc6-a5b1-4d20-900c-cd7cceff505b

2024-04-13_14-55-41

That seems weird, TheIsland_WP works perfectly fine here:

@sh1ny can you share your config?

I realized I overlooked a detail previously: when I directly download and initiate the dedicated server from the Steam Client—bypassing GSM—the server starts up but then crashes. However, when I navigate to the dedicatedserver.exe file in the game's binary folder, create a shortcut, and launch the server using that shortcut, it successfully opens a console window displaying all my configurations and indicates "booting..." in the header.

Remarkably, this manual method is the only way I've managed to get the server to progress to this stage without resorting to changing the server name from "Ascended" to "Evolved." This persistent issue seems indicative of a configuration problem, doesn't it?

Additionally, it's worth noting that this setup is on a virtual machine. I've allocated a substantial 40 GB of RAM and an 8-core CPU to ensure it can handle virtually any task, so I wouldn't expect hardware capacity to be a concern—perhaps drivers could play a role? Yet, all drivers have been updated to their latest versions.

Curiously, I'm running other game servers on GSM, such as "Sons of the Forest" and "Palworld," without any complications, which further suggests that hardware capabilities aren't the issue at hand.

DanceMonkey2020 commented 5 months ago

Hello, I had a similar problem. At each step, nothing seems to be abnormal. but seach nothing about my server! Here is the console log:

"maxConcurrentInstallations": 3, "modsDirectory": "ShooterGame/Mods", "modsDirectoryMode": "CFCore", "userDataDirectory": "ShooterGame/ModsUserData", "isServer": true, "isServerPcOnly": false, "throttling": { "diskWriteBytesPerSec": 0 }, "premiumMods": { "publicKeyPem": "*****" }, "logger": { "enabled": true, "history": 8, "maxSizeInMB": 2 } } Couldn't load mods library from disk User context not loaded from disk Primal Game Data Took 0.61 seconds Server Initializing with BattlEye Anti-Cheat Protection. If you do not wish to use BattlEye, please launch with -NoBattlEye BattlEye successfully started. Server: "2070 test" has successfully started! Commandline: TheIsland_WP?listen?SessionName="2070 test"?MultiHome=172.18.137.176?Port=7779?QueryPort=27017?MaxPlayers=10 -culture=en -automanagedmods -servergamelog -servergamelogincludetribelogs -NotifyAdminCommandsInChat -ServerAllowAnsel -game -server -log -USEALLAVAILABLECORES -WinLiveMaxPlayers=10 Full Startup: 76.68 seconds Number of cores 2 No spawn additional explorer notes to spawn

Server Start Param Context:

-culture=en -servergamelog -servergamelogincludetribelogs -NotifyAdminCommandsInChat -ServerAllowAnsel -game -server -log -USEALLAVAILABLECORES

Did I miss something that caused this to happen? I am looking forward to your help. I will appreciate it very much!

albatross1 commented 3 months ago

Hi,

I'm still experiencing issues despite trying several solutions. Here's what I've done so far:

Additionally, I ran the game from Steam without any customization, and it worked fine.

Is there any update or further guidance you can provide?

albatross1 commented 3 months ago

Hello,

I am reaching out again as I am still facing persistent issues with the ArkSurvivalAscended plugin for WindowsGSM. Despite trying numerous solutions, my server continues to crash. Here is a detailed account of my current situation and what I have tried so far:

Environment:

Plugin Version: WindowsGSM.ArkSurvivalAscended 1.21
WindowsGSM Version: 1.23.1
Operating System: Windows 10 (Fresh installation)

Issue Description: After setting up my Ark servers with the map names "TheIsland_WP" and "ScorchedEarth_WP", the server crashes immediately upon launch. This issue persists even after reformatting my computer and performing fresh installations of Windows, DirectX, .NET Framework, and other essential packages. Additionally, I have tested two different plugins, but the problem remains.

Steps Taken:

Reformatted Computer:
    Fresh installation of Windows 10.
    Installed all required DirectX and .NET Framework packages.
Fresh Installations:
    Set up fresh installations from two different plugins.
Configurations:
    Tried various configurations and parameters recommended by the community.
PowerShell Script:
    Used a PowerShell script to ensure the correct setup and logging (details below).

Current Issue: The server still crashes and the logs indicate issues with loading the mods library and user context:

- Couldn't load mods library from disk - User context not loaded from disk

What I've Tried:

Multiple .cs files and forks of the project.
Different configurations and parameters.
Running the game from Steam without customization (works fine).

Additional Information:

Running on a virtual machine with 40 GB RAM and an 8-core CPU.
Other game servers (e.g., "Sons of the Forest", "Palworld") run fine on GSM.
All drivers are up to date.

Different Starts Tried: Despite trying different start commands, the server always looks for mods and crashes, even on a fresh installation. Other people recommended I try this below, as that was working for them for a cluster. But again, all of my setup is completely fresh. Brand new, and I’m getting this issues even before trying the below.

The Island:

TheIsland_WP?listen?SessionName="<serverName>"?Port=7781?QueryPort=27019?RCONEnabled=True?RCONPort=27019?ServerPVE=True?MaxPlayers=30?ServerAdminPassword=<AdminPass> -WinLiveMaxPlayers=30 -Mods=<mods> -clusterid=<clusterid> -ClusterDirOverride=D:\Servers\ASA -NoBattlEye -NoTransferFromFiltering -ServerGameLogIncludeTribeLogs -ServerGameLog -AutoManagedMods -ServerRCONOutputTribeLogs -game -server -AutoDestroyStructures -culture=en -UseServerNetSpeedCheck -ForceRespawnDinos

Scorched:

ScorchedEarth_WP?listen?SessionName="<serverName>"?Port=7783?QueryPort=27020?RCONEnabled=True?RCONPort=27020?ServerPVE=True?MaxPlayers=30?ServerAdminPassword=<AdminPass> -WinLiveMaxPlayers=30 -Mods=<mods> -clusterid=<clusterid> -ClusterDirOverride=D:\Servers\ASA -NoBattlEye -NoTransferFromFiltering -ServerGameLogIncludeTribeLogs -ServerGameLog -AutoManagedMods -ServerRCONOutputTribeLogs -game -server -AutoDestroyStructures -culture=en -UseServerNetSpeedCheck -ForceRespawnDinos

The Center:

TheCenter_WP?listen?SessionName="<serverName>"?Port=7785?QueryPort=27021?RCONEnabled=True?RCONPort=27021?ServerPVE=True?MaxPlayers=30?ServerAdminPassword=<AdminPass> -WinLiveMaxPlayers=30 -Mods=<mods> -clusterid=<clusterid> -ClusterDirOverride=D:\Servers\ASA -NoBattlEye -NoTransferFromFiltering -ServerGameLogIncludeTribeLogs -ServerGameLog -AutoManagedMods -ServerRCONOutputTribeLogs -game -server -AutoDestroyStructures -culture=en -UseServerNetSpeedCheck -ForceRespawnDinos

I really need help resolving this issue and would greatly appreciate any assistance or guidance you can provide.

Thank you!

albatross1 commented 3 months ago

Adjusted the title to fit the ongoing issue. I've not spent countless days trying to figure out this issue. Do these dedicated servers "require" mods? A vanilla setup is asking for mods, like I'm missing mods. What mods do I need? I just want the server to start, but it won't get passed needing mods that I don't even want.

I've tried adding mods just for the heck of it, I gave it 5 mods, it still doesn't see the mods and give the same error below no matter what. That's after adding the mods to the parameter and updating the appropriate game.ini files to accommodate those mods. It still won't see the mods. See adding the mods or deleting the whole computer and starting fresh. Either way it wants mods it will never find see or use and crashes on start.

I've tried adding flags to specifically define no mods, I've tried adding the folder renaming the folders, adding lines to the right files to add or remove mods, I'm pulling my hair out. Not only that, but I don't understand how a fresh installation of windows, fresh installation of everything require and start it still complains about mods are missing.

image

I'm getting to a point where I'll just pay someone to help me get this working. SOS.

albatross1 commented 3 months ago

Update from GSM discord: It's not an error, it just mentions that you don't have mods installed (the game always looks if mods are installed)

Did you try to connect via IP? The nameserver list is a bit difficult sometimes.

If ip connect works, but server list not: either try: set your public IP in click Edit Config => server IP. (only on ark, most games require local IP's here) make sure all Ports are correctly forwarded , see screenshot

image

The parameters on the lower port are automatically set to what is set in Edit config Window (Server Port and Server Query Port)

Created this sanity script to help validate everything.

# Title: ARK Server Setup, Dependency Installer, and Port Checker

# Function to log messages with timestamp
function Log-Message {
    param (
        [string]$message
    )
    $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
    Write-Host "[$timestamp] $message"
    Add-Content -Path "./ArkServerSetupLog.txt" -Value "[$timestamp] $message"
}

# Function to install DirectX
function Install-DirectX {
    try {
        Log-Message "Checking DirectX installation..."
        $directxSetupPath = "$env:SystemRoot\System32\dxdiag.exe"
        if (Test-Path $directxSetupPath) {
            Log-Message "DirectX is already installed."
        } else {
            Log-Message "DirectX not found. Installing..."
            $directxUrl = "https://www.microsoft.com/en-us/download/details.aspx?id=35"
            $directxInstaller = "$env:TEMP\directx_redist.exe"
            Invoke-WebRequest -Uri $directxUrl -OutFile $directxInstaller -ErrorAction Stop
            Start-Process -FilePath $directxInstaller -ArgumentList "/Q /T:$env:TEMP\directx" -NoNewWindow -Wait
            Start-Process -FilePath "$env:TEMP\directx\DXSETUP.exe" -ArgumentList "/silent" -NoNewWindow -Wait
            Log-Message "DirectX installation completed."
        }
    } catch {
        Log-Message "Error during DirectX installation: $_"
    }
}

# Function to check .NET Framework
function Check-DotNetFramework {
    try {
        Log-Message "Checking .NET Framework installation..."
        $release = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue
        if ($release.Release -ge 528040) {
            Log-Message ".NET Framework 4.8 or later is installed."
        } else {
            Log-Message "Warning: .NET Framework 4.8 or later is not installed."
            Log-Message "Please download and install .NET Framework 4.8 manually from:"
            Log-Message "https://dotnet.microsoft.com/download/dotnet-framework/net48"
        }
    } catch {
        Log-Message "Error checking .NET Framework: $_"
        Log-Message "Please ensure .NET Framework 4.8 or later is installed manually."
    }
}

# Function to install Visual C++ Redistributables
function Install-VisualCpp {
    try {
        Log-Message "Checking Visual C++ Redistributables installation..."
        $vcRedistUrls = @(
            "https://aka.ms/vs/17/release/vc_redist.x64.exe",
            "https://aka.ms/vs/17/release/vc_redist.x86.exe"
        )
        foreach ($url in $vcRedistUrls) {
            $vcRedistInstaller = "$env:TEMP\vc_redist.exe"
            Invoke-WebRequest -Uri $url -OutFile $vcRedistInstaller -ErrorAction Stop
            Start-Process -FilePath $vcRedistInstaller -ArgumentList "/quiet /norestart" -NoNewWindow -Wait
        }
        Log-Message "Visual C++ Redistributables installation completed."
    } catch {
        Log-Message "Error during Visual C++ Redistributables installation: $_"
    }
}

# Function to check if a port is open
function Test-Port {
    param(
        [string]$hostname,
        [int]$port
    )
    $tcp = New-Object System.Net.Sockets.TcpClient
    try {
        $tcp.Connect($hostname, $port)
        return $true
    } catch {
        return $false
    } finally {
        $tcp.Dispose()
    }
}

# Execute installation functions with verbose logging
Install-DirectX
Check-DotNetFramework
Install-VisualCpp

# Define paths
$serverFilesPath = "C:\Users\Administrator\Desktop\WindowsGSM\servers\3\serverfiles\ShooterGame"
$iniFilePath = "$serverFilesPath\Saved\Config\WindowsServer\GameUserSettings.ini"

# Check server configuration and ports
try {
    Log-Message "Checking server configuration and ports..."

    # Ensure server password does not contain special characters or capital letters
    $serverPassword = "apple"
    if ($serverPassword -match "[^a-z0-9]") {
        Log-Message "Error: Server password contains invalid characters."
    }

    # Check if required ports are open
    $portsToCheck = @(7777, 27015, 27020)
    $publicIP = "REDACTED"  # Using the provided public IP

    foreach ($port in $portsToCheck) {
        if (Test-Port -hostname $publicIP -port $port) {
            Log-Message "Port $port is open."
        } else {
            Log-Message "Warning: Port $port is not open. Please check your port forwarding settings."
        }
    }

    # Set public IP in server configuration
    $publicIPSetting = "PublicIP=$publicIP"
    if (!(Get-Content $iniFilePath | Select-String -Pattern $publicIPSetting)) {
        Add-Content -Path $iniFilePath -Value $publicIPSetting
        Log-Message "Set PublicIP in GameUserSettings.ini: $publicIP"
    }

    # Ensure correct port settings in GameUserSettings.ini
    $portSettings = @(
        "Port=7777",
        "QueryPort=27015",
        "RCONPort=27020"
    )
    foreach ($setting in $portSettings) {
        if (!(Get-Content $iniFilePath | Select-String -Pattern $setting)) {
            Add-Content -Path $iniFilePath -Value $setting
            Log-Message "Added $setting to GameUserSettings.ini"
        }
    }

} catch {
    Log-Message "Error during configuration checks: $_"
}

Log-Message "Setup and port checking completed."

# Provide instructions for manual connection
Log-Message "To connect to the server directly, use the following IP and port: $publicIP:7777"
Log-Message "If the server doesn't appear in the server list, try connecting via this IP and port."
albatross1 commented 3 months ago

Still crashing either way.

https://github.com/sh1ny/WindowsGSM.ArkSurvivalAscended/assets/1198510/b5145c80-cbaf-40db-93e6-18e9db93fd34

albatross1 commented 3 months ago

Here’s a summary of what I've done with help in the GSM discord:

Issue Summary:
    The game crashes with a "Ran out of memory" error when trying to start with the map "TheIsland_WP".
    The game runs fine with a batch file and with the map "TheIsland".
    There's plenty of RAM (45 GB), and you've adjusted the page file size.
    Removed the -lowmem parameter but the issue persists.

Steps Taken:
    Modified the WindowsGSM plugin to use StartPath instead of overrideStartPath.
    Ran the server executable directly with a batch file, and it worked initially but still crashed after a while.
    Attempted to use different virtual GPU options without success.

     Additional Notes:

All attempts with different map names result in the same issue.

Other game servers running on GSM work fine.

The server works when run directly from a batch file but crashes when using WindowsGSM.

Tried to run the game from Steam without customization, and it worked fine.

Log Extracts and Errors:

Couldn't load mods library from disk. (Normal Message)

User context not loaded from disk. (Normal Message)

Persistent "Ran out of memory" errors in Event Viewer. <--- Possible issue although I don't know why. I have plenty of ran