Fix FiveM CURL Error 56 and 28 Connection Failures
FiveM CURL error 56 or 28 when joining a server? Learn what each code means, how to read the full message, and the owner and player checks that fix it.
- Applies to
- FiveM Legacy client and FXServer (citizenfx/fivem source of November 17, 2026, bundled curl 7.83.1-DEV); FiveM for GTAV Enhanced differences noted from the Cfx docs
- Last verified
On this page
- Direct Answer
- How FiveM Builds a CURL Error Message
- What “CURL error code 28 (Timeout was reached)” Means
- What “Recv failure: Connection was reset - CURL error code 56” Means
- Is It the Player’s Connection or the Server?
- How to Fix CURL Error 28 or 56 on Your Server
- When the Server Cannot Reach Cfx Services
- CURL Error Codes 7, 28, 52, 55 and 56 Compared
- FiveM for GTAV Enhanced Differences
- Troubleshooting
- Next Steps
Direct Answer
When a FiveM join fails with CURL error 56 (Recv failure: Connection was reset) or CURL error 28 (Timeout was reached), an HTTP request from the player’s client to the server’s TCP port, 30120 by default, failed. Code 28 with a Timed out detail means the connection attempt got no answer at all. Code 56 means a connection opened and was then reset. If the player cannot join any server, Cfx’s support article points to their own firewall, VPN or network. If only your server fails, load http://<public-ip>:30120/info.json from outside, open and forward TCP 30120, add any proxy’s address to sv_proxyIPRanges, and for code 56 check net_tcpConnLimit and sv_requestParanoia.
How FiveM Builds a CURL Error Message
Before the game loads, the FiveM client sends several HTTP requests to the server, and it uses the curl library for them. When curl fails, the client’s HTTP code writes curl’s own detail text, then - CURL error code, the number, and curl’s short description in brackets. A report on the Cfx forum shows the result:
Failed to fetch server variables. Failed to connect to <server-ip> port 30120 after 21053 ms: Timed out - CURL error code 28 (Timeout was reached)
Read it in three parts:
| Part | Example | Comes from |
|---|---|---|
| The join step that failed | Failed to fetch server variables. | FiveM’s connection code |
| curl’s detail | Failed to connect to <server-ip> port 30120 after 21053 ms: Timed out | curl, ending with the Windows socket error |
| The code and its name | CURL error code 28 (Timeout was reached) | curl’s error number and description |
FiveM’s source includes its own fork of curl. At the source commit of November 17, 2026, that fork is version 7.83.1-DEV, and its descriptions are “Timeout was reached” for code 28 and “Failure when receiving data from the peer” for code 56.
Which Join Step Failed
The first words tell you how far the join got. The Proxy Setup page lists the order of requests, and the client source matches it:
| Look for | Request that failed | Progress text shown before it | What it tells you |
|---|---|---|---|
Failed to fetch server variables. at the start | GET /info.json | “Requesting server variables…” | The first request to the server’s address got no usable answer |
Failed handshake to server at the start | POST /client (initConnect) | “Handshaking with server…” | /info.json worked, so the address answered once; the next request failed |
Failure downloading in the text | GET /files/... on the server or a file server | File download progress | The join reached the download stage |
In the client source, the handshake starts only after the /info.json request has succeeded. Both of the first two messages are tagged "fault": "server", so the client treats them as a server-side problem. People often search the second one as “failed to handshake to server”; the client’s exact text is “Failed handshake to server”, followed by the server’s URL and curl’s message.
These HTTP requests use the TCP side of the game port. A reply in the official Nucleus deprecation thread on the Cfx forum states that every FXServer HTTP route, /info.json and /client included, stays available on the interfaces set by endpoint_add_tcp. The UDP part of the join (a UDP info request, then an ENet connect request with a UDP handshake) comes later.
Streamer Mode Hides the Detail
If a player reports only “Failed to fetch server variables.” with nothing after it, their client has streamer mode on. With ui_streamerMode enabled, the client leaves out curl’s detail. Ask the player for the full text with streamer mode off, because the code and detail decide the fix.
What “CURL error code 28 (Timeout was reached)” Means
curl’s error list defines code 28, CURLE_OPERATION_TIMEDOUT, as “Operation timeout. The specified time-out period was reached according to the conditions.” The detail before the code tells you which stage ran out of time. curl’s source has these timeout messages:
| Detail text | Stage that timed out |
|---|---|
Failed to connect to <ip> port <port> after <N> ms: Timed out | The TCP connection attempt; Windows reported a socket timeout |
Connection timed out after <N> milliseconds | Connecting, on curl’s own timer |
Resolving timed out after <N> milliseconds | Looking up the host name |
Operation timed out after <N> milliseconds with <N> bytes received | The transfer, after the connection opened |
The forum report quoted above shows the first form. In curl’s connect code, a failed connection keeps code 7 unless the operating system’s error was a socket timeout (WSAETIMEDOUT); curl then switches the result to code 28. Microsoft defines that error as a connection attempt that failed “because the connected party did not properly respond after a period of time”.
So “Failed to connect … Timed out” means the player’s connection request to that IP and port got no reply at all. Microsoft adds that a dead host is “more likely to be indicated by the error WSAETIMEDOUT”. That points to a host that is down, a wrong IP, a port that is not forwarded, or a firewall in the way. The Server Issues page names incorrect port forwarding or a firewall blocking connections as the likely cause when direct connections fail.
Code 28 Versus Code 7 “Connection refused”
If the detail ends in “Connection refused” instead of “Timed out”, curl reports code 7 with the description “Couldn’t connect to server”. curl’s list defines code 7 as “Failed to connect() to host or proxy.” Microsoft explains a refused connection: it “usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.”
The difference is useful. A refusal means the machine answered but nothing listens on that port: FXServer is not running, or it listens on another port. A timeout means nothing answered.
What “Recv failure: Connection was reset - CURL error code 56” Means
curl’s error list defines code 56, CURLE_RECV_ERROR, as “Failure with receiving network data.” A typical report reads:
Failed to fetch server variables. Recv failure: Connection was reset - CURL error code 56 (Failure when receiving data from the peer)
When reading from a connection fails, curl writes “Recv failure:” followed by the operating system’s error text. On Windows, curl’s text for WSAECONNRESET is “Connection was reset”. Microsoft describes that error as “An existing connection was forcibly closed by the remote host”. The usual reasons it lists are that the program on the remote host stopped suddenly, the host rebooted, its network interface was disabled, or it used a hard close.
Code 56 therefore tells you something different from code 28. The connection did open, so something answered on that address and port, and then the player’s system saw the connection closed hard from the other end. On your side, the other end is FXServer itself or a proxy in front of it: the Proxy Setup page explains that the connect endpoint can be any commodity HTTPS reverse proxy or load balancer on port 443, leading to the server’s TCP port. When one player gets code 56 on every server, the player-side checks further down apply instead.
A second form of code 56 starts with OpenSSL SSL_read:. curl’s OpenSSL code writes it when a read inside an encrypted HTTPS connection fails, and returns the same code 56. Expect it when players reach the server through an https:// address, such as a connect proxy or a file server added with fileserver_add. A forum report from May 30, 2022 shows the same form outside the join, on a failed game build download: “Changing game build failed: Downloading … failed with CURLcode 56 - OpenSSL SSL_read: …”.
FXServer Settings That Reset Connections
The Cfx support article says CURL errors “are not caused by the FiveM client or FXServer directly”. FXServer’s source shows one exception: as a protection, it closes or resets some connections on purpose. Check these settings first when code 56 hits many players:
| Setting | Default | What FXServer does |
|---|---|---|
net_tcpConnLimit | 16 concurrent connections per IP | Resets new connections from an address that already has that many open. Loopback addresses and addresses in sv_proxyIPRanges are exempt. |
sv_requestParanoia | 0 (off) | Level 1 blocks addresses whose requests carry a Via header. Level 2 also blocks requests with an Upgrade-Insecure-Requests header, which browsers send. Level 3 also closes the socket. A blocked request gets 403 with the body “Nope.”, and the source then refuses new TCP connections from that address. |
http_info rate limiter | 4 tokens per second, burst 10 | Over the limit, /info.json answers 429 “Rate limit exceeded.”; while the address is in cooldown, the server closes the socket without an answer. Proxy addresses are exempt. |
When FXServer turns a connection away under net_tcpConnLimit, its TCP server calls closeReset() on a connection the player’s system has already opened. That is the “forcibly closed by the remote host” case. curl then reports a receive failure (code 56), or a send failure (code 55, “Failed sending data to the peer”) if the reset hits while the request is being sent.
FiveM’s HTTP client allows itself up to 8 simultaneous connections to one host. Two players on one public address who each use all 8 already reach the default limit of 16, so a third player on that address can be turned away. Two setups make this likely:
- A proxy in front of FXServer, such as a DDoS-protection proxy, whose public IP is not in
sv_proxyIPRanges. Every player then reaches FXServer from the proxy’s one address, and the default list covers only private and loopback ranges (10.0.0.0/8 127.0.0.0/8 192.168.0.0/16 172.16.0.0/12), so that address is not exempt. FXServer resets the proxy’s connections once it has 16 open, and joins through the proxy fail. The Proxy Setup page adds the proxy’s range tosv_proxyIPRangesto “allow ‘X-Real-IP’ from, as well as bypass the rate limiter”. - Several players sharing one public IP.
net_tcpConnLimittunes the per-IP limit; the docs’ example isnet_tcpConnLimit 32.
sv_requestParanoia at 2 or higher also catches your own tests. The docs warn that level 2 “includes all browser-based attempts at requesting .json endpoints, so use with care.” If you open info.json in a browser on such a server, expect “Nope.”, and expect later joins from that address to be reset.
The docs and the source differ on one point here. The docs also say that at level 2 or greater, all requests made to info.json, dynamic.json and players.json return “Nope.”. In the source, only requests that carry a Via header (level 1 and up) or an Upgrade-Insecure-Requests header (level 2 and up) get that answer. Either way, test from a FiveM client with connect, not from a browser, when this setting is on.
Is It the Player’s Connection or the Server?
Cfx’s support article on CURL errors says they “are usually the result of networking issues, either from the server host or with your internet connection.” It gives players this order:
- Try other servers. If they work, the article says the issue is likely the particular server, and the player should contact its owner.
- Try the FiveM test server at
cfx.re/join/y4lg95. - If no server works, check the player’s own connection. Allow FiveM through the firewall or disable the firewall, turn off any VPN (the article notes that some VPNs cause CURL errors), and on a school or work network, ask the administrators whether they block FiveM.
As an owner, this sorts the reports. One player who fails on every server points, per the article, to their own internet connection, and you can send them these steps. Many players who fail only on your server point to your side, and the steps below apply.
How to Fix CURL Error 28 or 56 on Your Server
- Collect the full message. Note the first words (which join step), the code, and the IP and port in the detail. If the detail is missing, ask the player to turn off streamer mode and try again.
- Check the address in the message. It must be your server’s public IP and game port. The client takes the address from the server list’s
connectEndPoints(set withsv_listingHostOverride), from the join link history, or from theconnectcommand. A bare host or IP without a port becomeshttp://<host>:30120/.sv_listingIpOverridedoes not change this address: per the Proxy Setup page, it only matters when the server list backend cannot guess the IP to query, and it “is not provided to any front-end connection”. - Confirm FXServer serves HTTP on its TCP endpoint. The docs’ example is
endpoint_add_tcp "0.0.0.0:30120". From a device outside your network, openhttp://<public-ip>:30120/info.json. The Server Issues page says it should return a JSON object containing your server’s info. Ifsv_requestParanoiais 2 or higher, skip the browser test and use step 4: the browser gets “Nope.” and FXServer blocks your address (see the table above). - Run the direct connect test. In a FiveM client, press F8, enter
connect <public-ip>:30120and press Enter. If it fails, the Server Issues page points to incorrect port forwarding or a firewall that blocks connections. The firewall steps for Windows and Linux hosts and the router steps are in FiveM port forwarding for 30120 TCP and UDP. - For code 56, check the reset rules. Search
server.cfgfornet_tcpConnLimitandsv_requestParanoia, and check whether a proxy in front of the server, such as a DDoS-protection proxy, uses an address outsidesv_proxyIPRanges(see the table above). - If a proxy sits in front, test it the way the docs do. With
sv_requestParanoiabelow 2, these URLs should load in a browser:https://server1.example.com/info.json,/players.json,/dynamic.json, and/client, which should show ‘/client is POST only’. Players must join withconnect "https://server1.example.com/"or a join URL, because the client will not look up a bare domain as a URL. The full setup is in FiveM DDoS protection and proxy setup. - Retest with the player on the same address they reported.
For step 6, this is the docs’ line for a proxy at 100.64.1.1. Put your proxy’s own range in its place:
# a space-separated list of IPv4 networks in CIDR notation to allow 'X-Real-IP'
# from, as well as bypass the rate limiter
set sv_proxyIPRanges "100.64.1.1/32"
When the Server Cannot Reach Cfx Services
The errors above are the player’s client failing to reach your server. Your server also talks to Cfx in both directions. Cfx infrastructure polls game servers for data such as player counts, from the addresses published at https://static.cfx.re/ips.txt, and the Static IPs page says a server behind a strict firewall or DDoS protection must allow traffic from all of them.
If your logs show that the server could not contact the server browser, it cannot communicate with Cfx infrastructure. The Static IPs page calls an occasional occurrence usually harmless; if it happens continuously, the server stops appearing in the server browser. Its fixes, in order:
- Restart the server, which can clear transient networking issues.
- Verify port forwarding and firewall rules.
- Update DDoS protection, firewall rules and any resource or anticheat allow-list to include every address in
ips.txt. - On a local development server, add
sv_master1 ""to the configuration. Do not add it to a public server: the Server Issues page explains that with this line active, the server “might appear as private in the server list” and the connect button is disabled.
New addresses are added to ips.txt at least one month before any traffic comes from them, so a periodic check or an automated sync keeps the allow-list current. If the server is reachable but missing from the list, continue with FiveM server not showing in the server list.
CURL Error Codes 7, 28, 52, 55 and 56 Compared
| Code | curl name | Description in FiveM’s curl | Typical detail | Points to |
|---|---|---|---|---|
| 7 | CURLE_COULDNT_CONNECT | Couldn’t connect to server | Connection refused | Host answered, nothing listening on the port |
| 28 | CURLE_OPERATION_TIMEDOUT | Timeout was reached | Failed to connect ... Timed out | No reply to the connection attempt |
| 52 | CURLE_GOT_NOTHING | Server returned nothing (no headers, no data) | Empty reply from server | Connection ended without any reply |
| 55 | CURLE_SEND_ERROR | Failed sending data to the peer | Send failure: | Connection failed while sending |
| 56 | CURLE_RECV_ERROR | Failure when receiving data from the peer | Recv failure: Connection was reset, OpenSSL SSL_read: | Connection opened, then reset or broken |
FiveM for GTAV Enhanced Differences
The Cfx pages used here (Server Issues, Proxy Setup, Static IPs) do not split their advice by platform. The Server Commands and What’s Changed pages list three differences that matter for these errors:
- One endpoint per command. On FiveM for GTAV Enhanced,
endpoint_add_tcpandendpoint_add_udpsupport only a single endpoint instead of several. - A resource download timeout.
sv_resourceFileDownloadTimeoutis listed among the variables only available in FiveM for GTAV Enhanced. It defaults to 120000 ms (2 minutes), and a resource file download over HTTP that does not complete in that time is canceled. - Handshake keys for proxies. Also listed only for Enhanced,
generate_handshake_keyandload_handshake_keylet a proxy verify handshake requests before they reach the server. The docs say the proxy must use the same key file and its IP must be listed insv_proxyIPRanges; with no key loaded, a new key is generated at every server startup.
The client messages and FXServer behavior quoted in this guide come from the public citizenfx/fivem source. The Cfx pages used here do not say whether FiveM for GTAV Enhanced uses the same message text.
Troubleshooting
“Failed to fetch server variables.” With No CURL Code
- Nothing after the sentence: the player’s streamer mode hides the detail. Ask for the message with it turned off.
- An HTTP status instead of a CURL code: the client’s HTTP code turns any status of 400 or higher into a failure that starts with
HTTPand the number.HTTP 429points to thehttp_inforate limiter;HTTP 403points tosv_requestParanoia(“Nope.”).
One Player Gets CURL Error 56 on Every Server
The support article points to that player’s own connection. Send them its steps: firewall, VPN, school or work network. If it turns out they fail only on your server, check whether their address was blocked by sv_requestParanoia, or whether they share a public IP with other players under net_tcpConnLimit.
Joins Fail for Every Player After You Added a Proxy or DDoS Protection
- Add the proxy’s address range to
sv_proxyIPRanges. The proxy’s address is then exempt fromnet_tcpConnLimitand from thehttp_inforate limiter. - If the proxy adds a
Viaheader,sv_requestParanoialevel 1 or higher answers its requests with “Nope.”. - Test the proxy URLs from step 6, including
/client.
CURL Error 28 for Every Player
A timeout for everyone means connection attempts to your address get no reply. Recheck steps 2 to 4: the address in the message, info.json from outside, and the direct connect test. The port forwarding guide covers firewall, router and carrier-grade NAT checks.
info.json Opens, but Players Get “Failed handshake to server”
The handshake is a POST to /client on the same address. Open /client in a browser; FXServer answers a non-POST request with “/client is POST only”, which proves the route is reachable. A connect proxy must pass this route through as well. If the detail is a reset, work through the reset rules above, and check whether FXServer stopped or restarted at that moment, since a program that stops suddenly is one of Microsoft’s reasons for a reset.
Players Fail While Downloading Resources
Download errors contain Failure downloading <file>: <error>, with curl’s message as the error. The client tries each file up to five times, doubling the pause between tries, before it shows the error. Files come from the server endpoint or from a file server override, so check any fileserver_add target and its proxy. If sv_httpFileServerProxyOnly is enabled, only addresses in sv_proxyIPRanges may use the file server, so players must download through that proxy. Parallel downloads count toward net_tcpConnLimit. On FiveM for GTAV Enhanced, also check sv_resourceFileDownloadTimeout.
Next Steps
- Open port 30120 for TCP and UDP with FiveM port forwarding.
- Fix listing problems with FiveM server not showing in the server list.
- Put a proxy or DDoS filter in front correctly with FiveM DDoS protection and proxy setup.
- Rebuild from scratch with How to make a FiveM server.
Browse FiveCrate assets
Original FiveM assets made in-house, with free updates and a multi-server license.
Official documentation and repository references
Related guides
FiveM DDoS Protection and Proxy Setup Explained
FiveM DDoS protection from the Cfx docs: connect and server proxies, nginx and Cloudflare setup, sv_proxyIPRanges, ips.txt, and what a proxy cannot hide.
FiveM Port Forwarding: Open 30120 TCP and UDP
FiveM port forwarding step by step: open 30120 TCP and UDP in the firewall and router, test from outside, and fix CGNAT, txAdmin and "Could not bind" errors.
FiveM Server Not Showing in Server List? 2026 Checklist
FiveM server not showing in the server list? Work through port 30120 TCP/UDP, sv_master1, Cfx static IPs, the Portal key, old FXServer builds and allowlists.
How to Make a FiveM Server in 2026 (txAdmin + Portal)
How to make a FiveM server in 2026: download FXServer, finish txAdmin setup, deploy a recipe, add a Cfx Portal key, set listing details and open port 30120.

