01
Licence key missing or refused
Without a valid key, the server stops as soon as it starts. Two messages come up in the console:
This server does not have a license key specified: the server found no key at all. The sv_licenseKey line is missing, it is disabled by a # at the start of the line, or the server is not reading the server.cfg you are editing (another file, another folder).
Could not authenticate server license key: a key was read, but Cfx.re refuses it. Recent server versions replace this generic message with the exact reason for the refusal (different IP address, inactive key…): read the whole line.
The expected line in server.cfg:
sv_licenseKey "votre_cle_ici"
Then check, in this order:
- the key is copied in full, with no stray space, between two quotation marks, and the line appears only once in the file;
- the key still exists on the Cfx.re portal, on the account that created it;
- the server has not changed IP address: a key tied to an address is refused on another machine. Create a new one for the new address;
- the same key is not already used by another server, for example a test server left running.
The guide to the FiveM licence key covers creating the key on the Cfx.re portal and the player limit.
02
"Couldn't load resource": a resource will not start
At startup, the server scans the resources folder, then launches each resource named by an ensure line in server.cfg. The message tells you which step is failing:
Couldn't find resource nom: no folder has that name. The folder name differs from the one on the ensure line (on Linux, capital letters matter), the folder sits in a subfolder whose name is not in square brackets (only categories such as [scripts] are scanned), or the archive created a folder inside the folder (nom/nom/fxmanifest.lua).
Couldn't load resource nom, often followed by Could not open resource metadata file: the folder exists, but it has no fxmanifest.lua at its root, or that file cannot be read (a stray quote or comma). The manifest must also declare fx_version and game.
Could not find dependency X for resource Y: resource Y declares that it needs X, which is not installed. Add X and start it before Y.
Couldn't start resource nom: the resource is found, but launching it fails. The cause is in the lines just above: a script error, a refused dependency, an unreachable database.
You lack the required entitlement: the resource comes from the Cfx.re store (escrow). It only works with a licence key from the Cfx.re account that bought it.
A minimal manifest, to compare with yours:
fx_version 'cerulean'
game 'gta5'
server_script 'server.lua'
client_script 'client.lua'
After a fix, there is no need to restart the whole server. In the console:
refresh
ensure nom_de_la_ressource
refresh rescans the resources folder and the manifests; ensure starts the resource, or restarts it if it was already running. Mind the order of the ensure lines too: libraries and the framework come before the scripts that use them.
03
Server not showing in the server list
Start by separating two failures that look alike: is the server unreachable, or only missing from the list? In FiveM, open the console with F8 and connect by address:
connect 203.0.113.42:30120
If the direct connection fails, the problem is the ports, not the list (see the next section). If it works, go through these points:
- The server's information page: open
http://adresse-du-serveur:30120/info.json in a browser, from a different connection than the server's. It must return the server's information.
- The
sv_master1 line: written without a # in front, it can make the server appear as private, with the connect button disabled. Leave it commented out or delete it; it is not needed.
- The delay: according to the Cfx.re documentation, a server can take up to 8 minutes to appear after it starts.
- The server version: artifacts that have been unsupported for more than three months can no longer be joined from the server list (see the section on artifacts).
- The router: when hosting at home, a router or gateway that masks the source port of UDP packets can prevent the server from being listed.
- The list itself: the Cfx.re service sometimes has its own outages. If other servers are missing too, wait.
# à laisser commenté, ou à retirer du fichier
#sv_master1 ""
One last case, worth knowing before you hunt for a fault: some licence keys supplied by a host are not listed. That is the case for the keys CloudFive sets on its FiveM servers. The server works normally, but players join through its address or your Discord.
04
Players timing out
A timeout means the player's game no longer gets an answer from the server. To find the cause, look at who is affected and when:
- Nobody can get in: the game port cannot be reached. FiveM uses port 30120 over TCP and UDP: TCP handles the first contact and the resource download, UDP the game itself. When only TCP gets through, the player sees the server, downloads the resources, then the connection fails, often with the message
Server connection timed out after 15 seconds. Open both protocols on the machine's firewall and, at home, on the router. The guide to game server ports gives the commands.
- A single player drops while the others keep playing: the cause is on their side (connection, VPN, firewall or antivirus), not on the server.
- Everyone drops at the same time, with a frozen console or one full of hitch warnings: the server blocked for long enough to lose its players. See the next section.
- Everyone drops, but the console runs normally: it is the network, sometimes an attack. The guide on protecting a game server from DDoS attacks explains how to check.
- Always at the same point of the loading screen: a resource that is too heavy or failing on the player's side. Ask them for the last line of their
F8 console before the drop: it often names the resource.
In server.cfg, two lines tell the server which address and port to listen on:
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
The port must be free. If another program, or an old server process left running, already holds it, the server cannot open it and says so at startup: stop the old process, or change the port in both lines at once.
05
Hitch warnings and oxmysql errors
A hitch warning looks like this:
server thread hitch warning: timer interval of 250 milliseconds
The server's main thread, the one that runs the scripts, stayed blocked for the time shown. The variants sync thread hitch warning and network thread hitch warning report the same delay on synchronisation or on the network. A few lines at startup, while resources load, are harmless. Repeated lines in the middle of a session, with values of several hundred milliseconds, are felt in game; when the block lasts several seconds, players time out.
The built-in profiler shows which resource is taking the time. Run it in the console while the warnings are scrolling:
profiler record 500
profiler view
On the server, profiler view gives a link to open in Google Chrome. The guide on optimising a FiveM server explains how to read the report and which causes come up most.
Errors from oxmysql, the resource that links the server to its database, show at startup:
ECONNREFUSED: the database is stopped or unreachable (wrong address or port);
ER_ACCESS_DENIED_ERROR: wrong user or password;
ER_BAD_DB_ERROR: the named database does not exist;
ER_NO_SUCH_TABLE: the .sql file of the framework or script was not imported.
set mysql_connection_string "mysql://utilisateur:motdepasse@localhost/mabase?charset=utf8mb4"
set mysql_slow_query_warning 150
ensure oxmysql
- The connection string is declared before the
ensure lines, and ensure oxmysql comes before the framework and the scripts.
- The oxmysql documentation advises against the characters
; , / ? : @ & = + $ # in the connection string: pick a password without them, or try the other format, user=…;password=…;host=…;database=….
mysql_slow_query_warning sets, in milliseconds, the threshold above which a query is reported as slow. These warnings do not always point to the database: at startup they are not necessarily a sign of trouble, and during a hitch every query looks slow. Look first for what is blocking the server.
- To see which queries are sent, add
set mysql_debug true while you diagnose, then remove the line: it writes every query to the console.
The oxmysql guide goes through each database error in detail.
06
Artifacts that are too old
The FiveM server is released as numbered versions, the artifacts. Cfx.re only supports each version for a while: the recommended version until six weeks after the next one is released, the latest version until two weeks after. After that, players see a warning when they connect:
- grey, "end of support": the server can still be joined, but its version is no longer supported;
- red, "end of life": the connection may fail until the artifacts are updated;
- unsupported artifacts more than three months old can no longer be joined from the server list.
Another symptom: a recent resource refuses to start because it requires a minimum server version, declared in its fxmanifest.lua:
dependencies {
'/server:4500',
'/onesync',
}
/server:4500 asks for a server of build 4500 at least, /onesync asks for OneSync not to be disabled. A /gameBuild: constraint, for its part, concerns the GTA V version enforced by the server: see the FiveM gamebuild guide.
To update: take a backup, stop the server, replace the artifact files with the version marked as recommended, then restart. Your resources, server.cfg, the txData folder and the database do not change. txAdmin ships with the artifacts, so it is updated at the same time (see the txAdmin guide). Keep the old version for a few days: if a resource breaks, you can roll back while you fix it.
07
On a CloudFive server
On a FiveM plan, these checks are done from the server's page in the customer area:
- Console: logs arrive live and you type commands there (
refresh, ensure, profiler record). A diagnostic reads the last lines and says in plain words what it recognises: refused key, port in use, resource in error.
- Artifacts: the installed version, the available versions and the button to switch or go back to the previous one. A backup is taken first.
- Resources: the list of started and stopped resources, to see at a glance which one is missing.
- server.cfg: the file is edited in the editor of the Files tab, without a file transfer program.
- Cfx.re key: it is set when the server is created, and the page shows its status. For escrow resources, which are tied to the buyer's Cfx.re account, ask support before buying.
- Backups: dated and restorable in one click, to go back to the state before a resource was added.
- Protection: the tab gives the log of attacks received by the address, with their date, duration and reason. You can see whether mass disconnections match an attack filtered by Anti-DDoS Premium.
The keys we supply are not listed: the server being absent from FiveM's public list is therefore normal with us. Your players connect through the address and port shown on the server's page, or through your Discord. If a fault persists, open a ticket from the server's page: the context is already filled in, and support answers 7 days a week.
08
Frequently asked questions
Why won't my FiveM server start?
Read the console upwards from the point where it stopped: the first error gives the cause. The most common are a missing or refused licence key (sv_licenseKey line), port 30120 already in use, a resource in error, or an unreachable database reported by oxmysql.
What does "Couldn't load resource" mean on FiveM?
The server found the resource folder but could not load it: the fxmanifest.lua file is missing at its root, or it contains an error. "Couldn't find resource" means instead that no folder has that name in resources.
Why is my FiveM server not showing in the server list?
Check that a direct connection through F8 works, that the sv_master1 line is commented out, that the artifacts are up to date, and wait up to 8 minutes after startup. Some keys supplied by a host, including CloudFive's, are not listed.
Why do players time out on my FiveM server?
If nobody can get in, port 30120 is closed over UDP or TCP. If everyone drops at the same time, the server blocked (hitch warnings in the console) or is under attack. If only one player is affected, the cause is their connection.
What does "server thread hitch warning" mean?
The server's main thread stayed blocked for the time shown in milliseconds, most often because of a script or a query that took too long. The built-in profiler (profiler record 500, then profiler view) shows the resource responsible.
How do I fix the "end of life" error on FiveM?
The server is running artifacts that are too old. Take a backup, stop the server, install the recommended artifact version and restart: resources, server.cfg and the database do not change.