Unable to start FiveM Server

OS Name/Version: Windows 10 Pro 21H2

Product Name/Version: Version 2.3.3

Problem Description: FiveM Server stops unexpectedly - Exit code 1

[20:31:04] [ModuleLoader Info]    : SFTP Server started on 0.0.0.0:2225
[20:31:04] [WebServer Info]       : Websockets are enabled.
[20:31:04] [Core Info]            : Webserver started on http://0.0.0.0:8082
[20:31:04] [WebServer Warning]    : RouterTimer@10Hz with 2 jobs started
[20:31:04] [System Info]          : Checking for AMP updates...
[20:31:05] [System Info]          : AMP is up-to-date.
[20:33:01] [RemoteAMPAuth:Anonymous Activity] : Authentication attempt for user admin from 127.0.0.1
[20:33:02] [RemoteAMPAuth:Anonymous Activity] : Authentication success
[20:33:07] [API:admin Activity]   : Starting the application.
[20:33:08] [FiveM:admin Warning]  : The application stopped unexpectedly. Exit code 1
[20:33:08] [FiveM:admin Warning]  : The application stopped unexpectedly. Exit code 1
[20:33:09] [FiveM:admin Warning]  : The application stopped unexpectedly. Exit code 1
[20:33:39] [FiveM:admin Warning]  : The application stopped unexpectedly. Exit code 1
[20:33:40] [System:admin Error]   : Too many failed startup attempts. Not restarting.
[20:33:48] [API:admin Activity]   : Changing setting FiveMModule.FiveMServerSettings.EndpointPrivacy to False
[20:34:34] [API:admin Activity]   : Changing setting FiveMModule.FiveMServerSettings.AutoRestart to False

Actions taken to resolve so far:
Removed and reinstalled AMP
Removed and recreated FiveM instance

Anything in the console that might give a clue?

Console is empty, nothing shows up in it. The only place anything shows up is in the amp logs.

Can you try installing all the C++ runtimes? Visual C++ Redistributable Runtimes All-in-One (Apr 2022) Download | TechPowerUp

So I installed all C++ runtimes and it is still stopping with error code 1. Attached is the newest log from the Datastore.

[17:16:56] [Core Warning]         : Current time zone is set to Eastern Standard Time - Servers should ideally be UTC to avoid time-zone related issues
[17:16:56] [Program Info]         : OS: Windows / x86_64
[17:16:56] [Program Info]         : CPU: Intel(R) Core(TM) i7-6700T CPU @ 2.80GHz (4C/8T)
[17:16:56] [Program Info]         : AMP Instance ID: 0105c555-1eb4-4a2d-b80a-ffd92e8c2bb9
[17:16:56] [Core Info]            : Loaded FiveMModule version 1.0.0.0 by CubeCoders Limited
[17:16:56] [Core Info]            : Metrics publishing is enabled at udp://127.0.0.1:12820.
[17:16:56] [ModuleLoader Info]    : Loaded FileManagerPlugin version 1.0.0.0 by CubeCoders Limited
[17:16:56] [ModuleLoader Info]    : Loaded EmailSenderPlugin version 1.0.0.0 by CubeCoders Limited
[17:16:56] [ModuleLoader Info]    : Loaded WebRequestPlugin version 1.0.0.0 by CubeCoders Limited
[17:16:56] [ModuleLoader Info]    : Loaded LocalFileBackupPlugin version 1.0.0.0 by CubeCoders Limited
[17:16:57] [ModuleLoader Info]    : Loaded CommonCorePlugin version 1.0.0.0 by CubeCoders Limited
[17:16:57] [Core Info]            : Licence Present: AMP Professional Edition (Licenced to XP)
[17:16:57] [ModuleLoader Info]    : SFTP Server started on 0.0.0.0:2225
[17:16:57] [WebServer Info]       : Websockets are enabled.
[17:16:57] [Core Info]            : Webserver started on http://0.0.0.0:8082
[17:16:57] [WebServer Warning]    : RouterTimer@10Hz with 2 jobs started
[17:16:57] [System Info]          : Checking for AMP updates...
[17:16:58] [System Info]          : AMP is up-to-date.
[17:17:16] [RemoteAMPAuth:Anonymous Activity] : Authentication attempt for user admin from 127.0.0.1
[17:17:18] [RemoteAMPAuth:Anonymous Activity] : Authentication success
[17:17:22] [API:admin Activity]   : Starting the application.
[17:18:47] [API:admin Activity]   : Starting the application.
[17:18:52] [API:admin Activity]   : Starting the application.
[17:22:55] [API:admin Activity]   : Starting the application.
[17:23:16] [API:admin Activity]   : Changing setting FiveMModule.FiveMServerSettings.AutoRestart to True
[17:23:52] [API:admin Activity]   : Starting the application.
[17:23:52] [FiveM:admin Warning]  : The application stopped unexpectedly. Exit code 1
[17:23:53] [FiveM:admin Warning]  : The application stopped unexpectedly. Exit code 1
[17:23:54] [FiveM:admin Warning]  : The application stopped unexpectedly. Exit code 1
[17:23:55] [FiveM:admin Warning]  : The application stopped unexpectedly. Exit code 1
[17:24:23] [System:admin Error]   : Too many failed startup attempts. Not restarting.

Edit: I enabled debug logging and got this

[17:58:23] [WebServer Debug]      : Using webroot: C:\AMPDatastore\Instances\QGFiveM\WebRoot
[17:58:23] [WebServer Info]       : Websockets are enabled.
[17:58:23] [WebServer Debug]      : Building setting specification cache...
[17:58:23] [WebServer Debug]      : Setting spec cache built, 72 items added.
[17:58:23] [Core Info]            : Webserver started on http://0.0.0.0:8082
[17:58:23] [WebServer Warning]    : RouterTimer@10Hz with 2 jobs started
[17:58:23] [Core Debug]           : Scheduler timer will start in 36779ms.
[17:58:23] [System Info]          : Checking for AMP updates...
[17:58:23] [System Debug]         : Successfully got update data.
[17:58:23] [System Info]          : AMP is up-to-date.
[17:59:03] [System:Anonymous Debug] : Login request from session 4d6da945-82b4-45eb-98dc-5c67568df5fe
[17:59:03] [RemoteAMPAuth:Anonymous Activity] : Authentication attempt for user admin from 127.0.0.1
[17:59:03] [Core:Anonymous Debug] : Logging in via remote auth server http://127.0.0.1:8080/...
[17:59:04] [RemoteAMPAuth:Anonymous Activity] : Authentication success
[17:59:07] [API:admin Activity]   : Starting the application.
[17:59:07] [FiveM:admin Debug]    : Application state changed from Stopped to PreStart
[17:59:08] [FiveM:admin Debug]    : UDP logger listener started on 127.0.0.1:58755
[17:59:08] [FiveM:admin Debug]    : Starting process C:\AMPDatastore\Instances\QGFiveM\fivem\server-bin\FXServer.exe
[17:59:08] [FiveM:admin Debug]    : Working Directory: C:\AMPDatastore\Instances\QGFiveM\fivem\server-data
[17:59:08] [FiveM:admin Debug]    : Arguments: +set citizen_dir "C:\AMPDatastore\Instances\QGFiveM\fivem\server-bin\citizen/" +exec C:\AMPDatastore\Instances\QGFiveM\fivem\server-data\admin.cfg +exec C:\AMPDatastore\Instances\QGFiveM\fivem\server-data\server.cfg +set gamename gta5
[17:59:08] [FiveM:admin Debug]    : Started process with ID 15056
[17:59:08] [FiveM:admin Debug]    : Application state changed from PreStart to Starting
[17:59:10] [FiveM:admin Debug]    : Application state changed from Starting to Stopped
[17:59:10] [FiveM:admin Warning]  : The application stopped unexpectedly. Exit code 1
[17:59:10] [FiveM:admin Debug]    : Application state changed from Stopped to PreStart
[17:59:10] [FiveM:admin Debug]    : UDP logger listener started on 127.0.0.1:50962
[17:59:10] [FiveM:admin Debug]    : Starting process C:\AMPDatastore\Instances\QGFiveM\fivem\server-bin\FXServer.exe
[17:59:10] [FiveM:admin Debug]    : Working Directory: C:\AMPDatastore\Instances\QGFiveM\fivem\server-data
[17:59:10] [FiveM:admin Debug]    : Arguments: +set citizen_dir "C:\AMPDatastore\Instances\QGFiveM\fivem\server-bin\citizen/" +exec C:\AMPDatastore\Instances\QGFiveM\fivem\server-data\admin.cfg +exec C:\AMPDatastore\Instances\QGFiveM\fivem\server-data\server.cfg +set gamename gta5
[17:59:10] [FiveM:admin Debug]    : Started process with ID 13684
[17:59:10] [FiveM:admin Debug]    : Application state changed from PreStart to Starting
[17:59:10] [FiveM:admin Debug]    : Application state changed from Starting to Stopped
[17:59:10] [FiveM:admin Warning]  : The application stopped unexpectedly. Exit code 1
[17:59:10] [FiveM:admin Debug]    : Application state changed from Stopped to PreStart
[17:59:10] [FiveM:admin Debug]    : UDP logger listener started on 127.0.0.1:50963
[17:59:10] [FiveM:admin Debug]    : Starting process C:\AMPDatastore\Instances\QGFiveM\fivem\server-bin\FXServer.exe
[17:59:10] [FiveM:admin Debug]    : Working Directory: C:\AMPDatastore\Instances\QGFiveM\fivem\server-data
[17:59:10] [FiveM:admin Debug]    : Arguments: +set citizen_dir "C:\AMPDatastore\Instances\QGFiveM\fivem\server-bin\citizen/" +exec C:\AMPDatastore\Instances\QGFiveM\fivem\server-data\admin.cfg +exec C:\AMPDatastore\Instances\QGFiveM\fivem\server-data\server.cfg +set gamename gta5
[17:59:10] [FiveM:admin Debug]    : Started process with ID 1112
[17:59:10] [FiveM:admin Debug]    : Application state changed from PreStart to Starting
[17:59:11] [FiveM:admin Debug]    : Application state changed from Starting to Stopped
[17:59:11] [FiveM:admin Warning]  : The application stopped unexpectedly. Exit code 1
[17:59:11] [FiveM:admin Debug]    : Application state changed from Stopped to PreStart
[17:59:11] [FiveM:admin Debug]    : UDP logger listener started on 127.0.0.1:64280
[17:59:11] [FiveM:admin Debug]    : Starting process C:\AMPDatastore\Instances\QGFiveM\fivem\server-bin\FXServer.exe
[17:59:11] [FiveM:admin Debug]    : Working Directory: C:\AMPDatastore\Instances\QGFiveM\fivem\server-data
[17:59:11] [FiveM:admin Debug]    : Arguments: +set citizen_dir "C:\AMPDatastore\Instances\QGFiveM\fivem\server-bin\citizen/" +exec C:\AMPDatastore\Instances\QGFiveM\fivem\server-data\admin.cfg +exec C:\AMPDatastore\Instances\QGFiveM\fivem\server-data\server.cfg +set gamename gta5
[17:59:11] [FiveM:admin Debug]    : Started process with ID 15088
[17:59:11] [FiveM:admin Debug]    : Application state changed from PreStart to Starting
[17:59:41] [FiveM:admin Debug]    : Application state changed from Starting to Stopped
[17:59:41] [FiveM:admin Warning]  : The application stopped unexpectedly. Exit code 1
[17:59:41] [FiveM:admin Debug]    : Application state changed from Stopped to PreStart
[17:59:41] [FiveM:admin Debug]    : UDP logger listener started on 127.0.0.1:50464
[17:59:41] [FiveM:admin Debug]    : Starting process C:\AMPDatastore\Instances\QGFiveM\fivem\server-bin\FXServer.exe
[17:59:41] [FiveM:admin Debug]    : Working Directory: C:\AMPDatastore\Instances\QGFiveM\fivem\server-data
[17:59:41] [FiveM:admin Debug]    : Arguments: +set citizen_dir "C:\AMPDatastore\Instances\QGFiveM\fivem\server-bin\citizen/" +exec C:\AMPDatastore\Instances\QGFiveM\fivem\server-data\admin.cfg +exec C:\AMPDatastore\Instances\QGFiveM\fivem\server-data\server.cfg +set gamename gta5
[17:59:41] [FiveM:admin Debug]    : Started process with ID 16352
[17:59:41] [FiveM:admin Debug]    : Application state changed from PreStart to Starting
[17:59:41] [FiveM:admin Debug]    : Application state changed from Starting to Stopped
[17:59:41] [System:admin Error]   : Too many failed startup attempts. Not restarting.

Can you open the FXServer.exe file once outside of AMP and see if it prompts to install anything else?

So opening FXServer.exe actually shined a ton more light on what the issue actually was.

I ran through the setup using txadmin (the default bundled admin interface) and turns out it was an issue with the key all along (for some reason AMP would not give this info)

================================================================
======== FXServer Starting - 5/31/2022, 9:40:33 PM              
================================================================
[    c-scripting-core] Creating script environments for _cfx_internal
[ citizen-server-impl] Scanning resources.
[ citizen-server-impl] Found 25 resources.
[          svadhesive] Authenticating server license key...
[          svadhesive] Error: Could not authenticate server license key. Your key is inactive.

================================================================
======== FXServer Starting - 5/31/2022, 9:41:29 PM              
================================================================
[    c-scripting-core] Creating script environments for _cfx_internal
[ citizen-server-impl] Scanning resources.
[ citizen-server-impl] e[0mFound 25 resources.
[          svadhesive] Authenticating server license key...
[          svadhesive] Error: Could not authenticate server license key. Your key is not matching the initial IP address sufficiently (#2, IP requested is IP HERE, H(in) is YOUNG73-ARIN, H(ad) is WASHI62-ARIN). Please create a new key, or run the server on the right provider.
> quit "Server restarting (crash detected)."

================================================================
======== FXServer Starting - 5/31/2022, 9:42:32 PM              
================================================================
[    c-scripting-core] e[0mCreating script environments for _cfx_internal
[ citizen-server-impl] Scanning resources.
[ citizen-server-impl] Found 25 resources.
[          svadhesive] Authenticating server license key...
[          svadhesive] Server license key authentication succeeded. Welcome!
[    c-scripting-core] Creating script environments for sessionmanager
[ citizen-server-impl] Started resource sessionmanager
[    c-scripting-core] Creating script environments for monitor
[      script:monitor] [txAdminClient] Version 4.14.0 starting...
[ citizen-server-impl] Started resource monitor
[    c-scripting-core] Creating script environments for mapmanager
[ citizen-server-impl] e[0mStarted resource mapmanager
[    c-scripting-core] e[97mCreating script environments for yarn
[ citizen-server-impl] Started resource yarn
[ citizen-server-impl] Running build tasks on resource webpack - it'll restart once completed.
[    c-resources-core] Could not start dependency webpack for resource chat.
[ citizen-server-impl] Couldn't start resource chat.
[ citizen-server-impl] Started resource spawnmanager
[   script:mapmanager] Started gametype Freeroam
[ citizen-server-impl] Started resource basic-gamemode
[    c-scripting-core] Creating script environments for hardcap
[ citizen-server-impl] e[0mStarted resource hardcap
[      script:monitor] [txAdminClient] Threads and commands set up. All Ready.
[   script:mapmanager] e[0mStarted map fivem-map-hipster
[ citizen-server-impl] Started resource fivem-map-hipster

Upon further research on the FiveM keymaster site, turns out the key had somehow gotten deactivated. Upon creating a new key and inputting it into both the AMP interface as well as the txadmin interface everything is working as it should now.